Description
Summary
JQL query doesn't return matching issues if fixVersion field is a numeric string (123) instead of traditional version float/double value (1.2.3). Only queries with exact matching fixVersion = 123 returns expected result(s)
In the background:
- If a float/double value is searched for - looks like Lucene takes it as the field value (vname column)
- If an integer/string is searched for - it seems Lucene considers it the field string (id column)
Environment
- Tested on 7.6.9
Steps to Reproduce
- Create a version which is an numeric string like viz., '100' and not 1.0.0
- Assign the version as the fixVersion on an issue
- JQL search with project = XYZ and fixVersion was 100
the above would not show any result
- JQL search with project = XYZ and fixVersion = 100
the above will show result
Expected Results
Since it's valid to enter any varchar value in Version ("vname" column), the expected behaviour would be to get results against project = XYZ and fixVersion was 100
jira769=> \d+ projectversion Table "public.projectversion" Column | Type | Modifiers | Storage | Stats target | Description -------------+--------------------------+-----------+----------+--------------+------------- id | numeric(18,0) | not null | main | | ... vname | character varying(255) | | extended | | ...
Actual Results
Here's my projectversion table:
jira769=> select * from projectversion ; id | project | vname | description | sequence | released | archived | url | startdate | releasedate -------+---------+-------+-------------+----------+----------+----------+-----+-----------+------------- 10000 | 10100 | 10 | 1000 | 1 | | | | | 10001 | 10100 | 20 | 2000 | 2 | | | | | (2 rows)
- JQL project = uyfkhgf AND fixVersion was 10 doesn't return matching issue(s)
- JQL project = uyfkhgf AND fixVersion was 10000 shows matching issue(s)
- JQL project = uyfkhgf AND fixVersion = 10 shows matching issue(s)
Workaround
- Use the field string (id) value in your JQL query
- For older Jira version (6.4.13) where we could enter double-quotes (fixVersion was "10") in the JQL query) it would work