Redmine - Feature #38527
New issues filter operators "has been", "has never been", and "changed from"2023-05-07 11:05 - Go MAEDA

ステータス:

Closed

開始日:

優先度:

Normal

期日:担当者:

Go MAEDA

進捗率:0%

カテゴリ:

Issues filter

予定工数:0.00時間対象バージョン:5.1.0

Resolution:

Fixed

説明
The attached (unfinished) patch adds new filter operators "changed from", "has ever been" and "has never been". The difference
from the existing operators is that they check past values in the journal̲details table. These new operators are available for Status,
Tracker, Priority, Assignee, Target version, and Category filters.
"changed from": selects issues where the value has ever changed from the given value"has ever been": selects issues where the value has ever changed from the given value, or the current value is the given value(equivalent to "changed from" + "is")"has never been": selects issues where the value has never been the given value (the negative of "has ever been")
Examples:[Assignee][has ever been][<< Me >>]: selects issues you have been assigned in the past or are currently assigned to[Assignee][changed from][<< Me >>]: selects issues that were assigned to you in the past but the current assignee is not you[Assignee][has never been][<< Me >>]: selects issues that have never been assigned to you
The following feature requests will be fulfilled if the operators are implemented.
Feature #3001: "Assign to" history in filter or etc.
Patch #3586: Add an option to filter issues by people who were assigned to it in the past
Feature #9714: Custom 'were/was' condition for assignee issuelist filter
Feature #31381: Find change status of issues at custom query
関連するチケット:
関連している Redmine - Feature #3001: "Assign to" history in fi...

Closed2009-03-18

関連している Redmine - Patch #3586: Add an option to filter iss...

Closed2009-07-05

関連している Redmine - Feature #9714: Custom 'were/was' conditi...

Closed関連している Redmine - Feature #31381: Find change status of is...

Closed関連している Redmine - Defect #38788: "has been" and "has never...

Closed

