Create Issue via VBA worked once then fails

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
Accepted answer

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,531 views 15 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you