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â)
}