プロジェクト

全般

プロフィール

Feature #1377

Extension of filter

Tomohisa Kusukawa2年以上前に追加. 2年以上前に更新.

ステータス:
終了(Closed)
優先度:
通常(Normal)
カテゴリ:
-
対象バージョン:
開始日:
2015/04/27
期日:
進捗率:

100%

予定工数:
CF_A:
CF_B:

説明

I received the following request.

- Filter by open / closed. Right now we have to add every status which is possible to each site where a list is displayed. This also has to be done each time a new status is added.

- Field names instead of using IDs (something which has been proposed by Cladio as pull request)

- Count tickets (also something which has been proposed by Cladio as pull request)

- new comparison operators, eg. "!=" and ">". Especially the ">" or "<" would be helpful to filter by date


関連するチケット

関連している Wiki Lists - Question #1370: assigned_to_id が 「なし」のチケット一覧を表示するにはどうしたら良い?終了(Closed)2015-03-09

関係しているリビジョン

リビジョン ac0d81c5 (差分)
Tomohisa Kusukawa が2年以上前に追加

fixes #1377 Extension of filter functions and add counter function

リビジョン d600a34a (差分)
Tomohisa Kusukawa が2年以上前に追加

refs #1377 add filter error message (usage)

履歴

#1 Tomohisa Kusukawa2年以上前に更新

  • ステータス担当(Assigned) から 解決(Resolved) に変更
  • 進捗率0 から 100 に変更

更新履歴 commit:b1e90f2cb10d で適用されました。

#2 Tomohisa Kusukawa2年以上前に更新

add those features on commit:b1e90f2 .

- Filter by open

open issues
{{ref_issues(-f:status_id o)}}

closed issues
{{ref_issues(-f:status_id c)}}

- Field names instead of using IDs

e.x.
{{ref_issues(-f:project=prjA)}}

- Count tickets

e.x.
{{ref_issues(-f:project=prjA, -c)}}

- new comparison operators, eg. "!=" and ">". Especially the ">" or "<" would be helpful to filter by date

<<operators>>

  class_attribute :operators
  self.operators = {
    "="   => :label_equals,
    "!"   => :label_not_equals,
    "o"   => :label_open_issues,
    "c"   => :label_closed_issues,
    "!*"  => :label_none,
    "*"   => :label_any,
    ">="  => :label_greater_or_equal,
    "<="  => :label_less_or_equal,
    "><"  => :label_between,
    "<t+" => :label_in_less_than,
    ">t+" => :label_in_more_than,
    "><t+"=> :label_in_the_next_days,
    "t+"  => :label_in,
    "t"   => :label_today,
    "ld"  => :label_yesterday,
    "w"   => :label_this_week,
    "lw"  => :label_last_week,
    "l2w" => [:label_last_n_weeks, {:count => 2}],
    "m"   => :label_this_month,
    "lm"  => :label_last_month,
    "y"   => :label_this_year,
    ">t-" => :label_less_than_ago,
    "<t-" => :label_more_than_ago,
    "><t-"=> :label_in_the_past_days,
    "t-"  => :label_ago,
    "~"   => :label_contains,
    "!~"  => :label_not_contains,
    "=p"  => :label_any_issues_in_project,
    "=!p" => :label_any_issues_not_in_project,
    "!p"  => :label_no_issues_in_project
  }

  class_attribute :operators_by_filter_type
  self.operators_by_filter_type = {
    :list => [ "=", "!" ],
    :list_status => [ "o", "=", "!", "c", "*" ],
    :list_optional => [ "=", "!", "!*", "*" ],
    :list_subprojects => [ "*", "!*", "=" ],
    :date => [ "=", ">=", "<=", "><", "<t+", ">t+", "><t+", "t+", "t", "ld", "w", "lw", "l2w", "m", "lm", "y", ">t-", "<t-", "><t-", "t-", "!*", "*" ],
    :date_past => [ "=", ">=", "<=", "><", ">t-", "<t-", "><t-", "t-", "t", "ld", "w", "lw", "l2w", "m", "lm", "y", "!*", "*" ],
    :string => [ "=", "~", "!", "!~", "!*", "*" ],
    :text => [  "~", "!~", "!*", "*" ],
    :integer => [ "=", ">=", "<=", "><", "!*", "*" ],
    :float => [ "=", ">=", "<=", "><", "!*", "*" ],
    :relation => ["=", "=p", "=!p", "!p", "!*", "*"]
  }

#3 Matthias Reinhardt2年以上前に更新

Wow! This was fast :)

One additional thing: support for field names for custom fields would be nice also

#4 Tomohisa Kusukawa2年以上前に更新

  • 関連している Question #1370: assigned_to_id が 「なし」のチケット一覧を表示するにはどうしたら良い? を追加

#5 Tomohisa Kusukawa2年以上前に更新

  • ステータス解決(Resolved) から 終了(Closed) に変更

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