Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the linked issue label and set it in the new created issue?

Lilit Aleksanyan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2023

I need help in creating the following Automation rule: Whenever I create an issue and link it to another issue while creating, it should get the label that the linked issue has. What will be the automation rule?

1 answer

0 votes
Frederik Vantroys
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 19, 2023

Hi @Lilit Aleksanyan 

  • Go to your Jira instance and navigate to the project where you want to set up the automation rule.
  • Click on the "Project settings" gear icon in the sidebar and select "Automation" (or "Project Automation" depending on your Jira version).
  • Click on the "Create rule" button to start creating a new automation rule.
  • Choose the trigger for the rule. In this case, select the trigger "Issue created" or "Issue created or linked" depending on your preference. If you want the rule to trigger only when linking an issue during creation, choose the latter option.
  • Configure the rule's conditions. In this case, you don't need any specific conditions, so you can leave it blank.
  • Under "Actions," click on the "Add action" button and choose "Edit issue" or "Edit issue fields" depending on your Jira version.
  • In the "Edit issue" action configuration, select the "Labels" field.
  • Add the following value for the label field: {{issue.links.issuelinks.0.inwardIssue.fields.labels}}. This value represents the labels of the linked issue. Note that issuelinks.0 refers to the first linked issue. If you want to capture labels from multiple linked issues, you can use a loop or iterate through the linked issues.

Save the action configuration.

Provide a name for the rule and save it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events