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

1 vote
Accepted answer
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
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,752 views 3 11
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