Hello,
I’m trying to use Replace issue field option API to replace one custom field value with another:
DELETE rest/api/3/field/{fieldKey}/option/{optionId}/issue
The documentation said that I have query options replaceWith and jql to specify changes that I want to apply.
**replaceWith**
integer
The ID of the option that will replace the currently selected option.
Format: `int64`
**jql**
string
A JQL query that specifies the issues to be updated. For example, *project=10000*.
So I’m trying to make this request:
**Code:**
const jql = encodeURIComponent(`reporter=${userAccountId}`)
httpClient.del({
url: `/rest/api/3/field/${customFieldKey}/option/${oldValue}/issue?replaceWith=${newValue}&jql=${jql}`,
json: true
}, (error, response, body) => {
...
})
**Response:**
{
"self": "https://<company>.atlassian.net/rest/api/3/task/13704",
"id": "13704",
"description": "Remove option 5 from issues matched by 'reporter=5beecbbfe17eda2b3fdd0565', and replace with option 3",
"status": "RUNNING",
"submittedBy": 10000,
"progress": 0,
"elapsedRuntime": 0,
"submitted": 1583153547515,
"started": 1583153547584,
"lastUpdate": 1583153547584
}
But unfortunately, even with the correct response, I see no changes in other issues that should be affected by JQL-query. I checked this JQL query with “Search Issues” and it seems fine.
Maybe I misunderstood the goal of this API endpoint?