Forums

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

How to update custom-field with string value?

Alexandr Turovskyi
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!
January 31, 2019

Field definition from /rest/api/2/issue/{issue}/editmeta


"customfield_10859":{
"required":false,
"schema":{
"type":"string",
"custom":"com.atlassian.jira.plugin.system.customfieldtypes:textfield",
"customId":10859
},
"name":"TS Commit",
"key":"customfield_10859",
"operations":[
"set"
]
}

if i use request data like this, jira returns bad request error.

{
"fields": {
"customfield_10859": "test"
}
}

 with request data

{
"fields": {
"customfield_10859": {"value":"test"}
}
}

field updates with value

Untitled.png

 

how to put to field string value? what json should i send to api ?

1 answer

1 accepted

0 votes
Answer accepted
Phil_Dimeski
Contributor
January 31, 2019

Hey Alexandr,

What does your request look like? Your first example should work with the v2 API. Although updating a customfield using their v3 API does not seem to work. 

Also what is the error message returned? 

Alexandr Turovskyi
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!
January 31, 2019

it work with API v2.

Thanks !

Like P. Raj Kumar likes this

Suggest an answer

Log in or Sign up to answer