Hi guys,
updating a customfield using the REST API works fine for me for simple fields.
Suppose I want to update the "dolor sit" to "lorem ipsum 5" on a customfield that looks like this:
"customfield_12543": {
"steps": [{
"id": 10123,
"index": 1,
"fields": {
"A": "lorem ipsum 1",
"B": "lorem ipsum 2",
"C": "lorem ipsum 3"
},
"attachments": []
}, {
"id": 10124,
"index": 2,
"fields": {
"A": "lorem ipsum 4",
"B": "dolor sit",
"C": "lorem ipsum 6"
},
"attachments": []
}
]
}
Do I have to PUT the whole structure everytime I want to change a single string in it?
Or is there some way to address the "B" with index 2 directly?
I looked for some time but could get it working.
Thanks!
As far as I know, the entries in the fields aren't indexed such that the REST API can alter them individually; you can either replace (overwrite) all the values with new values, or add new values, which are added at the end of the array of values.
v3 of the Jira REST API does have this new experimental method to alter custom field values, but the values still aren't accessed by any index or offset.
Thanks, David.
I was hoping to access an individual field - the change history can look quite messy if I update all values everytime I have to change a single field.
Also it's hard to spot what exactly was changed as the changes in the history are displayed unformatted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.