Automation - copy a custom number field to another custom number field.

Erin Blomert November 12, 2020

Hello all,

 

I've managed to successfully use the "Additional fields" in Edit Issue to add preset items/numbers to my custom fields that are otherwise not accessible.  However I would like to retrieve one field and then put it in another.  I have tried this:

 

{
"fields": {
"customfield_10284": {{issue.customfield_10026}}
    }
}

With no luck.  Both of the fields are of type "Number", and I think that's my problem, but I just can not figure out how to fix it.  The Rest API is a little over my head.  Thank you!

 

On another note - is it possible to increment a number and then do put it in another field?

 

Using a next-gen product on cloud.  Thanks!

1 answer

0 votes
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2020

Hi Erin,

Your smart value code there looks correct. Could you add a component, earlier in the rule, 'Log Action', and log the value of {{issue.customfield_10026}} (just do confirm the rule is picking up the custom field correctly). You should then be able to see the value your are expecting in the audit log.

Also, in order to increment a number and put it in another field, that is indeed possible. Use the smart value of {{#=}}{{issue.customfield_10026}} + 1{{/}}. There is a variety of math functions you can use with this format. See https://support.atlassian.com/jira-software-cloud/docs/smart-values-math-expressions/ for more details.

Cheers

Erin Blomert November 17, 2020

Hi Sam,

 

Thanks for the response!  And the math is great, thank you!  It's given me some fun ideas.

 

I used log and got nothing.  I think the problem was that I was trying to get into the "Story Points Estimate" field on a next gen project.  There seems to be no way to edit or pull that field through automation.  If you have any insight on that, I'd love to hear it!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events