Hi Everyone,
I have created small forge app to do some calculation and update read only field type(similar to attachment counter app by Atlassian)
which was working find in Dev environment but it failed to store value on field in production environment. I checked the logs that execution goes to store function and even formatted bodydata too
I tried to get the status of response using conole.log but gets no response. below is my store function snippet. kindly suggest what would be the reason for failure in prod envrionment
export async function setValue({fieldKey, issueId, value}) {
const url = route`/rest/api/2/app/field/${fieldKey}/value`;
let bodyData = `{
"updates": [
{
"issueIds": [ ${issueId} ],
"value": "${value}"
}
]
}`;
console.log(bodyData);
const response = await api.asApp().requestJira(url, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(bodyData)
});
console.log(await response.status, await response.statusText);
}
Thanks in advance,
Leo