Syncing statuses between JSM and linked Jira tickets

Sirisha Karavadi October 22, 2024

Hi,

 

Our team is trying to use JSM for submitting tickets. One of the requirements is to sync statuses of JSM and Jira tickets. I have automation for the following:

1. When customer submits a ticket in JSM, when status is transitioned, a ticked is cloned in Jira and is linked with a custom link type

2. Comments between JSM and linked Jira issues are in sync

Now, I need to sync statuses of Jira and JSM tickets.

Usecase: When developers change status of the linked Jira ticket, the JSM ticket should show same status.

The automation I initially built for the above usecase works if only one Jira ticket is linked to the JSM ticket. I am looking to have an automation that will

1) Check the number of linked issues on the JSM ticket, if more than 1 linked issues exist

2) It checks number of resolved linked issues on the JSM ticket

3) Then, if atleast one of the linked issues is not done, then JSM ticket will be shown as in-progress and JSM ticket will be marked done when all the linked issues are resolved

4) If there is only one linked issue, then the status of the linked issue should be copied over to the JSM ticket.

 

I am stuck at 2. Need smart values of code that I can use to complete #2 and #3 above. {{issue.issuelinks.size}} shows number of linked issues but I cannot extend this to {{issue.issuelinks.statuscategory('Done').size}} or something to get count of resolved linked issues.

Our team uses cloud version of Jira and JSM.

2 answers

1 accepted

2 votes
Answer accepted
Salih Tuç
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.
October 22, 2024

It is hard and unnecessary to integrate one JSM ticket depend on two (or more) Jira tickets. What about both tickets are open, and on different statuses, what will you do?

 

Nature of the "integration on statuses" is coming by 1-to-1 relationship. So, what can be the alternative:

  •  Just operate depend on the cloned issue. 
    • You can add some flag (any specific custom field value that is not using in Jira tickets) to the cloned issue in order to understand this is the one you created at first place. You may add the key of the JSM ticket to this flag since a Jira issue of a JSM ticket can be linked to another JSM ticket.
    • If someone link another Jira ticket, it will be there just for reference, won't be operated.

 

However, if you insist on your approach, instead of steps #2, #3 and #4, you can search "Linked issues which status is not Done" with JQL. It will return the linked issues so you can operate depend on them.

Sirisha Karavadi October 23, 2024

Thank you for the response! I will try out the alternative and also try just using JQL for linked issues:)

0 votes
Mathieu Lepoutre {Exalate}
Contributor
November 25, 2024

Hello @Sirisha Karavadi 

I work for Exalate.

Your automation setup is already quite detailed! For checking the number of resolved linked issues, you can use Jira Automation smart values and conditional logic. Unfortunately, there's no direct smart value like {{issue.issuelinks.statuscategory('Done').size}}. Instead, you’d need to use a combination of branching and conditions to iterate over linked issues and count their statuses.

If the complexity grows or you find the automation challenging to maintain, you might want to explore tools like Exalate. It provides bi-directional synchronization between Jira and JSM, including statuses, comments, and custom rules, which could simplify your use case.

Hope this helps, and good luck!

Thank you.

Kind regards,
Mathieu Lepoutre

Suggest an answer

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

Atlassian Community Events