When an issue is linked in subtask => link the same in parent issue

Abhinandan Shah January 29, 2021

Hi, I'm trying to achieve the following using automation.

Context:

I am the administrator of Project Acme. Issues can be linked from other Projects.

I have created a new issue IS-11 in Project Acme. In IS-10, I have created a new subtask IS-101.

On IS-101, I have linked another issue from another project: "IS-101 is related to XY-01"

What I Need

As soon as I link XY-01 on subtask IS-101, XY-01 should also get linked to the parent issue IS 10 with specific relation.

So automatically create relation "IS-10 is blocked by XY-01" when XY-01 is linked on subtask IS-101.

 

Problem:

I only have access to Project Acme and I can create rule for the same. The Trigger "Issue Linked" is only triggered when IS-10 is linked on other project. It will not be triggered if an issue from another project is linked on IS-10.

So even if I have "Destination Issue" branch, the rule never triggers when an issue is linked. 

According to https://support.atlassian.com/jira-software-cloud/docs/automation-triggers/ "Issue updated" or any other trigger is not executed when an issue is linked.

 

How can I trigger a rule when an issue is linked? Alternatively how can I achieve the need?

3 answers

0 votes
Daniel Ebers
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.
February 3, 2021

I understood it in a way that at least two projects are involved (IS and XY).
I was able to reproduce the general idea of an automation rule towards this but, however the link is only made to the "destination issue" on trigger event - which is in that case the sub-task.
There is no option (at least not that I would have seen it) to execute the rule on the parent issue of the destination (linked issue).

Abhinandan Shah February 4, 2021

I don't want to execute on the parent issue of the linked issue.

This is all I want to do:

1. I link a story on subtask of IS-10

2. Automatically the same story is linked on IS-10.

That's it! I didn't even go out of the card yet alone the project.

Daniel Ebers
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.
February 4, 2021

I reproduced it on my instance by building a rule for the scenario.
The showstopper is that the rule is executed against a branch - which in your case is always the sub-task.
It was not possible to link the story to the parent of the sub-task.

The parent issue in that case is the one which holds the sub-task. From Automation's perspective the issue (including the sub-task) is referred to as "Destination", though.

All the tests were based on the guide here:
https://blog.codebarrel.io/how-to-use-the-linked-issue-trigger-in-automation-for-jira-1616b68c2d6e

The output looks like the following from logs:

grafik.png

Overall I believe in that case one is running into the limitation:

Branches are isolated

Any changes that occur in a branch will not be visible to the main branch or other branches.

Mentioned here: https://confluence.atlassian.com/automation/working-with-related-issues-993924648.html

0 votes
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2021

Unfortunately, this is by design that project admins can only act on issues within their projects. Only a global admin can set up rules  the work across multiple projects

Abhinandan Shah February 3, 2021

I understand that, but I'm acting on my project only!

This is the manual work:

1. I link a story on subtask

2. I link the same story on parent issue.

I am just acting on the same issue/subtask. 

0 votes
Alexander Pappert
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.
January 30, 2021

can you change the rule actor to an acccount, thas hat access to all the projects.

maybe your jira admins can create a dummy account in the local jira directory for this purpose.

in my jira instance, i only use dummy accounts for the automation rules, so that the users can see that the issues were change by an automation rule.

Abhinandan Shah February 1, 2021

That will cause the automation to run for all projects. I just need this in one project.

Also, I have the Cloud instance.

Suggest an answer

Log in or Sign up to answer