Feature #19093
open
Make numeric custom fields searchable
Added by Felix Schäfer almost 10 years ago.
Updated about 7 years ago.
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!
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!
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?
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!
- Has duplicate Feature #19475: Allow custom field (Integer) to be searchable added
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.
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
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.
Also available in: Atom
PDF