-
Suggestion
-
Resolution: Tracked Elsewhere
-
None
-
None
-
1
-
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
- Install the 3rd party add-on Elements Connect
- Create a new custom field of type "Elements Connect" with the name "TEST nFeed Field"
- Create a new Service Desk project called "BASICSD"
- 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
- Go to the Service Desk queue page, and create a new queue using the same JQL query:
project = BASICSD AND "test nFeed Field" ~ "word"
- 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):
- Save the queue
Expected results
The queue should not be saved, since the JQL query is invalid
Actual results
The following happens:
- the queue is saved
- after that, it is impossible to view any queue from the UI
- the only way to fix this issue is to follow the workaround from the KB article JIRA Service Desk Queues return empty page
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.