My goal with this was to override several backend fields like the “key” and “createdate” for some older data I am pulling from another application. I’m trying to make sure the information matches what I am extracting from other systems as part of my data migration. My Jira connect app is working and allowing me to update/insert records visible on the screen, but not ones behind the scenes. I am also using overrideScreenSecurity
and overrideEditableFlag
set to true in my API call.
Error:
{“errorMessages”:,“errors”:{“created”:“Field ‘created’ cannot be set. It is not on the appropriate screen, or unknown.”,“key”:“Field ‘key’ cannot be set. It is
not on the appropriate screen, or unknown.”}}
API Call:
fullResourcePath = https://.atlassian.net/rest/api/2/issue/${issueIdOrKey}?overrideEditableFlag=true&overrideScreenSecurity=true
I using the following logic to call the API.
const bodyData = `{
"fields": {
"summary": "Having issue using update api for connect v4",
"created": "2020-12-21T02:23:38.319+0000",
"key": "NX-1"
}
}`
fetch(fullResourcePath, {
method: 'PUT',
headers: {
'Authorization': `JWT ${token}`,
'Accept': 'application/json',
'Content-Type': 'application/json'
}, body: bodyData })