you can update the Reporter from bulk api v3?

Aquiles Lázaro Hernández
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2024

try to update Reporter field from bulk api but can't update, example of API calls that were made

 

curl --request POST \
--url 'https://pmo.atlassian.net/rest/api/3/bulk/issues/fields' \
--user 'correo@test.com:123abc' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"editedFieldsInput": {
"singleSelectClearableUserPickerFields": [
{
"fieldId": "10118",
"user": {
"accountId": "712020:5fd63df962e0"
}
}
]
},
"selectedActions": [
"10118"
],
"selectedIssueIdsOrKeys": [
"DEMO-12"
],
"sendBulkNotification": false
}'
Response

{"errors":[{"message":"You are trying to perform an unavailable operation for the selected 1 issues."}]}

 

Could the Reporter field be updated from the bulk api?

Is occupying the singleSelectClearableUserPickerFields option the right thing to do?

2 answers

0 votes
Aquiles Lázaro Hernández
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2024

Correct request to update Reporter field with 

Bulk edit issues

curl --request POST \
--url 'https://pmo.atlassian.net/rest/api/3/bulk/issues/fields' \
--user 'test@test.com:123abc' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"editedFieldsInput": {
"singleSelectClearableUserPickerFields": [
{
"fieldId": "reporter",
"user": {
"accountId": "712020:4f2-5fd63df962e0"
}
}
]
},
"selectedActions": [
"reporter"
],
"selectedIssueIdsOrKeys": [
"DEMO-12"
],
"sendBulkNotification": false
}'

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2024

Hi @Aquiles Lázaro Hernández -- Welcome to the Atlassian Community!

The documentation for the bulk edit endpoint: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-rest-api-3-bulk-issues-fields-post

Describes the Assignee and Reporter fields as examples which can be changed with singleSelectClearableUserPickerFields in a bulk edit operation.

 

However, the Get bulk editable fields one returns "a list of fields visible to the user to perform bulk edit operations": https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-rest-api-3-bulk-issues-fields-get

When I tried that one for example issues in my projects, it does return Assignee but it does not include Reporter.  Thus at least for my site, Report is not supported.

Perhaps try that endpoint for your DEMO-12 issue to observe what it returns.

 

Kind regards, 
Bill

Aquiles Lázaro Hernández
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2024

Hi @Bill Sheboy 

Use the endpoint Get bulk editable fields

curl --request GET \
--url 'https://pmo.atlassian.net/rest/api/3/bulk/issues/fields?issueIdsOrKeys=DEMO-12&&searchText=reporter' \
--user 'test@test.com:123abc' \
--header 'Accept: application/json'

Get  the answer

{"fields":[{"type":"reporter","id":"reporter","name":"Reporter","isRequired":true,"searchUrl":"https://pmo.atlassian.net/rest/api/3/user/recommend?context=Reporter&issueKey=DEMO-12"}]}

The error is that it passed as fieldId in field number 10118, but the id is reporter as it is in the response

I add the call to the bulk api correctly

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2024

Well done!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events