-
Bug
-
Resolution: Fixed
-
Highest
-
4.20.1
-
5
-
Severity 1 - Critical
-
32
-
Issue Summary
IQL+JQL search in Insight is slower when connectedTickets() contains additional arguments
Steps to Reproduce
- Launch an Insight search over an object type that has connected tickets in Jira by using the connectedTickets() function and add some parameter to the JQL function to identify only certain Jira issues Ex.
- Create 2 projects (TEST and TEST2) and 2 Insight custom fields (test associated with project TEST1 and and test2 associated with project TEST2) and a total of 13 issues for the 2 projects and containing values for both custom fields.
- Custom field test is filtering on object type Service Catalogue and custom field test1 is associated with object type Service type.
#2 issues are in status Work in progress in project test and only 2 issues exists in project test2 (with custom field associated with object type Service type).
#When launching:
*objectType = "Service Catalogue" AND object HAVING connectedTickets()*
there is no JQL search initiated at all for returning the results.
When launching:
*objectType = "Service Catalogue" AND object HAVING connectedTickets(status!="Work in progress")*
and adding status!="Work in progress" the JQL search is made through:
issue_id:(10100 10101 10102 10103 10104 10105 10106 10107 10108 10201 10202)
/rest/insight-am/1/search [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {ISSUE in (10100, 10101, 10102, 10103, 10104, 10105, 10201, 10106, 10202, 10107, 10108)} AND {status != "Work in progress"}
where issues with IDs 10201 10202 are belonging to test2 where the custom field is filtering on object type Service Type.
Therefore the SQL will be much slower as it will query all the issues with Insight custom fields disregarding of the object type filtered in IQL.
Expected Results
The JQL should search through issues which are connected to the Insight custom field filtering only over the IQL filtered object type
Actual Results
The JQL search is performed within all the issues with Insight custom fields disregarding of the object type filtered in IQL.
Workaround
Currently there is no known workaround for this behavior apart from specifying the issues ID in the JQL such as jql: issue in (issueIDs)
We are affected on JSM 5.4.7. Please backport this bug fix over to JSM 5.4 LTS