It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I have a project A and B, and tickets under those two projects were linked each other. I'd like to find out all the tickets in A that has linked to ticket B which have closed status. Is this possible?
Here is my query but it didn't work.
project = Project_A AND issueFunction in linkedIssuesOf("project=Project_B and status=Closed", "link_type")
That looks right, but link_type should be the link direction, eg "duplicates" or "is duplicated by".
Check the docs: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_linkedissuesof
Hi Jamie,
First, thank you for your quick response. However, the query above also returns tickets under Project_A that have linked to ticket B which is not closed. Is it bug?
For example, A ticket A-1 (parent to) linked to a ticket B-1 (child to). ('parent to' and 'child to' are link directions). Although the ticket B-1 is not closed status, A-1 is found in my script runner 'linkedIssueOf' issue function.
Sorry for the belate reply. I couldn't comment/question more than twice per day.
Anyway, my answer to your question is No. BTW, the ticket A-1 has same link types to another project tickets C-1, C-2 ..etc that were closed.
Can you modify your query to add "and key = ABC-1", where that issue is one that you think should not be returned by your query. Then paste a screen shot of the issue and the actual query.
If you have confidential information you can't redact you can create a support ticket at productsupport.adaptavist.com/servicedesk/customer/portal/2
The following is working:
project = Proj_A AND NOT issueFunction in linkedIssuesof("project = Proj_B and status in (Opened, Assigned, 'In Progress', Resolved)") AND issuefunction in linkedIssuesof("project = Proj_B and status = Closed")
Hi Jamie,
Actually, I was wrong on your question of "Does A-1 also have links to another B that is closed?". Yes, A-1 has links to another B that is closed. Apparently, I overlooked 'Show xx more links' to get the entire list of links. Therefore, A-1 is linked to B-1 and B-2, and only one of B tickets got closed.
Question 1: Is this an expected behavior?
Question 2: What should the query be if I want to find all the A tickets which linked tickets under project B are ALL closed. (Kim mentioned another query above, and the query seems working. The last two phrases - "NOT issueFunction in linkedIssuesof("project = Proj_B and status in (Opened, Assigned, 'In Progress', Resolved)") " and "AND issuefunction in linkedIssuesof("project = Proj_B and status = Closed")" sounds same to me. I wonder why this query results differently than mine above.)
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreAtlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.