I have be using https://www.npmjs.com/package/jira-client to create a JIRA utility and to update issue status via API
I initially listed all the transitions using
jira
.listTransitions(<issueId (redacted)>)
.then((result) => {
console.log(result);
})
.catch((err) => {
console.error(err);
});
{
expand: 'transitions',
transitions: [
{ id: '4', name: 'Start Progress', to: [Object], fields: {} },
{ id: '5', name: 'Resolve Issue', to: [Object], fields: [Object] },
{ id: '2', name: 'Close Issue', to: [Object], fields: [Object] }
]
}
jira
.transitionIssue("redacted issue number",{id: '5', name: 'Resolve Issue', to: [Object], fields: [Object]})
.then((result) => {
console.log(result);
})
.catch((err) => {
console.error(err);
});
Error: {"errorMessages":["Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@2115007d; line: 1, column: 45] (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean[\"fields\"])"]}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.