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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does A-1 also have links to another B that is closed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.)
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.