Hello,
const body = {
editedFieldsInput: {
labelsFields: [
{
bulkEditMultiSelectFieldOption: "ADD",
fieldId: cfId,
labels: [
{
name: job.name
}
]
}
],
},
selectedActions: [cfId],
selectedIssueIdsOrKeys: chunk.issueIds,
sendBulkNotification: false
};
console.log("Bulk Edit Issues EdidtedFieldsInput.labelFields :", body.editedFieldsInput.labelsFields)
console.log("Bulk Edit Issues Selected Actions :", body.selectedActions)
console.log("Bulk Edit Issues Selected Issue Ids Or Keys :", body.selectedIssueIdsOrKeys)
const bulkRes = await bulkEditIssue(body);
if (bulkRes.status === 400) {
throw new Error(`Bulk edit failed: ${bulkRes?.data?.errors?.[0]?.message || 'Unknown Error'}`)
}
import { route } from "@forge/api"
import requestJira from "./jiraService"
export const bulkEditIssue = async (bodyData) => {
return await requestJira({
route: route`/rest/api/3/bulk/issues/fields`,
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData,
asUser: false
})
}
As you can see in this code, I don’t think I’m making any mistakes in the API call. In fact, I’m able to successfully update the same field area using the exact same custom field ID.
Do you have any idea how I can resolve this issue?
Thanks in advance for your help.