Details
-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
3
-
Severity 3 - Minor
-
Description
Summary
Certain words are breaking the JQL when using the CONTAINS (~) operator
Using two reserved words together will break the search as well.
Steps to Reproduce
- Have an existing filter, or new query using the CONTAINS operator ~ more than once: i.e. field ~ <value 1> AND field ~ <value 2> AND field ~ <value 3>
Expected Results
- The query returns the results successfully.
Actual Results
If you have an existing filter, you may get a 500 error with the following exception:
java.lang.IllegalArgumentException: Unable to transform boolean query to SQL predicate: '' at com.atlassian.jira.jql.dbquery.LuceneQueryToTsQueryTransformer.lambda$null$0(LuceneQueryToTsQueryTransformer.java:46) [classes/:?] at java.util.Optional.orElseThrow(Optional.java:290) [?:1.8.0_131] at com.atlassian.jira.jql.dbquery.LuceneQueryToTsQueryTransformer.lambda$transformInternal$1(LuceneQueryToTsQueryTransformer.java:46) [classes/:?] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) [?:1.8.0_131] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:1.8.0_131] at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) [?:1.8.0_131] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:1.8.0_131] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [?:1.8.0_131] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) [?:1.8.0_131]
Notes
- There are certain words when used together break the search.
For instance, if you use text ~. AND text ~ NA the query will break. - Outside the reserved words, here are some of the terms that breaking the search.
Note the list is not definitive:text ~. text ~ "a" (applicable to any single letter) text ~ "will" text ~ "no" text ~ NA
- This will also affect gadgets that are using broken filters as well.
Workaround
None