Defect #715
Jenkins image does not appear.
Start date:
04/18/2011
Due date:
% Done:
0%
Estimated time:
Description
JenkinsをアップグレードしてJenkinsさんの画像が変わったらHudsonプラグイン上と活動で画像が表示されなくなりました。
Updated by A B about 8 years ago
This patch fixes the problem (the redmine change was http://www.redmine.org/projects/redmine/repository/revisions/4047):
--- lib/hudson_application_hooks.rb.orig 2013-02-05 18:37:01.130338160 -0800 +++ lib/hudson_application_hooks.rb 2013-02-05 18:36:42.998080238 -0800 @@ -13,7 +13,8 @@ baseurl = url_for(:controller => 'hudson', :action => 'index', :id => project) + '/../../..' - if (controller.class.name == 'ProjectsController' and action_name == 'activity') + if (controller.class.name == 'ProjectsController' and action_name == 'activity' or + controller.class.name == 'ActivitiesController') hudson = Hudson.find_by_project_id(project.id) return '' unless hudson.settings.url o = ""
Updated by A B about 8 years ago
Here is a second patch that solves the issue for the top-level activity (if you go to "Projects" -> "Overall Activity"):
--- lib/hudson_application_hooks.rb.orig 2013-02-05 18:37:01.130338160 -0800 +++ lib/hudson_application_hooks.rb 2013-02-05 19:12:51.938330379 -0800 @@ -5,16 +5,16 @@ def view_layouts_base_html_head(context = {}) project = context[:project] - return '' unless project controller = context[:controller] return '' unless controller action_name = controller.action_name return '' unless action_name - baseurl = url_for(:controller => 'hudson', :action => 'index', :id => project) + '/../../..' + baseurl = url_for(:controller => 'hudson', :action => 'index', :id => 1) + '/../../..' if (controller.class.name == 'ProjectsController' and action_name == 'activity' or controller.class.name == 'ActivitiesController') - hudson = Hudson.find_by_project_id(project.id) + hudson = project ? Hudson.find_by_project_id(project.id) : Hudson.find(:first) return '' unless hudson.settings.url o = "" o << "<style type='text/css'>"