Missed Team ’24? Catch up on announcements here.

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

How to sum the costs of assets owned by an employee?

Amr Hamza June 28, 2021

We need to track expenditure on assets per employee per year. For that I tried to use the following smart value to print in an audit log action, just to check if I am on the right track. But it doesn't produce any results:

So this -> Sum of costs: {{lookupObjects.Cost.sum}}

Procuces this -> Sum of costs: 

Where the lookupObjects are the assets of an employee.

Where did I go wrong here?

P.S. {{lookupObjects.size}} gets the correct count of objects, which proves the lookup to be true

These alse did not work:

{{lookupObjects.object.Cost.sum}}

{{lookupObjects.it.Cost.sum}}

1 answer

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2021

Hi Amir,

Can you share your rule and are you using insight? 

Quick Reference on lookup issues and insight: https://support.atlassian.com/jira-service-management-cloud/docs/smart-values-insight/ 

Amr Hamza June 28, 2021

Hi Fabian,

Yes, I am using Insight and here is my rule:

A4J Insight.png

I have scoured the A4J documentation related to Insight as well as lists functions and I was led in this direction -> {{lookupObjects.Cost.sum}} 

BTW, the Lookup Objects action has the following query: Owner = {{object.Owner}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events