Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating customfields by roles via REST API

de1f_in
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!
October 20, 2022

Hello everyone!
I need to update the field through the api, which is tracked by roles, to be more precise, the field is divided into 2 roles: developer and tester, and I want to update only the developer field, for example. Is there any way I can do this with python requests? I didn't find an answer to this question in the documentation.

1 answer

0 votes
Mohamed Benziane
Community Champion
October 24, 2022

Hi,

Welcome to the communty

What do you mean by "the field is divided into 2 role" ? There is only two project role that can edit the field ?

If you need to update an issue using the API you can do it using this

https://docs.atlassian.com/software/jira/docs/api/REST/9.3.0/#api/2/issue-editIssue

de1f_in
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!
October 26, 2022

the field that I need to change looks like this

"customfield": [
"Role: Developer (240(4m) | 240(4m))",
"Role: Tester (null | null)"
]

and I want to update only the developer's time like

curl \
   -D- \
   -u user:password \
   -X PUT \
   --data "{'fields': {'customfield': ['Role: Developer (300(5m) | 300(5m))', 'Role: Tester (null | null)']}}" \
   -H "Content-Type: application/json" \
   https://jira-url/rest/api/2/issue/issue-1111 

  but i get internal error, other customfields are successfully updated this way

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events