I will explain the case for which I need a Single JQL.
We need to query a Jira issue which has a linked issue in and and get the specific fields of both current issue and Linked issue.
For example there is a jira issue called TEST-123 which has a linked issue called SAMPLE-123.
Both the Jira issue has a custom field called Notes.
Now the JQL has to return the custom fields value Notes from the TEST-123 and SAMPLE-123 in single Query.
I know we can get a list of linked issues and then fetch the linked issues required fields but the time to run the script will be longer as we are querying two times.
Please any help me on this.
That would be great.
Thanks,
Queenmary Bastin
Hello Queenmary,
You can use Scriptrunner's JQL issueFunction in linkedIssuesOf("subquery")
For example
project is Test it's key is TES
This will fetch all the issues that are linked to issues in project TES
issueFunction in linkedIssuesOf("project in (TES) and issuetype=bug")
then you just add OR and add JQL for the rest of the issues you want
project = TES and issuetype = bug
Full JQL
ssueFunction in linkedIssuesOf("project in (TES) and issuetype=bug") OR (project = TES and issuetype = bug)
BR, Olga
Hi Olga,
Thank you for your response.
But here what I need is I want to get the custom field for example "Notes" from the linked issues.
Get the linked issue of a Project Test and get the Custom Field named Notes value of the linked issues.
Can you please help on this...
Regards,
Queenmary Bastin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would also like to know if there is an out of box solution for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.