Script Runner - Creating Subtasks with Parent Summary is not idempotent

Version: JIRA v6.3.15

Using Script Listener, I am successfully able to create subtasks based on the following condition, where my custom field is a multi-checkbox field with multiple selections possible.

'Foo' in cfValues['MyField']*.value && changeItems.any {

When the "Subtask Summary" field was filled out to a constant value (e.g "My Subtask Summary"), the subtasks are created idempotently. 

However, adding the following script to "Additional Issue Actions" causes each update to the parent ticket to create a new Subtask instance, even though the checkbox option(s) selected have not changed:

issue.setSummary("Subtask for: " + sourceIssue.summary)

I would expect this block to have the same idempotency as the static "Subtask Summary" field in the Script Listener configuration.


Is there a way to create subtasks only when an individual checkbox value in a multi-checkbox has changed?



1 answer

The matching of existing subtasks is based solely on the configured summary, so if you modify it in the additional code section, it will create new subtasks.

It's intended for fairly simple use cases such as creating subtasks for Analysis, Design, etc.

If you need to use a computed subtask summary then you will need to roll the thing yourself, which is pretty straightforward to be honest.

That's good to hear, thanks for your response Jamie. Do you know of an example you could link me to of a similar computed subtask summary or some related docs? 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


123 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you