Tempo error when trying to create issue via the Jira Cloud REST API

I’m trying to create an issue in Jira via the REST API. I’m getting an error back that seems to have to do with Tempo. I’m assuming it’s because Account is a required field, but I don’t get why it can’t handle what I’m sending through as the account value.

This is what I’m sending through as the BODY of the curl request:

{
  "fields": {
	"summary": "WhiteHat: test",
	"issuetype": {
	  "id": "10041"
	},
	"customfield_10032": {"value":14},
	
	
	"project": {
	  "id": "10037"
	},
	"description": {
          "type": "doc",
          "version": 1,
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "description"
                }
              ]
            }
          ]
        },
	"reporter": {
	  "name": "Jira Monkey"
	}
  }
}

customfield_10032 is the Tempo Account field, found by mousing over the Edit link in the field configuration. 14 is the specific account ID I want to send, found by mousing over the account name in the Tempo → Accounts screen.

I get this error back:

{“errorMessages”:,“errors”:{“io.tempo.jira__account”:“Can not deserialize instance of java.lang.Long out of START_OBJECT token\n at [Source: N/A; line: -1, column: -1]”}}

What am I doing wrong?

2 Likes

I found the solution to this issue. I was sending in the field as an object, because the V3 API seems to require that most custom field types be sent as objects. In this case, the Account field was expecting a simple data type.

Changing this:

"customfield_10032": {"value":14},

to this:

"customfield_10032":14,

allowed the issue to be created.

2 Likes

Thanks for sharing the solution!

Thanks @estrom … We also tried this and it works.

I find it very odd/frustrating that the documentation (ie. app_key__field_key": [{“value”:“a”},{“value”:“b”}] for multiselects ) does not work … but [1,2] does.

Thank you

Any chance anyone found a way to make this type of update BUT with single select Value instead of ID? Thank you

Hi @estrom I have another issue.

The audit log of automation is said SUCCESS but it still does not work to the field I set.

Here is the advance editting for single select field.

{
"fields": {
"customfield_10010": 1
}
}

Please advise what I should do. Thank you.

In addition @estrom

The field “Request Type” is LOCKED in the settings custom field.

The reason I use advance editing in Jira automation because it cannot be edited with the feature.

Is the locked field is the root cause of the-not-updated “Request Type” field even the automation is SUCCESS ? Thank you