Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use Jira Automation to dynamically set Tempo Time Account field with JSON

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

 

  • customfield_10075: {
    • required: false,
    • schema: {
      • type: "option2",
      • custom: "com.atlassian.plugins.atlassian-connect-plugin:io.tempo.jira__account",
      • customId: 10075
      },
    • name: "Account",
    • key: "io.tempo.jira__account",
    • operations: [
      • "set"
      ],
    • allowedValues: [
      • {
        • id: 2,
        • value: "Client1"
        },
      • {
        • id: 5,
        • value: "Client2"
        }
      ]
    },

 

Your help would be greatly appreciated. 

1 answer

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. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

687 views 5 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you