Hi, can somebody help me to find out how can I get a list of all required fields for creating an issue?
There's https://example.atlassian.net/rest/api/2/field API that returns a list of fields, but we can not see there what fields are required for a specific project, for example for a project, the "components" are required, for another - no?
Is there a possibility to check the required fields to create an issue?
Thank you!
There are some tutorials on the developer site which deal with exactly your question:
JIRA REST API Example - Create Issue
and
JIRA REST API Example - Discovering meta-data for creating issues
Hey there, I just wanted to share what helped for me just in case it could help anyone else:
To determine the required fields needed to create my jira issue from the POST method, I did the following:
First, I added this import to help with debugging: (in python)
import logging
logging.basicConfig(level=logging.DEBUG)
DEBUG:atlassian.rest_client:HTTP: Response text -> {"errorMessages":[],"errors":{"issuetype":"Specify an issue type"}}
In this case it said I am missing an issue type, which after cross comparing to a manually created issue, I realised it was the field 'issuetype'. Through this, I iteratively fixed the issues one at a time until I had all of the relevant fields for the issue creation. This is just one way of doing it and probably not too efficient but it's what worked for me :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.