Create Task if Issue Contains Label

I'm trying to use Automation for JIRA to do the following:

1. If a task is updated:

2. If the task's Status is "Done"

3. If the task contains a label "xyz"


Create a linked task

Is this possible do a conditional to check if an issue has a specific label? I don't see any references to labels within the Smart Fields. I've tried many combinations including {{issue.labels}}, {{issue.fields.labels}}, and {{}} but it doesn't trigger.

1 answer

1 accepted

This widget could not be displayed.
Andreas Knecht Community Champion Jan 08, 2018

Hi Stephen,

You should be able to simply use our JQL condition for this use case. So your rule would look something like this:

  • Trigger: Issue updated
  • JQL conditoin: status = Done AND labels = xyz
  • Create issue (and set the linked issue field to 'trigger issue')

Hope that helps!

Also just for reference, labels is a multi-value field. To print out a comma separated list of all of them you'd need:

{{#issue.labels}}{{.}}, {{/}}

You can use a 'Log action' to debug this. It will write the value to the rule's audit log.


Thanks, this worked!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 9 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

52 views 0 8
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