Forums

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

Jira Automation - How to add a label on source issue link

CEDRIC DEVAUX
Contributor
May 22, 2023

Hello,

 

I want to create a automation to add a label when a ticket is linked to another one.

But I want this add this label on the source ticket.

 

Example

I link the AAA-1 to BBB-10 and I want automation adds a label on AAA-1

 

Currently on automation, I able to trigger linked issue but the update is applied on destination ticket.

 

How to do that?

 

Thank you

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
May 22, 2023

Hello @CEDRIC DEVAUX 

If you review the information available with the Issue Linked trigger you will see that it explains how to identify each issue in the linked pair.

Screen Shot 2023-05-22 at 8.22.47 AM.png

 

Which link type are you using? How are the two issues related by that link? For example

AAA-1 blocks BBB-1

or

AAA-1 is blocked by BBB-1

CEDRIC DEVAUX
Contributor
May 23, 2023

Hi @Trudy Claspill 

 

I use AAA-1 blocks BBB-1 and so I want to add a label on AAA-1.

As in native, we are not able to create a JQL to track issues linked to ticket from a project except to use linkedIssues(issueKey), the idea is to track tickets with the labels where the origin is outside of the project BBB.

 

That's why, I want to add a label on the source ticket AAA-1 where AAA-1 blocks BBB-1

 

I hope it's clear :-p

 

Cedric

Trudy Claspill
Community Champion
May 23, 2023

In that specific case, the rule will be triggered by AAA-1 - the issue that is causing the block is the one that triggers the rule and is referenced by the {{issue}} smart value.

If you want to add a label to AAA-1 you need only add an action to Edit the issue and add the label.

TRIGGER: Issue Linked
Link type: Blocks
ACTION: Edit issue
Field: Labels
Make sure you select the ADDREMOVE option
Specify the label you want to Add

Screen Shot 2023-05-23 at 10.22.58 AM.png

 

Screen Shot 2023-05-23 at 10.23.38 AM.png

CEDRIC DEVAUX
Contributor
May 24, 2023

Hi Trudy,

Finally it's very simple :)

Thank you for your help

Like Trudy Claspill likes this
0 votes
Somnath Patil
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.
May 22, 2023

Hi @CEDRIC DEVAUX ,

 

Updating label to source ticket depends on link type you use, suppose you used AAA-1 is blocked by BBB-1 and want add label on ticket AAA-1 use the automation shown in the below attachment.

OR 

If you used AAA-1 blocks BBB-1 the label will add on BBB-1.c1.png

 

This automation will work on the basis of the link type you use. If you use inward link type like is blocked by, is cloned by, is duplicated by, etc. label will added to AAA-1 or if you select Outward link type like blocks , clones, duplicates, etc. label will be added to BBB-1.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events