Forums

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

Automation to add label when linked issue is in a certain project

Jack Crowe July 19, 2024

I'm trying to get a label to be applied when an issue from a certain project is linked to an issue in another certain project:
Screenshot 2024-07-19 at 13-48-37 Audit log - Automation - Technical Support - Jira.png

I added the Branch condition, but if I go and create an issue link, it doesn't seem to show up in the audit log! I can see some changes are triggering it but still not applying the label.

What am I missing here?

3 answers

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Champion
July 19, 2024

Hello @Jack Crowe 

I wrote a long winded explanation about how using the Issue Linked trigger is different from other triggers, but then I refreshed my screen and lost it.

So I'll condense it to say that with that specific trigger, the issue that triggers the rule is not necessarily the one from which you create the link. The rule may end up being triggered by the issue to which you linked.

If you want a more detailed explanation of that, let me know.

You will need to create the rule as a multiple-project scoped rule, specifying the two projects of interest.

In your rule you have specified all link types, so the rule may be triggered by the issue in either project. So, you will have to add some conditions to check the Project of the triggering issue, and the Project of the other issue in the linkage. I haven't quite worked out all the details for that yet.

Is it correct that you would not want the label applied if the link was created between two issues in the same project?

In which of the issues do you want to add the label? Would it always be in the Project A issue, or the Project B issue, or in both?

Trudy Claspill
Community Champion
July 19, 2024

I've worked out the checking of the Project to which the issues belong. The last things I need are the answers to my two questions. Then I can provide a sample rule.

Like # people like this
Jack Crowe July 25, 2024

Correct - I do not want the label applied if the link was between two issues in the same project.


I would only want issues in the Tech Support project to get the label - so it doesn't matter the relationship or relationship directions.

 

Trudy Claspill
Community Champion
August 4, 2024

Hello @Jack Crowe 

I apologize that I haven't gotten back to you sooner.

 

Here is a rule that works. In my example "ATK" is the project where I want the label added to the issue, and "CS" is the other project in the link pairing.

Screenshot 2024-08-04 at 5.48.08 PM.png

The "IF" is an "IF-ELSE Condition"

Screenshot 2024-08-04 at 5.49.36 PM.pngScreenshot 2024-08-04 at 5.49.52 PM.png

The Edit Issue Fields action looks like this:

Screenshot 2024-08-04 at 5.50.49 PM.png

 

If you want more explanation on any of these steps, let me know.

Trudy Claspill
Community Champion
August 23, 2024

Hello @Jack Crowe 

Did my response help you achieve your requirement? If so, please consider clicking on the Accept Answer button to mark your question as Solved.

If you still have additional questions or this is not working for you, please let me know.

Like Jack Crowe likes this
Jack Crowe August 26, 2024

I got some reports from colleagues and ended up with this logic, which I hear is working.. correctly.

Thanks @Trudy Claspill for the input, your answer seems better and I will use it if I come back to edit it!

Here's my version for posterity:
Screenshot 2024-08-26 at 08-44-59 Rule builder - Automation - Jira.png

2 votes
Luis Felipe Studzinski Santos July 19, 2024

@Jack CroweHello,
See this possibility. The first edit is for the issue that is in the link and the second edit is for the issue that received the link.

Also, the automation must be of Global scope.Screenshot_5.png

Screenshot_1.png

Also, the automation must be of Global scope

Luis Felipe Studzinski Santos July 19, 2024

Screenshot_4.pngScreenshot_2.png

Trudy Claspill
Community Champion
July 19, 2024

@Luis Felipe Studzinski Santos 

I don't think your solution matches the author's requirement:

when an issue from a certain project is linked to an issue in another certain project

 

1 vote
Tim Kopperud
Community Champion
July 20, 2024

Hi @Jack Crowe, if I understand you correctly you can apply something shown in the example below. Notice two things:

  1. You will need to apply the rule scope accordingly to your requirements. 
  2. You must handle linking automation from both sides (hense bullet #1 above):
    1. The linking is done while "standing" in the project where you need to set the label.
    2. The linking is done while "standing" any other projects.

In my example I will label the issues on project MOBL, and only if the other project is FAC. But you can add as many projects as needed, or make i global (all projects). 

Regarding bullet #1

The image below shows the rule details dialog from the MOBL automation view.

image.png

The image below shows the same rule details but from the Global administration view. 

image.png

In the Scope dropdown you select according to your requirements, and if not using Global scope add the wanted projects (ref yellow marking). 

The rule

image.png

This rule triggers when linking is done in any projects within the rule scope. 

The main thread will handle linking done from "the project", ref bullet #2.1

The branch will handle any linking done when from "other projects", ref bullet #2.2.

The filters applied make sure labels are only set on the MOBL project. E.g. if global scope you will add labels "everywhere" when a linking occurs if fileter is not applied as shown above. 

TimK

Jack Crowe July 25, 2024

Thank you Tim! I tried this and it seemed to work on more cases but now it seems to be failing.

I'm going to see if the person above has any other ideas and will report back.

Tim Kopperud
Community Champion
July 26, 2024

Hi @Jack Crowe, if you share some details on what started to fail after it worked I might be able to help further. 

TimK

Like Jack Crowe likes this

Suggest an answer

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

Atlassian Community Events