Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66203

Issue Search broken when using NOT with WAS IN

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.2.8, 7.4.4, 7.5.2, 7.9.2, 7.6.6, 7.6.9, 8.22.3
    • JQL

    Description

      Summary

      JQL searches using NOT and WAS IN causes an Internal Server Error. There are some searches that Jira will not allow you to save as a filter as the search does not execute. But in an edge case, if you have a search calling for another filter, it's possible to save it, but you are not able to load it from Issues > Filter Name.

      Steps to Reproduce

      Scenario 1
      1. Navigate to Issues > Search for issues and try to search for:
        project = TEST AND NOT (status was in (Done)) ORDER BY Rank ASC
        
      Scenario 2
      1. Create one filter with:
        project in (AWD, AWS) AND issuetype in (bug, task, story) AND status was in ("Status 7", open, "Status 8", resolved)
        
      2. Create a second filter:
        status was not Closed AND resolution was in (Duplicate, Done, Fixed) AND NOT filter = first_filter
        
      3. Go back to the Dashboard and try to open the second filter by navigating to Issues > Filter Name.

      Expected Results

      You are able to load the filter without any problems.

      Actual Results

      For the scenario 1:

      You are not able to execute the search and the following error is displayed:

      Error occurred communicating with the server. Please reload the page and try again.

      For the scenario 2:

      You are not able to load the filter and get the following error page:

      The below exception is thrown in the atlassian-jira.log file:

      2017-10-24 16:08:00,746 http-nio-8080-exec-7 ERROR admin 968x123x1 zfc9db 0:0:0:0:0:0:0:1 /issues/ [o.a.c.c.C.[.[localhost].[/jira728].[action]] Servlet.service() for servlet action threw exception
      java.lang.IllegalArgumentException: Unrecognized operator: WAS_IN
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.getNotOperator(DeMorgansVisitor.java:132)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visit(DeMorgansVisitor.java:71)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visit(DeMorgansVisitor.java:28)
      	at com.atlassian.query.clause.WasClauseImpl.accept(WasClauseImpl.java:45)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visitChildren(DeMorgansVisitor.java:92)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visit(DeMorgansVisitor.java:40)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visit(DeMorgansVisitor.java:28)
      	at com.atlassian.query.clause.AndClause.accept(AndClause.java:28)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visit(DeMorgansVisitor.java:34)
      	at com.atlassian.jira.jql.clause.DeMorgansVisitor.visit(DeMorgansVisitor.java:28)
      	at com.atlassian.query.clause.NotClause.accept(NotClause.java:29)
      	at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:53)
      

      Notes

      This bug can lead to broken boards as reported under JRASERVER-65345.

      Workaround

      It is possible to modify the JQL as the example below:

      project = TEST AND status was not Done ORDER BY Rank ASC
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pcora Pedro Cora
              Votes:
              14 Vote for this issue
              Watchers:
              29 Start watching this issue

              Dates

                Created:
                Updated: