Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cant add Tempo Account when creating a jira issue with the rest API?

gno
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2020

Is it possible to add a Tempo Account when creating a jira issue with the rest API?

This is the account 

"customfield_11961": {
"id": "2333",
"key": "SDFFF",
"name": "Web"
} 

 

This is my request:

{
"fields": {
"project":
{
"key": "ORDERS"
},
"summary": "New Issue",
"description": "blabla",
"issuetype": {
"name": "order"
},
"customfield_11961": {
"id": "2333",
"key": "SDFFF",
"name": "Web"
}
}
}

 

 

I get this response:

Error: Failed to create issue in JIRA.

Status: 400

Response: {"errorMessages":["Account id 'null' is invalid"],"errors":{}}

1 answer

0 votes
andrei_a_papou
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 5, 2020

This works:

{ "fields" : { "customfield_123": "5" } }

 

Replace customfield_123 with the name of your custom field.

The number 5 in the above example is the account ID. Note that the account ID has to be a string, not an integer (so double-quote it).

Pass null (without quotes) to unset the account field:

{ "fields" : { "customfield_123": null } }

Suggest an answer

Log in or Sign up to answer