Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I extract the issues linked to the first key resulted from another filter?

Diana Cazacu November 14, 2024

I have the following situation:

- each sprint we create a ticket with issuetype = "Test Plan" (from XRay)

- I have a filter that returns the last open Test Plan -> so just one result (but if someone forgets to close the previous ones, I'll have multiple results ordered by created date)

- I want to extract all the defects linked to that Test Plan in a dynamic way so I don't need to specify the key value every sprint. Is there a way to get those linked items from the first result from the previous filter?

To mention that I cannot use XRay's functions because we are using Jira Cloud, where they don't have their functions implemented.

If anyone has another idea of how I can reach that, it would also be great :).

Thank you.

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Stefan Salzl
Community Champion
November 19, 2024

Hi @Diana Cazacu - welcome to the communtiy,

Is the test plan added to the sprint? At least the first part of your requirement could be done in a better way with follwoing query:

issuetype = "Test Plan" and sprint in openSprints()

 

Unfortunately I wasn´t able to re-use that result either in another query. I tried to save this first query as a filter and reuse the filter in another query for selecting the linked issues (which was described in other posts). Unfortunately the issuefunction linkedIssues() can´t take a filter as parameter :(

So here is what I was trying:

issue in linkedIssues("filter = xxxx")

 

where the filter=xxxx would be the saved filter from the first jql.

 

Do you have Scriptrunner installed and/or are you familiar with scripting and RestAPI/GraphQL API? If it doesn´t necessarily have to be a native JQL there could maybe a solution with some scripting.

I would heartly suggest to reach out to vendors support team. maybe they could give some more details/ideas how this could be done/solved.

Hope I could at least give some ideas even though we could not solve the problem directly. 

 

Best
Stefan

Stefan Salzl
Community Champion
December 2, 2024

Hi @Diana Cazacu 

any feedback?

 

Best
Stefan

Diana Cazacu December 3, 2024

Hi @Stefan Salzl

Thank you for the ideas you sent me. I managed to create the filters, but I didn't try yet to write a script. 

Stefan Salzl
Community Champion
December 3, 2024

Thanks for the feedback @Diana Cazacu 

In case of any further/new question: just let the community/us leaders know ;)

Best
Stefan

TAGS
AUG Leaders

Atlassian Community Events