Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues filter
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

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

filter-operators-for-journal-details.patch (5.4 KB) filter-operators-for-journal-details.patch Go MAEDA, 2023-05-07 11:04
38527.patch (7.34 KB) 38527.patch Go MAEDA, 2023-05-07 16:19
clipboard-202305081209-apgqr.png (155 KB) clipboard-202305081209-apgqr.png Go MAEDA, 2023-05-08 05:09
38527-v2.patch (7.37 KB) 38527-v2.patch Go MAEDA, 2023-05-08 05:16
38527-v3.patch (7.39 KB) 38527-v3.patch Go MAEDA, 2023-05-08 08:19
clipboard-202305081524-n5w0h.png (149 KB) clipboard-202305081524-n5w0h.png Go MAEDA, 2023-05-08 08:24
clipboard-202305091503-d1v74.png (123 KB) clipboard-202305091503-d1v74.png Go MAEDA, 2023-05-09 08:03
38527-v4.patch (7.49 KB) 38527-v4.patch Go MAEDA, 2023-05-09 08:14
38527-v5.patch (7.45 KB) 38527-v5.patch Go MAEDA, 2023-05-09 16:09

Related issues

Related to Redmine - Feature #3001: "Assign to" history in filter or etc.Closed2009-03-18

Actions
Related to Redmine - Patch #3586: Add an option to filter issues by people who were assigned to it in the pastClosed2009-07-05

Actions
Related to Redmine - Feature #9714: Custom 'were/was' condition for assignee issuelist filterClosed

Actions
Related to Redmine - Feature #31381: Find change status of issues at custom query Closed

Actions
Related to Redmine - Defect #38788: "has been" and "has never been" filter operators can be very slowClosedGo MAEDA

Actions
Actions #1

Updated by salman mp over 1 year ago

+10

Actions #2

Updated by Go MAEDA over 1 year ago

Attached is a completed version of the patch.

Actions #3

Updated by Go MAEDA over 1 year ago

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")

Actions #4

Updated by Go MAEDA over 1 year ago

Updated the patch again. Renamed "has ever been" to "has been".

Actions #5

Updated by Go MAEDA over 1 year ago

  • Target version set to Candidate for next major release
Actions #6

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
Actions #7

Updated by Go MAEDA over 1 year ago

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.

Actions #8

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.

Actions #9

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
Actions #10

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
Actions #11

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.

Actions #12

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.

Actions #13

Updated by Go MAEDA over 1 year ago

Go MAEDA wrote in #note-10:

It does not work with PostgreSQL.

Fixed in r22242.

Actions #14

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.

Actions #15

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.

Actions #16

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
Actions

Also available in: Atom PDF