関係しているリビジョン
リビジョン 22240 - 2023-05-11 04:08 - Go MAEDA
New issues filter operators "has been", "has never been", and "changed from" (#38527).
Patch by Go MAEDA.
リビジョン 22241 - 2023-05-11 04:11 - Go MAEDA
Update locales (#38527).
リビジョン 22242 - 2023-05-11 06:04 - Go MAEDA
Fix PostgreSQL error caused by comparing text with integer values (#38527).
リビジョン 22271 - 2023-06-30 11:40 - Go MAEDA"has been" and "has never been" filter operators can be very slow (#38527, #38788).
Patch by Go MAEDA.

履歴2024-10-11

1/5

#1 - 2023-05-07 14:03 - salman mp+10#2 - 2023-05-07 16:21 - Go MAEDA- ファイル 38527.patch を追加
Attached is a completed version of the patch.
#3 - 2023-05-08 05:20 - Go MAEDA- ファイル clipboard-202305081209-apgqr.png を追加- ファイル 38527-v2.patch を追加- 題名 を "changed from", "has ever been", and "has never been" filter operators for issues から "has ever been", "has never been", and "used to be"filter operators for issues に変更
Updated the patch:
Renamed "changed from" to "used to be". It makes it clear that the field has been the value in the past but is different now
Reordered filters. "has * been" comes first, "used to be" comes after. This is because The "has ever been" operator behaves more like the "is"operator than the "used to be" operator ("has ever been" includes the results of "is", but "used to be" does not. "is" + "used to be" = "has everbeen")
clipboard-202305081209-apgqr.png#4 - 2023-05-08 08:32 - Go MAEDA- ファイル 38527-v3.patch を追加- ファイル clipboard-202305081524-n5w0h.png を追加- 題名 を "has ever been", "has never been", and "used to be" filter operators for issues から "has been", "has never been", and "used to be" filter
operators for issues に変更
Updated the patch again. Renamed "has ever been" to "has been".
clipboard-202305081524-n5w0h.png#5 - 2023-05-08 10:43 - Go MAEDA- 対象バージョン を Candidate for next major release にセット
#6 - 2023-05-08 15:20 - Go MAEDA- 関連している Feature #3001: "Assign to" history in filter or etc. を追加- 関連している Patch #3586: Add an option to filter issues by people who were assigned to it in the past を追加- 関連している Feature #9714: Custom 'were/was' condition for assignee issuelist filter を追加- 関連している Feature #31381: Find change status of issues at custom query を追加#7 - 2023-05-09 08:14 - Go MAEDA- ファイル clipboard-202305091503-d1v74.png を追加- ファイル 38527-v4.patch を追加- 題名 を "has been", "has never been", and "used to be" filter operators for issues から "has been", "has never been", and "was" filter operators for
issues に変更
Updated the patch. Renamed "used to be" to "was". This is because the operator may select issues that its current value is the specified one.
For example, suppose that the original author of issue 1 is "Dave Lopper" and the author was changed to another person and then changed back to"Dave Lopper". In this case, the "was" (formerly named "used to be") operator selects issues where the current assignee is "Dave Lopper". The
sentence "Assignee used to be Dave Lopper" does not make sense in this case.

2024-10-11

2/5

clipboard-202305091503-d1v74.png#8 - 2023-05-09 16:09 - Go MAEDA- ファイル 38527-v5.patch を追加- 題名 を "has been", "has never been", and "was" filter operators for issues から "has been", "has never been", and "changed from" filter operators forissues に変更

2024-10-11

3/5

- 対象バージョン を Candidate for next major release から 5.1.0 に変更

This is (probably) the final patch. Operator names are "has been", "has never been", and "changed from".
Setting the target version to 5.1.0.
#9 - 2023-05-11 04:12 - Go MAEDA- 題名 を "has been", "has never been", and "changed from" filter operators for issues から New issues filter operators "has been", "has never been",and "changed from" に変更- ステータス を New から Closed に変更- 担当者 を Go MAEDA にセット
- Resolution を Fixed にセット
Committed the patch in r22240.
With this change, three new operators "has been", "has never been", and "changed from" that search histories of issues are available for thefollowing filters:
TrackerPriority
Assignee
Target version
Category
The operators behave as follows:"has been" operator: finds issues where the given value is either equal to the current value of the field or it was equal to the value of the fieldat some point in the past"has never been" operator: finds issues where the given value is neither equal to the current value of the field nor it has ever been equal to thevalue of the field in the past"changed from" operator: finds issues where the given value was equal to the value of the field at some point in the past
#10 - 2023-05-11 04:35 - Go MAEDA- ステータス を Closed から Reopened に変更
It does not work with PostgreSQL.
Error:
QueryTest#test̲operator̲changed̲from:
ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR:
LINE 1: ...p̲key = 'status̲id' AND journal̲details.old̲value
HINT:

No

operator

matches

thetest/unit/query̲test.rb:146:in
test/unit/query̲test.rb:818:in
rails

test

given

nameandoperator does
IN (2,5)))...

argumenttype(s).

Younotexist:

might

text

need

=

to

integer

add

explicit

type^
casts.

̀find̲issues̲with̲query'̀test̲operator̲changed̲from'test/unit/query̲test.rb:800#11 - 2023-05-11 05:31 - ChunChang (Nagaharu) Lo
Some filters with these operators won't work as expected. For example, if version filter is added and one of these operators is chosen, there is noversion input box or dropdown box to specify version number.
#12 - 2023-05-11 06:24 - Go MAEDA
ChunChang (Nagaharu) Lo wrote in #note-11:
Some filters with these operators won't work as expected. For example, if version filter is added and one of these operators is chosen, there isno version input box or dropdown box to specify version number.

Could you clear your browser cache and try again? r22240 also updated source:trunk/public/javascripts/application.js.
#13 - 2023-05-11 06:25 - Go MAEDA
Go MAEDA wrote in #note-10:
It does not work with PostgreSQL.

2024-10-11

4/5

Fixed in r22242.
#14 - 2023-05-11 07:48 - ChunChang (Nagaharu) Lo
Go MAEDA wrote in #note-12:
Could you clear your browser cache and try again? r22240 also updated source:trunk/public/javascripts/application.js.

Yes. it works after clearing the browser cache.
#15 - 2023-05-11 09:05 - Go MAEDA- ステータス を Reopened から Closed に変更
ChunChang (Nagaharu) Lo wrote in #note-14:
Go MAEDA wrote in #note-12:
Could you clear your browser cache and try again? r22240 also updated source:trunk/public/javascripts/application.js.

Yes. it works after clearing the browser cache.

Thank you for your feedback.
#16 - 2023-06-28 06:46 - Go MAEDA- 関連している Defect #38788: "has been" and "has never been" filter operators can be very slow を追加

ファイル
filter-operators-for-journal-details.patch

5.4 KB2023-05-07

Go MAEDA

38527.patch

7.34 KB

2023-05-07

Go MAEDA

clipboard-202305081209-apgqr.png

155 KB2023-05-08

Go MAEDA

38527-v2.patch

7.37 KB

2023-05-08

Go MAEDA

38527-v3.patch

7.39 KB

2023-05-08

Go MAEDA

clipboard-202305081524-n5w0h.png

149 KB2023-05-08

Go MAEDA

clipboard-202305091503-d1v74.png

123 KB2023-05-09

Go MAEDA

38527-v4.patch

7.49 KB

2023-05-09

Go MAEDA

38527-v5.patch

7.45 KB

2023-05-09

Go MAEDA

2024-10-11

5/5