Hi All,
I am trying to set the Tempo Time add-in's custom field of account using the Jira Automation option to write a JSON. Ideally I want to set the value of the Account using the value of the custom Jira Management Organization field.
Here is where I am getting hung up, I cannot set the Account field from tempo time at all. I am getting the following error in the logs.
(Can not deserialize instance of java.lang.Long out of START_OBJECT token at [Source: N/A; line: -1, column: -1] (io.tempo.jira__account))
My json is formatted as follows
{
"update": {
"customfield_10075": [
{
"set": {"id": 2}
}
]
}
}
I have tried calling the field by name and I have tried setting the fields options using their values.
When calling the rest api for the allowable fields, I find my field in the list with the following results
Your help would be greatly appreciated.
Hello, @Andy Creech
Here is a solution on how to set the Account based on Tempo Account's KEY matching JSM Organisation's name, when taken without spaces and in upper case i.e. JSM Organisation name "Test Organization" -> Tempo Account "TESTORGANIZATION"
https://api.tempo.io/core/3/accounts/{{issue.customfield_11500.name.remove(" ").toUpperCase().urlEncode}}
Bearer xxxxfor xxx value go to your Jira Cloud/Apps/Tempo/Settings/API integration and create a token
{ "fields": { "Account": {{webhookResponse.body.id}} } }
The resources to read through are these:
https://tempo-io.atlassian.net/wiki/spaces/KB/pages/2249589149/Handling+time+buckets
https://apidocs.tempo.io/ (you need /accounts/{key} one)
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/
https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/
Error message solved:
Next to figure out smart value to be dynamic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So for anyone tracking this, I resolved the initial error message. However you can only set Tempo Time account using the unique key, you cannot use the name of the Account. Therefore there is not a direct way to assign Account based on Jira Service Management custom field Organization.
In theory a smart person could create a way to use the Org field as an input to look up in a list through smart values the name of the account and return the unique key. However that is beyond my abilities.
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.