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

Accepted Answer
1 vote
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
Community showcase
Posted Oct 11, 2018 in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

2,550 views 5 6
Join discussion

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