Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation to multiply two fields

Alfred Bailey September 4, 2024

Hi, 

I am trying to add two fields and get a third using automation, I am using the Field Value Changed trigger, to monitor the Days Year to Date, then using an Edit issue and specifying the Project cost field.  


In the more options I have this json

{ "fields": { "Project Cost": { "set": { "value": "{{#=}}{{issue.Rate}} * {{issue.Days Year to Date}}{{/}}" } } } }

 

But get the error in the audit log. 

Error editing issues
DPP-879 (Specify a number for the custom field (below 100,000,000,000,000) (customfield_12673))

Associated items:

Field Value changed




Any advise would be much appreciated 

Thanks

1 answer

0 votes
Trudy Claspill
Community Champion
September 4, 2024

Hello @Alfred Bailey 

When asking for help with an Automation Rule it will help us help you faster if you provide screen images showing your entire rule. Sometimes the problem is related to the context in which the step is executing.

An excellent debugging tool is to use the Log action to print into the rule execution audit log any smart values you are trying to use in a calculation just prior to that calculation.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action

I recommend you add steps for the Log actions and print out the following:

{{issue.Rate}}

{{issue.Days Year to Date}}

{{#=}}{{issue.Rate}} * {{issue.Days Year to Date}}{{/}}

Make sure that you copy the text exactly from the JSON code you are using. This will help ensure that the values are what you think they should be.

Field names within smart values are space and case sensitive. You need to make sure that the field names you have specified are an exact match for the actual field names.

Alfred Bailey September 5, 2024

Hi Trudy, 

Thanks for your assistance, I have attached the two images of the Automation Rule, When: Value Changes (1st image) and the Then: Edit Issue fields (2nd Image) as well as the log report when I changed the field Days Year to Date. 

Any help would be most appreciated. 

Thank youScreenshot 2024-09-05 at 11.21.15.pngScreenshot 2024-09-05 at 11.22.02.pngScreenshot 2024-09-05 at 11.23.41.png

John Funk
Community Champion
May 30, 2025

Hi @Alfred Bailey  - Don't know if you ever solved this or not, but basically it is telling you one of the fields used in your calculation is missing a value. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events