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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,965 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot