Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.2.0, 7.2.1, 7.3.0, 7.2.2, 7.2.3, 7.2.6, 7.2.7, 7.2.8, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.6, 7.5.4, 7.2.4
-
None
-
7.02
-
22
-
Severity 3 - Minor
-
3
-
Description
Summary
Upgrade to JIRA is breaking boards using the NOT with WAS IN JQL operators in their filter
Environment
- Problem appears to happen on environments upgrading from 7.1.x (or possibly earlier versions) to 7.2/7.3 versions
Steps to Reproduce
- Install JIRA 7.1.9, with JIRA Software
- Create a saved filter with the operators "NOT" that precedes the "WAS IN" (here is an example
"project = ABC AND NOT (Status was in (Done, Resolved) before -30d AND status in (Done, Resolved)) AND assignee = user1 ORDER BY Rank ASC"
- Create a new board based off this saved filter
- upgrade JIRA to 7.2.8 or 7.3.x
Expected Results
JIRA is able to load these boards as expected
Actual Results
- Trying to use the issue navigator when using both "NOT" and "WAS IN" in the same JQL query throws an error
- You are unable to list all the boards in JIRA when going to Boards -> View all boards. (The system just appears to spin and wait forever)
- JIRA throws a 500 page error when tried to either visit the problem board directly, or even trying to visit the associated project landing page
Technical details Log's referral number: 95768191-b294-4121-bb17-df48bdb9c09a Cause Referer URL: http://localhost:8080/plugins/servlet/project-config/ABC/roles java.lang.RuntimeException: java.lang.IllegalArgumentException: Unrecognized operator: WAS_IN java.lang.RuntimeException: java.lang.IllegalArgumentException: Unrecognized operator: WAS_IN at com.atlassian.web.servlet.plugin.DynamicAuthorizationServletForwarder.forward(DynamicAuthorizationServletForwarder.java:55) [?:?] at com.atlassian.web.servlet.plugin.DynamicAuthorizationServletForwarder.forwardSafely(DynamicAuthorizationServletForwarder.java:83) [?:?] at com.atlassian.web.servlet.plugin.SanitizingServletForwarder.forwardSafely(SanitizingServletForwarder.java:48) [?:?] at com.atlassian.web.servlet.plugin.RememberingServletForwarder.forwardSafely(RememberingServletForwarder.java:75)
Notes
- This query works in JIRA 7.1.x and before
- The error appears to include an underscore in the operator Unrecognized operator: WAS_IN, however when looking at the SQL data there does not appear to be an underscore in the query at all. Hence there must be some other check/validation process within JIRA that is either adding this underscore, or is incorrectly checking for the valid operator of "WAS IN".
- Advanced searching - operators reference - Atlassian Documentation still list WAS IN as a valid operator.
- However instead I think we should be using the WAS NOT IN operator here, rather than trying to negate the current WAS IN operator
Workaround
- You can find the filters in your environment that are using this with a query such as
select * from searchrequest where reqcontent like '%was in%' and reqcontent like '%not%';
- It would be best to create a backup of your data before doing anything else
- You will need to edit the filter query within SQL in order to change the JQL query. It would be best for you to note the current values for these filters now.
Old JQL query:project = ABC AND NOT (Status was in (Done, Resolved) before -30d AND status in (Done, Resolved)) AND assignee = user1 ORDER BY Rank ASC
New JQL query:
project = ABC AND (Status was not in (Done, Resolved) before -30d AND status not in (Done, Resolved)) AND assignee = user1 ORDER BY Rank ASC
You could do this with a SQL query such as
update searchrequest set reqcontent='project = ABC AND (Status was not in (Done, Resolved) before -30d AND status not in (Done, Resolved)) AND assignee = user1 ORDER BY Rank ASC' where id=99999;
(where the id 99999 value is the id value of the filter returned in the first sql select statement)
- with the filter changed in SQL, restart JIRA
- This should allow the boards to load correctly.
Attachments
Issue Links
- derived from
-
JRASERVER-65285 NOT function in JQL is not working as expected in JIRA version 7.2 and Above
- Gathering Impact
- is related to
-
JRASERVER-66203 Issue Search broken when using NOT with WAS IN
- Gathering Impact