Struggling with Automation that updates a linked issue
Asked by Jenn Molyneaux:

Hey everyone -

Our Production Support project tracks all of the issues that come from, you guessed it, Production. We've got a team that will then create issues in other projects to resolve those issues. So there will be a PS-XXX ticket and then an issue (ABC-XXX) for the dev teams to work on. A link is added to the issue in the PS project (usually 'is caused by') to that ABC-XXX issue.

The request I've gotten from the PS team is that they'd like to have the PS issue updated when the status of the linked ABC issue changes. More specifically, if it is either 'in Progress' or 'Done' then they want to have the PS issue change to that status as well. (Although if this makes the whole bit of automation way more complicated, I'm not too concerned about having it trigger on only specific statuses)

I've found plenty of questions here in the Community about transitioning issues based on status, but I haven't found one yet for this particular use case. I've put some automation together based on something similar I did for Epics (updating the Epic status when a child/user story is updated) but I haven't been able to get it to work.

One other thing of note - the PS project is not a software project. It's a JSM project. I'm not sure if that matters but I did want to mention that. I'm attaching a screenshot of what I've got configured currently and would be really grateful if one of you kind folks could get me going in the right direction.

![Screen Shot 2022-03-08 at 10.30.28 AM.png](/t5/image/serverpage/image-id/186978i3C9FC065E3C1F62B/image-size/large?v=v2&px=999 "Screen Shot 2022-03-08 at 10.30.28 AM.png")


Answers:
author: Stefan Salzl
body: Hi [@Jenn Molyneaux](/t5/user/viewprofilepage/user-id/4441854) ,

From my point of view the rule in your screenshot looks pretty much how I would try to solve this. 3 points that came to my mind:

* **the condition in the branch:**why are you checking if linked issue is in status "in progress" or "done"? That would cause the rule only doing the action ONLY if the linked issue is already in that status whereas (as I got it) it should be transitioned to that status. Wouldn?t it be "if status NOT one of inProgress, Done"? This seems to me the rule would rarely be triggered and in that case the linked issue would already be in one of the status you?d like to transition to.
* **scope of the rule**   
  As your rule needs to operate in several projects it needs to be configured as multi-project or global rule. Please check in rule details if this is set correctly in order this rule to run as expected
* **inward/outward link**   
  It needs to be clarified if the link types are set correctly in the branch. As I don?t know about the "direction" of your link I can?t answer that 100%. Let?s say if your ABC-XXX issue is caused by PS-XXX (which the other way round means PS-XXX causes ABC-XXX) the branch should work as expected.

Hope I got your requirements right. Would be happy to have this tested with the above mentioned suggestions. From my point of view this should do the work.

Looking forward to your feedback.

Best  
Stefan

comments: author: Jenn Molyneaux
body: Hi Stefan -

Sorry for the very late reply. Your first bullet point fixed everything. It's working now. Thank you so very much! This was so helpful!!


author: Mark Segall
body: Hi [@Jenn Molyneaux](/t5/user/viewprofilepage/user-id/4441854) - If I understand correctly, you're trying to set the linked issue to In Progress if the trigger issue is in Progress and Done if the trigger issue is Done. I think you'll need multiple branches based on JQL for this:

++**Branch 1 - Transition to In Progress**++

```
status IN (whatever status(es) can transition to In Progress) AND (IssueRelatesTo = {{issue}} OR IssueCausedBy = {{issue}} OR IssueBlockedBy = {{issue}})
```

Then add an action to transition to In Progress

++**Branch 2 - Transition to Done**++

```
status IN (whatever status(es) can transition to Done) AND (IssueRelatesTo = {{issue}} OR IssueCausedBy = {{issue}} OR IssueBlockedBy = {{issue}})
```

Then add an action to transition to Done


Tags: cloud