Jira Service Desk issue update
shadowempire123 opened this issue · comments
Hi,
I am trying to update the description field in an Jira Service Desk project, but it fails.
const issueId = 'ASD-3536'
const client2 = new Version2Client({
host: process.env.RM_JIRA_URI,
newErrorHandling: true,
telemetry: false,
rejectUnauthorized: false,
authentication: {
basic: {
username: process.env.RM_JIRA_USERNAME,
password: process.env.RM_JIRA_PASSWORD
}
}
})
let issue_params = {
fields: {
description: 'My new description'
}
}
await client2.issues
.editIssue({ issueIdOrKey: issueId, ...issue_params })
.then((res) => {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 1
}
})
.catch((res) => {
console.log('error calling client2.issues.editIssue')
jiraHelper.printErrors(res)
return 1
})
I am getting back this error:
errors: { description: "Field 'description' cannot be set. It is not on the appropriate screen, or unknown." }
Is this maybe, because it just is not possible?
See https://jira.atlassian.com/browse/JSDSERVER-4609
thx
any news here?
Never worked with Service Desk API. No comments here
Hello @shadowempire123! Do I understand correctly you wanna update Remedy Code with Jira API?
Yes, it is a custom field
I think you can put value like here:
let issue_params = {
fields: {
customfield_12600: 'needed value'
}
};
That is what I have tried for description (see my example in the top).
I understood, updating is not possible via API...
I will try again in my other environment and let you know...
Could you please send me any documentation for API you used in the screenshot? As for me, it should work. And any additional information for creating a similar project on my side will be helpful
I am currently testing with my ops colleague, at the moment it seems a permission problem. (The screenshot was a test with his user)
outcome: my jira user had no service desk licence.... 😣
so the update works.
I am still a little confused about this jira ticket... -> https://jira.atlassian.com/browse/JSDSERVER-4609
anyway, thx MrRefactoring for your support and the great jira.js and confluence.js module !