Parent ticket is cancelled all child & linked Issues need to be cancelled transition

SAMUEL March 17, 2024

Hello

 

We have parent is linked with all child tickets and Linked Issues . When teams cancelled parent ticket status need move to automatically  all child issues and linked issues to cancelled state... I did with couple of scenarios but getting an error?

 

Condition:

parentIssue.ChildIssues.every(it.get("status").name == "Cancelled"

parentIssue.LinkedIssues.every(it.get("status").name == "Cancelled"

 

Transition id: 81

 

Additional Code : Script Context:

Map addComment = transition.update.comment(0).add as Map

addComment.body = "$(issue.key) caused this to be transitioned"

 

Can anyone please help me or suggest me the script

 

1 answer

1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 17, 2024

Hi Samuel,

You can easily do this with an Automation Rule and no code. Here is an example of something similar:

Screenshot.png

SAMUEL March 18, 2024

@John Funk  We don't want to do with the automation rule because we have more than 100 projects..  For the long time usage, we want to use script runner post functions workflow.

 

Do you know any scripts or code for request scenarios?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2024

No I don't. But I also don't understand your argument against an automation rule. That would seem to be less maintenance in the long run. What exactly about the rule would not work for you? 

Suggest an answer

Log in or Sign up to answer