In this article i try to show a practical example that shows how to compute a dynamic value directly in a Jira Service Management ticket by combining Assets, an automation rule, custom fields, a request type and the service portal.
We will build a “Total Cost” field that updates automatically whenever the workitem inputs t change.
This deliberately simple pattern focuses only on Issue + Assets and is easy to extend later, depending on requirements and needs.
Phones object type — add a Number attribute “Price” to store the unit price of each phone.
A Request Type to get the customers wish for a new mobile device , that includes some from our new created fields. Something like this . In this example it is "New mobile device". We will use the name in the next step.
Dont miss required field like the disred device and the quantity.
i called it Calculate total Cost.
the formular to edit the total cost: {{#=}} round( {{issue.customfield_11627}} * {{issue.customfield_11629.Price}} * (1 - {{issue.customfield_11628}}/100), 2 ) {{/}}
Please use your customfield ID´s instead of mine :-)
I order my new phone in the customer portal (the manager for an optional approval step, which I will not cover here)
The ticket in the agent view
And the automation rule is run
Change the discount via manager or agent
And the automation
In the real world, you would calculate on other ways, with taxes an so on, but for demonstartion ist is ok.
Automation smart values: math expressions https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Automation smart values for Assets (Insight) https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/
Automation actions: Create variable (workaround for Assets math) https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable
Edit issue action (Automation) https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Automationactions-Editissue
Workaround for using smart value functions with Assets data in Automations (explains variable workaround for math on Assets data; not a portal/request-type ordering example) https://support.atlassian.com/jira/kb/workaround-for-using-smart-value-functions-with-assets-data-in-automations/
How to copy from/to Asset field value to/from Jira text custom field using automation (attribute copying mechanics; not a Total Cost calculator) https://support.atlassian.com/jira/kb/how-to-copy-from-to-asset-field-value-to-from-jira-text-custom-field-using-automation-for-jsm-assets-cloud/
Automate attribute updates in JSM Cloud Assets (object attribute updates and date math; different scenario) https://support.atlassian.com/jira/kb/how-to-update-object-attribute-values-using-automation-in-jsm-assets/
Community Q&A: How do math with values of variables through automation? (tips on asNumber and variables; no Issue+Assets portal flow) https://community.atlassian.com/forums/Jira-questions/How-do-math-with-values-of-variables-through-automation/qaq-p/2565557
This is a simple, reusable example of combining different values from different sources in Jira — a Jira issue field and an Assets attribute — to produce a single dynamic number that agents can use immediately (for costs, risk components, key figures, or KPIs).
Start simple, keep the math transparent, and extend as needed.
Kai Krause
Senior Technical Consultant
VI2VA
Brunswick
50 accepted answers
1 comment