プロジェクト

全般

プロフィール

Defect #715

未完了

Jenkins image does not appear.

Haru Iida さんがほぼ13年前に追加. 約11年前に更新.

ステータス:
新規(New)
優先度:
通常(Normal)
担当者:
対象バージョン:
-
開始日:
2011/04/18
期日:
進捗率:

0%

予定工数:

説明

JenkinsをアップグレードしてJenkinsさんの画像が変わったらHudsonプラグイン上と活動で画像が表示されなくなりました。

A B さんが約11年前に更新

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 = "" 

A B さんが約11年前に更新

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'>" 

他の形式にエクスポート: Atom PDF