I seem to be having some trouble updating a custom field value. I created this custom field with the forge app. And I’m now updating it from a separate program. currently my code is setup as follows.
var myHeaders = new Headers();
myHeaders.append(
"Authorization",
"Basic" +
Buffer.from(
`${configObject.Username}:${configObject.ApiKey}`,
"utf-8"
).toString("base64")
);
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
let bodyData = `{
"update":{
"customfield_15422":{
"set": {
"Cases":[
{
"label": 123456,
"value": 123456
}
]
}
}
}
}`;
var requestOptions = {
method: "PUT",
headers: myHeaders,
redirect: "follow",
body: bodyData,
};
fetch(`${configObject.RootUrl}/rest/api/3/issue/JSTB-31`, requestOptions)
.then((response) => {
if (response.ok) {
response.text();
}
throw new Error(response.status + " " + response.statusText);
})
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Is it not possible to edit forge app created custom fields via a rest api call from something other the the app that created the field? I have seen a lot of different information around the docs pages. Any help would be appreciated.