Details
-
Bug
-
Resolution: Timed out
-
Low
-
2
-
Severity 2 - Major
-
0
-
Description
Summary
Based on the Advanced searching, the "id" field reference supports these operators:
- >
- >=
- <
- <=
This works as expected when specifying a valid issue id. For example, searching for "id < 10005" will correctly return issues with issue ids 10004, 10003, 10002, etc (if they exist).
However, when using this operator, and specifying an invalid issue id (issue id does not exist), it is expected that the JQL should return the results, even though the specified issue id does not exist, instead of the search completely failing and returning no results. (Read "Steps to Reproduce" for more detailed information)
Steps to Reproduce
- Go to issue navigator.
- Type in this query:
id < 12345
– Note: this issue id shouldn't refer to an existing issue id in the instance. If it does, change it to something else.
Expected Results
The JQL should return all issues with issue ids less than 12345. For example, 12344, 12343, etc.
Actual Results
The search fails, and this error message is returned:
A value with ID '12345' does not exist for the field 'id'.
Notes
Also affects the REST API endpoint "GET /rest/api/2/search?jql". A "400 Bad Request" error will be returned.
Workaround
Rather than comparing with non-existing id find out the existing id where comparison would bring the same results. E.g. having ids of 1, 5 and 10, and intention to run jql id < 4, find the next id value of existing issue (5 in this case) and rewrite the jql to id < 5.