Cant set custom field "account" made by Tempo Edited

It seems impossible to set the field "Account" which is a custom field made by the Tempo Timesheets plugin. 

 

In our case this is the customfield_10002. As seen in the REST documentation this should have a SET opration (see below).

"customfield_10002": {
"required": false,
"schema": {
"type": "account",
"custom": "com.tempoplugin.tempo-accounts:accounts.customfield",
"customId": 10002
},
"name": "Account",
"key": "customfield_10002",
"hasDefaultValue": false,
"operations": [
"set"
]
}

But whatever value or id I Set (values and ID's are accessible via http://<youratlassian>/rest/tempo-accounts/1/account/ ) it wont be set in the automation. The automation on the other hand says it was a succes. 

Has someone encountered and fixed this issue?

4 answers

1 accepted

2 votes
Andreas Knecht Community Champion Apr 11, 2017

Hey Steven,

So I heard back from Tempo support now.  It looks like the correct construct is to make the id a string:

{
    "fields": {
        "Account": "234"
    }
}

Can you give that a go please?

Cheers,

  Andreas

This worked indeed . 1 upvote

Thank you. Worked here, too. 

0 vote
Andreas Knecht Community Champion Apr 09, 2017

Hi Steven,

So did you try this with an 'Edit issue' action using the 'Advanced' block?  

Is this the JSON you put in the advanced block:

{
    "fields": {
        "Account": 234
    }
}

234 in this example would be the account id.

I haven't been able to test this yet and trying to get a hold of someone from Tempo.  I'm not 100% sure if this field can be set this way (it's a non-standard custom field).

Cheers,
  Andreas

Hi Andreas,

 

I tried this but it doesn't work. The rule triggers at the condition and as a test i also set the assignee in the automation. That works fine, but the account field won't set. 

Cheers,

Steven

Andreas Knecht Community Champion Apr 10, 2017

Hey Steven,

So I've just setup Tempo locally and tried pretty much any combination I can think of to edit the Account field via REST with no luck.  I'm not sure this will be possible.

I did just open a support case with Tempo to ask them what they magic format for this field might be.  I'll let you know when they get back to me.

Cheers,

  Andreas

Andreas Knecht Community Champion Apr 26, 2017

For future users trying to do the same thing.

This works:

{
    "fields": {
        "Account": "234"
    }
}

(account id as a string not a number)

Hi,

I am trying to set Account field and my body to create issue is 

{"fields":{"project":{"id":"10000"},"summary":"Tesing","description":"description","issuetype":{"id":"10006"},"Account":"3"}}

I see this error.

{"errorMessages":[],"errors":{"Account":"Field 'Account' cannot be set. It is not on the appropriate screen, or unknown."}}

Field id present in the screens

Way overdue response, but this indeed worked!

 

Love the add-on btw. 

 

Cheers!

Andreas Knecht Community Champion Jun 07, 2017

Great to hear it worked!  Cheers!

Hi,

I am trying to set Account field and my body to create issue is 

{"fields":{"project":{"id":"10000"},"summary":"Tesing","description":"description","issuetype":{"id":"10006"},"Account":"3"}}

I see this error.

{"errorMessages":[],"errors":{"Account":"Field 'Account' cannot be set. It is not on the appropriate screen, or unknown."}}

Field id present in the screens

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

168 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you