Project

General

Profile

Actions

Feature #19093

open

Make numeric custom fields searchable

Added by Felix Schäfer about 9 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

We're a little surprised the numeric custom fields aren't searchable. Is this an intentional limitation, and if so why, or is it just not implemented? Thanks!


Related issues

Has duplicate Redmine - Feature #19475: Allow custom field (Integer) to be searchableClosed

Actions
Actions #1

Updated by Mischa The Evil about 9 years ago

Hi Felix,

It is explicit design, see #13385. Only StringFormat, TextFormat and ListFormat classes are searchable by default (see source:/trunk/lib/redmine/field_format.rb@13994#L60 and further).

Actions #2

Updated by Felix Schäfer about 9 years ago

Hi Mischa,

Mischa The Evil wrote:

Only StringFormat, TextFormat and ListFormat classes are searchable by default (see source:/trunk/lib/redmine/field_format.rb@13994#L60 and further).

I do understand the code and that the code prevents me/our client of setting the custom field as searchable, but neither the code nor what I could find of the history of the code explained why it was decided to not make them sortable.

However:

It is explicit design, see #13385.

At the very end in #13385#note-13, JP explains that:

Integers, floats and bools are not searchable because it doesn't make much sense to search these values for those that contain a certain string. A better option is to use filters on the issue list for these fields.

I can understand not wanting to search numeric fields for strings, but that optimisation should not be done by disabling the search altogether for those fields, but by not searching on those fields if there is no numeric-only token in the search.

Mischa, thanks for the link, this helped me a lot and I can now forward those findings!

Actions #3

Updated by Jean-Philippe Lang about 9 years ago

I though there was no use case for searching for numbers that contain a number (eg. searching for 16 would return values like 161, 516...). Do you have an example where it would make sense?

Actions #4

Updated by Felix Schäfer about 9 years ago

Jean-Philippe Lang wrote:

I though there was no use case for searching for numbers that contain a number (eg. searching for 16 would return values like 161, 516...). Do you have an example where it would make sense?

I'm waiting for feedback from our customer on that :-)

Thanks for chiming in!

Actions #5

Updated by Go MAEDA about 9 years ago

  • Has duplicate Feature #19475: Allow custom field (Integer) to be searchable added
Actions #6

Updated by Joel Bearden over 7 years ago

I have a use case. For our feature/defect tracking system, we use a unique integer key to align a ticket with a feature request for internal purposes. Using the Redmine API, we auto-create issues and need to leverage the "integer key" as a primary key. Without being able to search for this integer key, this workflow is not possible.

Actions #7

Updated by Florian Nicolet about 7 years ago

I use an integer custom field for an id in an other system.
So it would be nice if integer field will be searchable.
thanks in advance

Actions #8

Updated by Christopher Maximov over 6 years ago

Same like the others. We are using integer custom field as a additional ticket number which is customer facing as opposed to redmine issue-id which is used only internally. Ability to make this searchable would be of great benefit.

Actions

Also available in: Atom PDF