Originally asked by Viacheslav on 27 September 2019 (original question)
Is there any way my partner and I can sync the issue statusCategory?Source: Jira Cloud (old community)
Originally asked by Viacheslav on 27 September 2019 (original question)
Is there any way my partner and I can sync the issue statusCategory?Source: Jira Cloud (old community)
Answer by Roman on 27 September 2019
Hey Vyacheslav,
Can you give an example on how the synchronization needs to look like please?
Sure thing. I need a functionality similar to this:
if (replica.statusCategory == “Done”) {
workflowHelper.transition(issue, “Resolve this issue”)
}
Can you try
if (replica.status.category.name == “Done”) {
workflowHelper.transition(issue, “Resolve this issue”)
}
I’m not sure about ‘status.category’, in Jira’s JQL it is ‘statusCatefory’. Anyways, I used another approach as follows:
if (replica.status.name == “Escalated” && issue.status.name == “Waiting for customer”) {
workflowHelper.transition(issue, “Respond to support”)
} else if (replica.status.name == “Canceled”) {
workflowHelper.transition(issue, “Reject”)
} else if (replica.status.name == “Closed” || replica.status.name == “Resolved”) {
workflowHelper.transition(issue, “Resolve this issue”)
}