Documentation for the jira rest api seems to be a mess... None of the examples work.
I was only able to make add and remove verbs work.
Can someone please show me the format for using Set to set all components at once?
update.components[0].add.name works, but update.components[0].set.name fails. I want to overwrite all components with the updated list.
That's not the REST API, that looks like some form of library that sits in front of the REST API and provides some coding layer over the top of it. The REST API would expect an http(s) "put" with a set command embedded in some JSON.
So, which library is it? JRJC?
Im using the rest API.
We built a UI in FileMaker and want to push the changes we made to tickets back to jira. I was just specifying the JSON path i was using to create the JOSN to PUT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code you've given is nothing to do with the REST API, it looks like something that sits in front of it. The REST API expects a command or JSON.
So, forget it, it's a red-herring. What JSON are you sending with the put?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the JSON that I got to work using the Add verb.
{"update":{"components":[{"add":{"name":"GAME_UI"}},{"add":{"name":"AUDITLOG"}}]}}
How would I change that to using the Set verb? I would like it to overwrite any existing components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the set verb to overwrite existing values:
{ "update" : { "components" : [{"set" : [{"name" : "Engine"}, {"name" : "Trans/A"}]}] } }
That example comes from the 'Setting the components field' in the document: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#editing-an-issue-examples
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.