Regarding this link REST-API-call-for-adding-a-fix-version-to-a-Jira
I am submitting a jira item from another system (SBM) using cURL and the POST option. I found the link very helpful to get the syntax correct regarding set or add but when I create my item it doesn't populate the fix version field and there are no error messages at my end and none on the Jira logs.
I think I'm missing something!
You should create a version first with POST /rest/api/2/version and then you can set this version for an issue with PUT /rest/api/2/issue/{issueIdOrKey}
And Jira always returns a message in JSON format after REST execution. How do you execute your REST call?
Hi Alexey,
Thanks for replying. My POST statement is creating a new Jira item with various fields taken from an item in my SBM system. So within the post statement, I include a section for the fixVersions field.
"fixVersions":[{"set":[{"name":"productname"}]}],
I have tried it with add as well (using the slightly different format) but that doesn't work wither. I put the Jira return message in an output file which does not contain any errors or references to this field. The item is created correctly with all the fields I send over apart from this one.
We execute the REST call using cURL via a command line from within a script (which we have been using for some time minus the fixVersion field). The input mentioned below contains all the fields we want to add.
string = "c:\curl\cURL\bin\curl -D c:\curl\cURL\bin\log.txt -u userid:password-X POST --data @" & input & " -H " & quote & "Content-Type: application/json" & quote & " https://url/rest/api/latest/issue -v -k > " & output & " 2>&1"
response = Ext.CmdLineWait(string)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, try to do it this way. Install Rest Api Browser to your Jira instance. Then execute your POST method through the Rest Api Browser. It will show you the error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey, Thank you for this. My colleague installed the Rest API Browser and we were able to see that in fact we just needed to omit the Set or add section and it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Linda Hurrell Can you please tell me more detail about how you add the fox version? thank you
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.