Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,291
Community Members
 
Community Events
176
Community Groups

Copying custom fields to new ticket via automation

I realise there are two or three previous threads on this but I've (carefully) applied their advice and it's still not working :D

I'm automating creating a new ticket when a ticket changes workflow status. I want to copy across a custom field with a numeric value to the new ticket. Here's the code I'm using:


{
"fields": {
"parent": {"id": "28996"},
"customfield_10413":"{{issue.customfield_10413}}"
}
}


(The "parent" setting is irrelevant but included just so you can see the full code)

In the automation logging, I get the following error:

Create issue
Error creating issue
Specify a number for the custom field (below 100,000,000,000,000) (customfield_10413)

 

In the names page for the ticket, the custom field value appears as follows:

"customfield_10413":4.0

Can anyone advise please?

1 answer

1 accepted

1 vote
Answer accepted

Hi @Mark -- Welcome to the Atlassian Community!

Have you tried using this syntax to get the value of the field: {{issue.customfield_10413.value}}

Kind regards,
Bill

Hi Bill, thanks for your reply. Tried that a few times yesterday, just tried it again and got the same error message.

Mykenna Cepek Community Leader Jan 21, 2022

First, confirm that the type of this custom value is indeed numeric. 

If so, I suspect the value (to the right of the colon) should not be quoted. See:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Using-smart-values

Consider testing this by hardcoding the JSON with a simple number, to see if that works. If it does, then focus on the smart value syntax for the value (without quotes).

"customfield_10413": 4
Like # people like this

That's the one! Must have been the one combination I never tried - thank you so much!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events