Feature #28660

Change default operator for text format custom fields from "is" to "contains"

Added by Go MAEDA 26 days ago. Updated 13 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues filter
Target version:4.0.0
Resolution:Fixed

Description

When a user adds a filter for text format custom fields on "Issues" page, default operator for the filter is "is". But I think it should be "contains" because the default operator for other filters for text objects such as "Subject" and "description" is "contains". And in my experience, we often use partial match than exact matches for text fields.

From the viewpoint of consistency and convenience, I suggest changing the default operator for text format custom fields from "is" to "contains".

default-operator.png (24.5 KB) Go MAEDA, 2018-04-29 11:07

Associated revisions

Revision 17331
Added by Go MAEDA 13 days ago

Change default operator for text format custom fields from "is" to "contains" (#28660).

Patch by Go MAEDA.

History

#1 Updated by Yuuki NARA 26 days ago

+1

#2 Updated by Go MAEDA 26 days ago

The following patch changes the order of operators and makes "contains" default.

Index: app/models/query.rb
===================================================================
--- app/models/query.rb    (revision 17315)
+++ app/models/query.rb    (working copy)
@@ -272,7 +272,7 @@
     :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 => [ "=", "~", "!", "!~", "!*", "*" ],
+    :string => [ "~", "=", "!~", "!", "!*", "*" ],
     :text => [  "~", "!~", "!*", "*" ],
     :integer => [ "=", ">=", "<=", "><", "!*", "*" ],
     :float => [ "=", ">=", "<=", "><", "!*", "*" ],

#3 Updated by Go MAEDA 22 days ago

  • Target version set to Candidate for next major release

#4 Updated by Mizuki ISHIKAWA 17 days ago

+1
I think that few people search by exact match.
I am searching by always change the operator to "contains".

#5 Updated by Go MAEDA 17 days ago

  • Target version changed from Candidate for next major release to 4.1.0

I think this change should improve usability. Setting target version to 4.1.0.

#6 Updated by Go MAEDA 13 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0
  • Resolution set to Fixed

Committed.

Also available in: Atom PDF