Create Issue via VBA worked once then fails

Jeanne Dixon July 25, 2016

I have been trying to create an issue via VBA. I got it to work once but when I tried to create a second one it fails with {"errorMessages":[],"errors":{"summary":"Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.","description":"Field 'description' cannot be set. It is not on the appropriate screen, or unknown."}}

Here is my JSON string 

{ "fields" : { "project" : { "key" : "J371" }, "summary" : "Test WO Create 2", "description" : "Test WO Create 2", "issuetype" : { "name" : "Work Order" }}}

 

I don't understand why it would work once then fail on the second attempt. I did try to add a custom field, but when it gave me an error I backed it out. After that failure I have not been able to create a new issue. I can create an issue through JIRA and the appropriate screen, but not through the code. I even rebooted to make sure everything was cleaned out but it didn't help.

Any advice is greatly appreciated!

1 answer

1 accepted

0 votes
Answer accepted
Jeanne Dixon July 25, 2016

I found that the issue type had to be before the summary and description (and any other fields). Once I moved it, it started working consistently. So now my JSON string looks like

{ "fields" : { "project" : { "key" : "J371" }, "issuetype" : { "name" : "Work Order" } , "summary" : "Test WO Create2", "description" : "Test WO Create2" } }

Suggest an answer

Log in or Sign up to answer