node-jira-client
node-jira-client copied to clipboard
Move Ticket to another workflow (e.g. Transition to "In Progress")
Hi I am struggling with the API.
First of all I search the right transition object:
jira.listTransitions(issueNumber) .then(transitions => { const transitionToApply = _.find(transitions.transitions, (t) => { console.log(t.name) if (t.name.toLowerCase() === statusMatch.toLowerCase()) return true }) // Not found if (!transitionToApply) { console.log('Please specify transition name') console.log('Possible transitions:') transitions.transitions.forEach((t) => { console.log(
{ id: ${t.id}, name: ${t.name} } transitions issue to '${t.to.name}' status.`)
})
core.setFailed(`Please specify right transition name.`);
}
......
` But how I need to call the following function:
transitionIssue(issueId: string, issueTransition: JiraApi.TransitionObject): Promise<JiraApi.JsonResponse>;
I'd really like to help, but first I need to read your code, and... well I'm not going to read it like that :)
It seems like you're doing all the right stuff, what's the problem you're having?