Hello. What woudl be jql so that tasks under a jira story would inherit story,s labels.

Amruta Abhyankar May 15, 2023

My team is creating jira stories and under them they are mapping tasks.

Everytime they create a task under a story they have to add same labels they have added for the said story. 

Need a jql so that tasks under a story would automatically have story's labels. 

Any clue ? 

1 answer

1 accepted

2 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2023

Hi @Amruta Abhyankar and welcome to the Community!

You are a bit on a wrong track there, I'm afraid. JQL (or Jira Query Language) just helps you define search criteria to find (a list of) issues. It does not update anything for you.

Another issue with your question is that you cannot create tasks under a story. Those would be sub-tasks instead.

But, assuming that that is just a terminology thing, you would rather need an automation rule that updates a sub-task when it is added to a story. Such a rule would consist of the following components:

  • Trigger: issue created
  • Condition: issuetype = sub-task (so it only runs when the created issue is a sub-task)
  • Action: edit issue, where you select the labels field and copy the values from its parent issue.

Hope this helps!

Amruta Abhyankar May 15, 2023

Wow thanks for the response Walter. 

Much helped! I shall do this in my jira. And share output. Thanks again!:)

Suggest an answer

Log in or Sign up to answer