Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rule to move issue to DONE only when multiple MR's are merged

Nirmal Nath September 11, 2024

Came across this limitation in Jira. We are adding multiple MR's to one ticket and when applied the template rule to move the ticket to DONE when the MR is merged it moved the ticket even if only one MR is merged, what should be the rule to check for all the MR's state is MERGED and only move to DONE if this condition is true.

1 answer

0 votes
Dick
Community Champion
September 11, 2024

Hi Nirmal,

Sometimes, one should look to a problem from the other side.

In your case:

  • gather the list of MR's (whatever they may be, I have no clue here :) )
  • check the list for non-merged MR's.
  • if this check yields you zero items, then set the status of the ticket to Done.

I hope this will help you.

Dick

Nirmal Nath September 11, 2024

I tried to play around with the template "When a pull request is merged → then move issue to done". But I could not find a smart value condition which will check for non-merged MR's. This rule will not wait for other MR to be merged but change the ticket to DONE when any one of the MR is merged!

Forgot to mention, we are tagging the MR using the `Development` option in jira.

Nirmal Nath September 11, 2024

Can you guide me on how to gather the list of MR's which are tagged in the Ticket using the automation rules. TIA

Dick
Community Champion
September 11, 2024

well, you could start by sharing what you have now... 
maybe I can help out with syntax or by looking at your problem from a different angle.

:)

Dick
Community Champion
September 12, 2024

Ah, MR is a Merge Request (sorry I didn't get that in the first place). 

If you're coupling merge requests to a ticket, the ticket key is usually used as the first part of the merge request name. From whatever tool you're using to integrate Git into Jira, you'll need to access the synchronized GIT repository in Jira from within this Jira plug-in to find how many merge requests a ticket has. 

 

 

Nirmal Nath September 12, 2024

Hi @Dick , We have configured Jira to couple merge requests to the ticket, We are not blocked there. Let me share some SS.

Here we have 2 MR's attached to the ticket. You can notice the status is changed automatically to 'DONE' when one of the MR is merged. We don't want that to happen. We want to change the status automatically only when all the attached MR's is merged.
Screenshot 2024-09-12 at 1.04.17 PM.pngScreenshot 2024-09-12 at 1.05.05 PM.png

We have used the Automation in the Jira project to achieve this. Is it possible to add some condition in the rule to check for all the MR's status and move the ticket to 'DONE' only if everyone of them is in 'MERGED' status.
Screenshot 2024-09-12 at 1.07.21 PM.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events