Close related issues

Martina Bassi April 2, 2024

Hello community!

My goal is to close a JSM item when the linked issue in Jira Software is closed.

I have two projects: one, let's name it A is a JSM project, the other, B, is a Jira Software project.

When in A the issue transitions to "in progress" status, the issue is cloned in B and there's a relationship through "relates to". 
I would like to introduce an automation that closes issue in A when issue in B is closed.

May someone help me?

Thank you!

4 answers

1 accepted

0 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2024

Hi @Martina Bassi 

Rule is below :)

  • Trigger: Issue transitioned
    • To status = Done
  • Condition: Issue fields condition
    • Field = Project
    • Condition = equals
    • Value = Project B
  • Condition: Related issues condition
    • Related issues = Linked issues
    • Link types = relates to
    • Condition = Some match specified JQL
    • JQL - project = "Project A"
  • Branch: Related issues
    • Type = Linked issues
    • Link types = relates to
      • Branch-Condition: Issue fields condition
        • Field = Project
        • Condition = equals
        • Value = Project A
      • Branch-Action: Transition issue
        • Destination status = Done

---

A few notes on this rule...

  • You will need to set this as a global rule as it has 2 Projects within it. You can do this from...
    • Settings (cog icon in top-right) > System > Global automation
  • I'd recommend modifying the "Rule Details" to limit this to only the two relevant Projects. That will avoid unnecessary triggering of the rule
    • Change the "Scope" to be for multiple Projects, then enter Project's A and B into the relevant field
  • "Relates to" can be a difficult link type to get right, as often the inward and outward description are the same. I would either pick a different link type, or modify one of the two directions - eg. relates to / is related to - to make it easier

---

Let us know if this works for you!

Ste

Martina Bassi April 3, 2024

Hello Stephen, 

thank you for your detailed comment.
This is similar to what I did. However I have just implemented your suggestions, except for the relationship "relates to".

It doesn't work, "error" and log here attached.

Thank you!

 

 

Martina Bassi April 3, 2024

log.PNGerror.PNGautomationLL_2.PNGautomationLL_1.PNG

0 votes
Lovee Eric April 2, 2024

Hi @Martina Bassi 

 

May be you could add another action to your automation rule after the clone that transition to the required status (eg. „Closed“).  I would suggest to add a transition action to closed (or the required status) right after the cloning action.

Also, please check on the work flow as well. 

 

Thanks

 

Lovee Eric

Brilyant Inc

 

 

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2024

Hi Martina,

Create an automation rule based on Issue Transitioned. Select your Done type status. 

Add any Conditions if needed for those certain ticket types.

Add a Branch for Linked Issues - choose Relates to

Add an action under the Branch for Transition Issue. Select the status you want the linked issue to transition to. 

0 votes
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2024

Hi @Martina Bassi ,

There is an automation library you can use as a starting point.

One that seems most similar to your request seems to be https://www.atlassian.com/software/jira/automation-template-library/rules#/rule/1357123

I suggest to take a look there and see if you can create your own variation. If not feel free to come back :)

Suggest an answer

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

Atlassian Community Events