REST API - Create Issue: Problem with custom fields

AndréW November 24, 2015

Hello,

we are using JIRA 6.2.5 and we want to create issues in JIRA by using Excel-VBA.

All works with the standard fields of JIRA like summary, description, ... When we put a custom field to the json-structure, we get the following error:

{"errorMessages":[],"errors":{"testergebnis":"Field 'testergebnis' cannot be set. It is not on the appropriate screen, or unknown."}

I found a lot of possible reasons for my problem. I tried out the following things:

  • Check the default screen => field exists
  • Create an issue with the same user => field exists

Any idea for solving my problem?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Andreas Ebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2015

How is your JSON? Are you referencing the field testergebnis by name or by id? Only id works.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2015

André, the custom field id should look like "customfield_NUMBER"

Like Graham Pilapil likes this
0 votes
AndréW November 25, 2015

Yes, you are so right. After reading an issue from JIRA i saw that there are ids which i have to use when creating such an issue. Is there a way to look for these ids of custom fields?

Andreas Ebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2015

Yes. In JIRA's administration go to the custom field list, go to "Edit" or "Configure" of a custom field, and look for the id in the URL of the page you are seeing.

AndréW November 25, 2015

Okay, thank you. It is a way to get the information but it would be nicer to use the real name of a custom field instead of such a construction.

Andreas Ebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2015

Yeah, but the name does not work when there are multiple custom field with the same name, which is possible in JIRA. That's why you have to use the id to clearly identify the field you mean. If my answer was helpful, please accept it by ticking the check mark next to it.

TAGS
AUG Leaders

Atlassian Community Events