In JIRA, is there a function that allows for automating closure of linked tickets? If I have a ticket (ticket A) that is linked to another in a different queue (ticket B), either as dependent on or related to, and the other team closes ticket B, can that closure trigger ticket A to be auto-closed? Ideally with notification to owner and watchers of ticket A.
In the case of multiple links in a single ticket, ideally the logic would be that the project ticket would auto-close after all of the linked tickets are closed
Hi Daniel,
Thanks much for your response, we have scriptrunner and I will be grateful if you could help me with a script to achieve auto close particular issue type only.
Also, at times there may be more than 1 linked 'depends on'.
Please help. Appreciate your heads-up here.
Thanks
For a single issue type you just need to adapt the JQL like "project = TEST AND issuetype = Bug" for example.
It is not really a script needed there, you can use Script Runner (Script Jobs / Escalation Service).
https://scriptrunner.adaptavist.com/6.14.0/jira/ScriptJobs.html
https://scriptrunner.adaptavist.com/6.14.0/jira/escalation-service.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes Daniel, But escalation service help on auto close with the status of an issue.
Does this service help us to have an issue auto closed when linked issue(s) are closed with 'depends on' link type ? If yes could you please route me.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, this is is already basically covered by the following part of JQL I posted above:
[..snip..] issueFunction in linkedIssuesOf("status = Closed")
and can be extended like this is you wish
[..snap..] issueFunction in linkedIssuesOf("status = Closed", "depends on")
What is absolutely true for this powerful implementation - a hour or two of testing is needed for sure.
Here is the extensive documentation for all further fine tuning
https://scriptrunner.adaptavist.com/6.14.0/jira/jql-functions.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi DaniI,
I created the job schedule as suggested but no luck.
JQL : project = "Product Security" AND resolution = Unresolved AND issueFunction in linkedIssuesOf("status=closed","depends on")
Please help
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 tested it - and it works. But with a correction:
in the last part the direction of the destination link is necessary - so not "depends on" for example but instead "is depending on" (please check how it is correctly named in your instance
[...] issueFunction in linkedIssuesOf("status=closed","is depending on")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
You are peach :D :)
It works but the issue is closed if any one child issue is closed.
Request will be completed when all linked issues are closed.. need the source issue to be closed. Will any alteration help here ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right - it works actually only with one issue.
There is a similar question in Community (from 2019), I have not tested it and cannot guarantee if it works.
Here is some alternative approach - but this would need a different App then the mentioned:
Apart from that I am out of idea, unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anusha,
welcome to Atlassian Community!
You could do something like this for example with Script Runner (Script Jobs / Escalation Service).
I used to implement this in the past for a use case that reads:
- an issue in project ACCOUNT
- that is currently in status "on hold"
- should be closed (you can define this in the Script Job section as well)
- as soon the/all linked issue(s) is/are closed
project = ACCOUNT AND status = "On Hold" AND issueFunction in linkedIssuesOf("status = Closed")
Please note this depends on if you already have Apps that are capable of fulfilling this requirement. In the example Script Runner was used but there are probably other Apps from Marketplace which are also suitable.
Please note: the App in question needs extra payment.
There is also Automation from Atlassian - but this is nowaways extremely popular with Cloud.
You mentioned server why I wanted to share the approach using Script Runner.
Cheers,
Daniel
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.