Feature #38527
closedNew issues filter operators "has been", "has never been", and "changed from"
0%
Description
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")
- [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.
Files
Related issues
Updated by Go MAEDA over 1 year ago
- File 38527.patch 38527.patch added
Attached is a completed version of the patch.
Updated by Go MAEDA over 1 year ago
- File clipboard-202305081209-apgqr.png clipboard-202305081209-apgqr.png added
- File 38527-v2.patch 38527-v2.patch added
- Subject changed from "changed from", "has ever been", and "has never been" filter operators for issues to "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 ever been")
Updated by Go MAEDA over 1 year ago
- File 38527-v3.patch 38527-v3.patch added
- File clipboard-202305081524-n5w0h.png clipboard-202305081524-n5w0h.png added
- Subject changed from "has ever been", "has never been", and "used to be" filter operators for issues to "has been", "has never been", and "used to be" filter operators for issues
Updated the patch again. Renamed "has ever been" to "has been".
Updated by Go MAEDA over 1 year ago
- Target version set to Candidate for next major release
Updated by Go MAEDA over 1 year ago
- Related to Feature #3001: "Assign to" history in filter or etc. added
- Related to Patch #3586: Add an option to filter issues by people who were assigned to it in the past added
- Related to Feature #9714: Custom 'were/was' condition for assignee issuelist filter added
- Related to Feature #31381: Find change status of issues at custom query added
Updated by Go MAEDA over 1 year ago
- File clipboard-202305091503-d1v74.png clipboard-202305091503-d1v74.png added
- File 38527-v4.patch 38527-v4.patch added
- Subject changed from "has been", "has never been", and "used to be" filter operators for issues to "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.
Updated by Go MAEDA over 1 year ago
- File 38527-v5.patch 38527-v5.patch added
- Subject changed from "has been", "has never been", and "was" filter operators for issues to "has been", "has never been", and "changed from" filter operators for issues
- Target version changed from Candidate for next major release to 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.
Updated by Go MAEDA over 1 year ago
- Subject changed from "has been", "has never been", and "changed from" filter operators for issues to New issues filter operators "has been", "has never been", and "changed from"
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to 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 the following filters:
- Tracker
- Priority
- 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 field at 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 the value 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
Updated by Go MAEDA over 1 year ago
- Status changed from Closed to Reopened
It does not work with PostgreSQL.
Error: QueryTest#test_operator_changed_from: ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR: operator does not exist: text = integer LINE 1: ...p_key = 'status_id' AND journal_details.old_value IN (2,5)))... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. test/unit/query_test.rb:146:in `find_issues_with_query' test/unit/query_test.rb:818:in `test_operator_changed_from' rails test test/unit/query_test.rb:800
Updated by ChunChang (Nagaharu) Lo over 1 year ago
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 no version input box or dropdown box to specify version number.
Updated by Go MAEDA over 1 year ago
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 is no 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.
Updated by ChunChang (Nagaharu) Lo over 1 year ago
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.
Updated by Go MAEDA over 1 year ago
- Status changed from Reopened to 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.
Updated by Go MAEDA over 1 year ago
- Related to Defect #38788: "has been" and "has never been" filter operators can be very slow added