The Problem: I am trying to creating an issue using the API and have two cases:
- Case 1: Created project when I select (I am `experienced` with Jira) from recommendation page in project creation steps and send the data with priority and it worked
- Case 2: Created project when I select (I am `new` with Jira) from recommendation page in project creation steps and send priority and it didn't work.
Question: how I can detect Case 2 using the API provided
Dear @Thomas Deiler
Thank you for the quick reply.
It is the same issue creation API (`POST /rest/api/2/issue`) with the same payload,
The two cases is on different jira project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @AbdelrhmanE,
then I continue guessing:
Can you please post your json payload?
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Thomas Deiler
Yup the second option (a different set of fields (with mandatory options) that cannot be filled with data)
When I try to create an issue from Jira dashboard I didn't find the `priority` field
How can I get all supported fields using API?
payload
```
{
fields: {
issuetype: {
id: issuetypeId,
},
labels: [],
project: {
key: projectKey,
},
summary: '',
description: '',
assignee: {
name: assigneeId,
},
priority: {
id: priorityId,
}
},
}
```
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @AbdelrhmanE,
only fields that are visible/editable via Jira UI will be also writeable over the REST API. Add priority to the 'create screen' of the issue type you want to create.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Thomas Deiler
I don't want to add priority to the screen I need to know the supported fields before submission to restructure the suitable payload for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Afaik, when quering an issue you get all custom fields / system fields, regardless if they are shown on the screen, but filled with NULL if there is no value.
You need the knowledge of the create screen when caling the API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Thomas Deiler
I want to create a new issue not get existing one.
But before creating this issue through API I need to get issue structure (optional/required fields) using API to format the issue creation payload against it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @AbdelrhmanE,
you can perform a
GET /rest/api/2/issue/createmeta?expand=projects.issuetypes.fields
All fields are returned for all projects where you can create issues with your requesting account.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how to change the severity of the defect in jira usning rest api?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.