Automation to link issues to another issue
Asked by Pradheep Ayyanar:

I have few issues (sub-task) that needs to be linked as "Blocked by" to one of the issue in the same story.

Ex:

I have this task "MDU-13347" and this can be started only when "MDU-10466" is completed. I need to do automation to link this issue as blocked by as i have multiple scenarios like this and also projects.

[@Trudy Claspill](/t5/user/viewprofilepage/user-id/5309476) can you help here

![link-issue.png](/t5/image/serverpage/image-id/349268i38C3F153FE0CE9C5/image-size/large?v=v2&px=999 "link-issue.png")

![list sub task.png](/t5/image/serverpage/image-id/349271i3C9B0455AD73D69C/image-size/large?v=v2&px=999 "list sub task.png")


Answers:
author: Trudy Claspill
body: Hello [@Pradheep Ayyanar](/t5/user/viewprofilepage/user-id/5549295)

I want to first speak to you mentioning me by name, asking for my help, only 11 minutes after having posted your question.

Please note that I am saying this from a place of kindness, and I very sincerely encourage you to keep participating in this community and asking your questions.

I recommend that you allow more time, at least several hours and perhaps even an entire business day, for other community members to see and respond to new questions before attempting to elicit an answer from a specific community member. Speaking only for myself, I have a full time job that does not include participating in this community. I contribute to this community when I can and when it doesn't interfere with my work responsibilities.

Calling out a specific community member does not mean that community member is available to respond to your question. And for people scrolling through the pages of questions, some may even skip over your question assuming that the response count indicates other community members have already responded.

![Screenshot 2024-09-25 at 6.36.06?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/349363i795DE36B14CADD35/image-size/large?v=v2&px=999 "Screenshot 2024-09-25 at 6.36.06?PM.png")

Setting that aside, let us now consider your question.

This seems very similar to the other question you posted on Sept. 19, where I provided suggestions.

<https://community.atlassian.com/t5/Jira-questions/Automation-based-on-the-summary-text-and-status/qaq-p/2816489>

I have the same question for you here as I had then:

- How do you identify the issue to which you want to link the newly created issue? Is that again based on the Summary text, like in you previous question?

If so, then the solution may be almost identical.

When an issue is ~~transitioned to Complete~~ Created  
And that issue is a Sub-task  
And the Summary of that issue is {the text you provided}  
Then find all sibling subtasks that have the Summary {the text of the sibling issue summary}  
And ~~transition those subtasks to In Progress~~ [link each of those issues to the trigger issue](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Link-issues)  

```
Trigger: Issue Transitioned
  To Status: Complete
Condition: Issue Fields Condition
  Field: Issue Type
  condition: equals
  Value Sub-task
Condition: Issue Fields Condition
  Field: Summary
  condition: equals
  Value: 18.05 Ready to construct (100%)
Branch: Related Issues: JQL
  JQL: parent={{issue.parent.key}} and Summary ~"\"18.1 MDU Equipment Received\""

    Action: Link Issue
```

![Screenshot 2024-09-25 at 6.46.19?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/349364i1D6C7B7BE5F25639/image-size/large?v=v2&px=999 "Screenshot 2024-09-25 at 6.46.19?PM.png")

You may find it valuable to spend some time reviewing the documentation for Automation. There is a lot of information about conditions and actions and branching available in that documentation.

<https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/>

There is also free training available from the [Atlassian University](https://university.atlassian.com).

<https://university.atlassian.com/student/catalog/list?search=jira+automation>


author: Pradheep Ayyanar
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/5309476) can you help here


Tags: cloud

jira-cloud