It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
I want to write an Automation rule that only adds sub-tasks if that sub-task doesn't exist yet on an issue. Is this possible with Automation for JIRA?
Once again the compare condition (see all our rule components) can help here with smart-values:
Project automation - Code Barrel JIRA 2016-09-21 10-16-13.png
So this rule uses the compare condition to create a string out of all existing subtask summaries. If no subtasks exist yet, then it will simply be the empty string. However otherwise it will concatenate all existing subtask summaries separated by a space character. We then check using a regular expression if this string contains the subtask summary of the new subtask we want to create yet ("my awesome subtask") in this case.
Only if the existing subtask summaries don't match this string yet (i.e. it doesn't exist), will the rule continue and create our 1 sub-task with the summary "my awesome subtask".
The extra space inside this smart-value completion is important (it separates the subtask summaries by a space if there's multiple subtasks):
{{#issue.fields.subtasks}}{{fields.summary}} {{/issue.fields.subtasks}}
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.