Defect #11307
Can't filter for negative numeric custom fields
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Custom fields | |||
Target version: | 2.0.4 | |||
Resolution: | Fixed | Affected version: | 1.4.3 |
Description
Trying to filter issues for negative custom field integers (and possibly other integers) doesn't work due to the regex under the "when :integer" clause in validate_query_filters
in source:trunk/app/models/query.rb, which doesn't allow a leading sign.
I have it in 1.4.3, but I see that the issue is in trunk also, on line 177. I fixed it in my version by replacing the regex with:
/^[+-]?\d+$/
Associated revisions
Fixed: Can't filter for negative numeric custom field (#11307).
History
#1
Updated by Jean-Philippe Lang over 10 years ago
- Target version set to 2.0.4
#2
Updated by Jean-Philippe Lang over 10 years ago
- Subject changed from Can't filter for negative custom field integers to Can't filter for negative numeric custom fields
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Fixed in r9908 for floats as well. Thanks for pointing this out.
#3
Updated by Jean-Philippe Lang over 10 years ago
- Status changed from Resolved to Closed
Merged in 1.4 and 2.0.