Can i create a DEAP JIRA by API - It says ERROR

Danh Dang May 22, 2020

POST

{
"fields":
{
"project":
{
"key": "{{project}}"
},
"summary": "DEAP - {{summary}}"
,
"issuetype":
{
"name": "DEAP"
},
"versions":[
{"name":"{{affectversion}}"}
],
"assignee": {
"name":"{{Assignee}}"
},
"reporter":{
"name":"{{Reporter}}"
},
"customfield_10110":{
"name":"{{Developer}}"
},
"priority":{
"name":"{{Priority}}"
},
"customfield_10125": "{{Class}}",
"customfield_10126": "{{Module}}",
"customfield_10127": "{{MainComponent}}"
}
}

3 answers

0 votes
Danh Dang June 2, 2020

2020-06-02_17h47_12.png

Evan Underwood-Harley
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.
June 2, 2020

You can use POST /rest/api/3/issue/{issueIdOrKey}/transitions

 

You can transition an issue to the Create DEAP option, but you will need to know the transition ID. (which you can get from /rest/api/3/issue/{issueIdOrKey}/transitions)

There is also the option to fill any screens that appear on the workflow transition.

 

See the Transition issue part of the documentation for further details- https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-issueIdOrKey-transitions-post

0 votes
Evan Underwood-Harley
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.
May 22, 2020

Hi Danh,

This could be a number of things:

- Are the values you are putting into your fields valid? I.e. Is the reporter value a real user in jira with access to the project? Are any of the customfields select fields and you are not using a valid value? Does the issuetype you are using exist? ...etc

 

- Are there any required fields that you have not specified a value for?

 

- Are there any conditions / validators  on the project workflow that have not been met? Or any post functions which may be causing issues.

 

Do you have access to the jira logs to see if it provides more information?

I would first try to create the issue in jira using the exact values your API POST is using and see if that works or you get the same problem.

 

Regards

Evan

Danh Dang May 25, 2020

thanks, I am looking to that. Do you know If the DEAP can be created by API?

Evan Underwood-Harley
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.
May 26, 2020

Are you referring to DEAP been created as an issue type through the API or something else?

Danh Dang May 26, 2020

I cannot create the DEAP by API for now, and I am not sure this is supported? I not support then please let me know. thanks 

Evan Underwood-Harley
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.
May 27, 2020

You can create the DEAP issue type via the API.

using POST /rest/api/2/issuetype

{ "name": "DEAP", "description": "description", "type": "standard" }

 

See documentation for more details

https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/?&_ga=2.255600522.388755086.1590482849-973955557.1568640194#api/2/issuetype-createIssueType

Danh Dang May 27, 2020

let me check if this works then i will accept the answer 

Danh Dang May 27, 2020

thanks, I would like to create a JIRA with DEAP type. Not create the Type of DEAP. Sorry for the confusion. 

Evan Underwood-Harley
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.
June 2, 2020

Sorry not sure I understand? Do you want a DEAP project via API?

Danh Dang June 2, 2020

The DEAP project is already created. I just need to create Jira with DEAP type by API (GUI is created successfully). Look like we are not supporting this scenario

Evan Underwood-Harley
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.
June 2, 2020

Can you provide a screenshot from the GUI of what you mean by DEAP type? I can then hopefully be able to assist you further.

0 votes
Danh Dang May 22, 2020
{
    "errorMessages": ["We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file."],
    "errors": {}
}

Suggest an answer

Log in or Sign up to answer