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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

197 views 2 11
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