Transition an issue when a linked issue is closed

Rob B
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 15, 2018

Is it possible to transition an issue when the linked issue is closed?

Thanks

5 answers

1 accepted

4 votes
Answer accepted
Francesc Arbó
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 16, 2018

Yes, with the automation of Jira Service Desk.

Rob B
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 16, 2018

Sorry can you explain this? Is it something really easy?

Francesc Arbó
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 16, 2018

Sure! Let me explain how I do it. You don't need additional add-ons.

  1. Access in the administration of your project and press Automation.
  2. Create a new custom rule and:
    1. When: A linked issue is transitioned
    2. If: Linked issue matches (enter your JQL here and other conditions you consider)
    3. Then: Transition issue (select the transition to close the main issue).

 

Hope it works!

Like Matthew Short likes this
Rob B
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 16, 2018

Can this not be done just on the transition? Like a post function or script?

Francesc Arbó
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 16, 2018

In fact, this automation allows you to transition the linked issue and, automatically transition the main issue.

Rob B
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 16, 2018

I only need to transition the parent issue when the linked issue is manually closed.

Francesc Arbó
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 16, 2018

Yes, that's exactly how it works this automation in Jira Service Desk. :-)

Rob B
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 16, 2018

WHEN: A linked issue is tranistioned

IF: issuetype = "linkedissuetype"  AND status = Closed

THEN: transition issue: "parent issue transition"

 

This is not working for me :(

Rob B
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 16, 2018

I need the parent issue to transition but there is no option in WHEN for that

Francesc Arbó
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 16, 2018

So, given the following scenario:

Parent issue type: Bug

Linked issue type: Task

We need to close the bug automatically (the trasnition called "Close") when I close, manually, the task.

The automation should be:

When: A linked issue is transitioned

If: issuetype = Task

Then: Transition issue (Close)

Remember selecting in the "Run as the user who triggered the rule" option.

Francesc Arbó
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 16, 2018

For additional information, here you have the Atlassian documentation explaining how to configure it.

https://confluence.atlassian.com/servicedeskcloud/automating-your-service-desk-732528900.html

Hope it works.

Rob B
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 16, 2018

I think i have a problem because the parent and linked issues are in two different projects.

Francesc Arbó
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 16, 2018

It shouldn't be a problem. I use it to close the Jira Service Desk issue when the JIRA Software linked issue is closed manually.

Verify if your have right permissions. In addition, you can also look what has failed in your automation rule log.

Rob B
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 16, 2018

Im doing the automation in the parent issues project but it fails on THEN. I have select the correct transition name on the parent case.

Rob B
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 16, 2018

Found the problem....... its because i have got the transition hidden on the workflow. Is there no way around this?

Francesc Arbó
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 16, 2018

Maybe selecting in the options of the rule the admin triggers the rule instead of the current user. It deppens on who can execute that hidden transition.

Rob B
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 16, 2018

Sorted! I changed the condition on the transition to 'Hide transition from the user (the transition can be triggered only programmatically or from a workflow function).'

 

All works perfectly! Thanks Francesc! :)

Francesc Arbó
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 16, 2018

As you can see, you can automate it out-of-the-box with JSD. I always use this option tu automate some manual tasks. It helps a lot users and it's a quick win. :-)

Vladimir Zhasan July 30, 2018

What if I have two linked issues? How to check that all of them are closed?

Like Krystian Szewczyk likes this
Danyal Iqbal
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.
July 31, 2018

put them in a list and iterate over them.

Vladimir Zhasan August 2, 2018

How to do it in jql?

Like Martin Cleaver likes this
2 votes
Karim Belhadj October 27, 2018

I have two projects with differents workflows .

Now i would like to transition the parent issue to the next status , when the the linked issue in the other project  was closed. 

i need a help please.

0 votes
Sreedevi Raman Pisharody August 21, 2023

I only have script runner plugin. I am trying to use the trigger option is there a way i can add some scripting there to have a post function run so that when Parent ticket is moved to In Progress the linked bug ticket also is moved

0 votes
Zehra Atmaca August 29, 2018

Is it as well possible to auto close the parent if MORE than 1 linked issues are closed?

 

Thank you in advance.

 

Kind regards,

Zehra

0 votes
Danyal Iqbal
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 16, 2018

This can be done with various plugins in marketplace. Check out Automation for jira

or scriptrunner (already tagged :)

Rob B
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 16, 2018

Yes i have script runner and automation for jira installed

Suggest an answer

Log in or Sign up to answer