Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-6633

Service Desk queues show as empty in the UI if a queue is using an incorrect JQL query involving the Elements Connect Add-on fields

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Tracked Elsewhere
    • None
    • Queues
    • None
    • 1
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Issue Summary

      When using the Elements Connect add-on, Service Desk allows to configure queues with an invalid JQL query involving field coming from this add-on.

      When doing so, the following happens:

      • all the queues disappear from the UI and the following message is displayed:
        You have no queues
        You may want to create a queue
        
      • the following error is thrown in the Jira logs if the queue is involving a custom field from the add-on Elements Connect:
        2019-11-11 11:42:12,913 http-nio-8080-exec-5 ERROR julien 702x6255x2 1ji4dn9 0:0:0:0:0:0:0:1 /rest/issueNav/1/issueTable [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
        java.lang.NullPointerException
        	at com.valiantys.jira.plugins.sql.searcher.NFeedCustomFieldClauseQueryFactory.computeMultiValueOperandForLikeComparison(NFeedCustomFieldClauseQueryFactory.java:129)
        	at com.valiantys.jira.plugins.sql.searcher.NFeedCustomFieldClauseQueryFactory.computeOperandFromClause(NFeedCustomFieldClauseQueryFactory.java:106)
        	at com.valiantys.jira.plugins.sql.searcher.NFeedCustomFieldClauseQueryFactory.getQuery(NFeedCustomFieldClauseQueryFactory.java:78)
        	at com.atlassian.jira.jql.query.ContextAwareQueryVisitor.visit(ContextAwareQueryVisitor.java:97)
        	at com.atlassian.jira.jql.query.ContextAwareQueryVisitor.visit(ContextAwareQueryVisitor.java:25)
        	at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:143)
        	at com.atlassian.jira.jql.query.ContextAwareQueryVisitor.visit(ContextAwareQueryVisitor.java:55)
        	at com.atlassian.jira.jql.query.ContextAwareQueryVisitor.visit(ContextAwareQueryVisitor.java:25)
        	at com.atlassian.query.clause.AndClause.accept(AndClause.java:28)
        	at com.atlassian.jira.jql.query.QueryVisitor.createQuery(QueryVisitor.java:51)
        	at com.atlassian.jira.jql.query.DefaultLuceneQueryBuilder.createLuceneQuery(DefaultLuceneQueryBuilder.java:29)
        	at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.createLuceneQuery(LuceneSearchProvider.java:331)
        	at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:216)
        	at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:362)
        	at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:135)
        	... 2 filtered
        

      Steps to reproduce

      1. Install the 3rd party add-on Elements Connect
      2. Create a new custom field of type "Elements Connect" with the name "TEST nFeed Field"
      3. Create a new Service Desk project called "BASICSD"
      4. Go to the issue search page and write a new advanced JQL query by intentionally changing the name of the custom field from "TEST nFeed Field" to "test nFeed Field". Note that the search fails -> Expected behavior
      5. Go to the Service Desk queue page, and create a new queue using the same JQL query:
        project = BASICSD AND "test nFeed Field"  ~ "word"
        
      6. Observe that the queue does not complain about the validity of this query (the query is shown as "green" and no error is thrown in the UI):
      7. Save the queue

      Expected results

      The queue should not be saved, since the JQL query is invalid

      Actual results

      The following happens:

      Suggested solution

      The entire queue page should not be empty even if one queue contains an invalid JQL query, or at least there should be an explicit message in the UI to lead the user to the root cause of the issue.

      Note

      This issue was only reproduced so far with the 3rd party add-on Elements Connect.

      We believe the reason why we can only reproduce with this add-on is because:

      • Jira assumes that any custom field is case insensitive, which is the case for Jira's out-of-the-box fields. For example, the JQL query below will work in both the issue search and the queue configuration page, even though the actual name of the custom field is "Time to resolution" and not "Time to resolution"
        project = BASICSD AND "TIME to resolution" = breached() 
        

      • However, it seems that the custom fields coming from the add-on Elements Connect are not case insensitive, therefore if any custom field is referred to with the incorrect case in a JQL query, the issue search will return an error, but the Service Desk queues will still be saved and then will show as empty

      For this reason, we are moving the type of this ticket from a bug to a suggestion ticket, since the queues are working as expected when no 3rd party add-on is involved.

      Attachments

        1. Picture1.png
          Picture1.png
          123 kB
        2. Picture2.png
          Picture2.png
          84 kB
        3. Picture3.png
          Picture3.png
          78 kB
        4. Picture4.png
          Picture4.png
          206 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jrey Julien Rey
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync