-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 4.20.9
-
Component/s: Assets - Jira Field & JQL
-
None
-
1
-
Severity 3 - Minor
Issue Summary
This is reproducible on Data Center: (yes)
Insight Method ObjectTicketsEntry is not returning all issues by default. The documentation at Interface ObjectTicketFacade does not inform that the default behavior when used without filters does not return all issues, but only issues opened – the closed ones don't return.
Then the users may imply that by default without any filters, all tickets should be returned by the method.
This ticket is to update the documentation.
Added this suggestion ticket to consider expanding the functionality https://jira.atlassian.com/browse/JSDSERVER-12429
Steps to Reproduce
1- Having an Insight object with issues linked to it. One or more should be in the closed state.
2- Running the following script below, only issues not closed are returned for the object mentioned (AS-37147 in this example)
import com.atlassian.jira.component.ComponentAccessor; // Insight imports; import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade; import com.riadalabs.jira.plugins.insight.services.model.ObjectBean; import com.riadalabs.jira.plugins.insight.channel.external.api.facade.model.ObjectTicketsEntry; import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectTicketFacade; import com.onresolve.scriptrunner.runner.customisers.WithPlugin; @WithPlugin("com.riadalabs.jira.plugins.insight") String key = "AS-37147" ObjectFacade of = ComponentAccessor.getOSGiComponentInstanceOfType(ObjectFacade); ObjectTicketFacade objectTicketFacade = ComponentAccessor.getOSGiComponentInstanceOfType(ObjectTicketFacade); ObjectBean objectBean = of.loadObjectBean(key); ObjectTicketsEntry tickets = objectTicketFacade.findTicketsForObject(objectBean.getId(), null, null); tickets.getIssueKeys()
Expected Results
All issues including the closed ones should be returned.
Actual Results
Only non-closed issues return.
Workaround
- Create a search to display all issues from your project (ALL open, closed, etc). The JQL may be like this:
project = <YOURPROJECTHERE> ORDER BY priority DESC, updated DESC - Save this search
- Export the search as XML to get its JQL ID
Add the JQL ID to your method parameter as displayed below and all issues will be displayed:

- mentioned in
-
Page Loading...