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.