プロジェクト

全般

プロフィール

Defect #1143

未完了

hudson plugin: empty filter attributes results in "undefined" filter value

cforce cforce さんが11年以上前に追加. 約11年前に更新.

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

0%

予定工数:

説明

Btw. i already chekced drop down list in rendered hmtl view against pattern of "name": and there are complete, means alls entries with name <> empty and no more.

Then i found the last two entries without name attrib..

,"hudson_job":{"type":"list_optional","values":[]},"hudson_build":{"type":"integer"}};
var labelDayPlural = "Tage";
$(document).ready(function(){
  initFilters();
  addFilter("status_id", "o", [""]);
});

The hudson plugins seems to extens the filters without name, so that could be the problem. I will write a bug report to the author.

see http://www.redmine.org/issues/12525


ファイル

query_patch.rb (8.63 KB) query_patch.rb cforce cforce, 2013/01/18 02:03

cforce cforce さんが11年以上前に更新

The problem is missing :name (see last line) attrib in filter

See my example:

 def available_filters_extended
  unless @available_filters 
    available_filters_original.merge!({ 'exmpleattrib' => {
       :name   => l(:exmpleattrib_label),

cforce cforce さんが11年以上前に更新

Change code (untested) in /lib/query_patch.rb in def hudson_filters

@hudson_filters << HudsonQueryFilter.new("hudson_job",
                                { :name   => l(:hudson_job), :type => :list_optional, :order => @available_filters.size + 1,
                                  :values => HudsonJob.find(:all, :conditions => ["#{HudsonJob.table_name}.project_id = ?", project.id],
                                              :order => "#{HudsonJob.table_name}.name").collect {|job|
                                              next unless hudson.settings.job_include?(job.name)
                                              [job.name, job.id.to_s]
                                            }
                                },
                                HudsonJob.table_name,
                                "id")
        @hudson_filters << HudsonQueryFilter.new("hudson_build",
                                { :name   => l(:hudson_build), :type => :integer, :order => @available_filters.size + 2 },
                                HudsonBuild.table_name,
                                "number")

        return @hudson_filters

Haru Iida さんが11年以上前に更新

  • プロジェクトr-labs から Hudson に変更
  • 担当者Toshiyuki Ando にセット

cforce cforce さんが約11年前に更新

This ist still not fixed although i provided a working fix! Please integrate this into ur code soon.

cforce cforce さんが約11年前に更新

Fixed file with correct labels

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