Feature #38527
closed
New issues filter operators "has been", "has never been", and "changed from"
Added by Go MAEDA over 1 year ago.
Updated over 1 year ago.
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")
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.
Files
Attached is a completed version of the patch.
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 the patch again. Renamed "has ever been" to "has been".
- Target version set to Candidate for next major release
- 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 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.
- 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.
- 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
- 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
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.
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.
Go MAEDA wrote in #note-10:
It does not work with PostgreSQL.
Fixed in r22242.
- Status changed from Reopened to Closed
- Related to Defect #38788: "has been" and "has never been" filter operators can be very slow added
Also available in: Atom
PDF