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

Summing values from a custom fields in a task into a custom field an Epic (JWM)

I am trying to create an automation in a Jira Work Management Project that will add the value from the custom field in a task called "Invoiced Amount" which is "customfield_10156" and add to the custom field in the Epic called "Total Payments Received for FY" which is "customfield_10158" when the Task is transitioned from "Invoiced" (In Progress) to "Payment Received" (Done). 

I was able to get the basic automation done but have had zero luck in getting it to sum the Invoiced Amount to the Total Payments received. My research tells me that you cannot sum custom fields like this via JQL and I am not familiar with Json and am basically stuck. I have done some research and believe that I need to send a Web Request, but could really use some help. 

I am also having trouble getting it to select the issues in the Look Up without explicitly stating the parent ID. I figured that would be relatively easy once I figured out the summing part, but suggestions are welcome. 

Also, I don't have a preference if it adds the invoiced amount of the card being transitioned to the Total or if it just takes all of the cards in the Invoiced Paid column related to the parent and sums them all up and overwrites the existing total. 

 

Jira_help1.jpg

 

Thanks in advance!

Shelley

 

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 27, 2023

Hi @shelleyc -- Welcome to the Atlassian Community!

In your lookup issues JQL that is inside of the branch, you may refer to parent = {{issue.key}} rather than the literal value.  Inside of a branch, {{issue}} refers to the branched-to issue(s).

What is the purpose of your webrequest in the rule?  If you just need the sum from the lookup you could do that with

{{lookupIssues.your field.sum|0}}

Kind regards,
Bill

I have tried every combination of {{lookupIssues.Invoiced Amount.sum|0}} and {{lookupIssues.customfield_10156".sum|0}} and neither of them have worked. It is like it is not recognizing that field at all. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 27, 2023

Smart values for fields are name, spacing, and case sensitive, so a small typo could lead to null results, and no error.

Let's try this: find an example issue with your field and then use this how-to article to confirm the exact name of your smart value.  And...if you do not see the field, that tells you it is not supported by automation rule usage of the REST API.  https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Also...would you please show images of the details of your edit issue action and of the audit log details from the rule execution?  Thanks!

Like Steffen Opel _Utoolity_ likes this

I was finally able to get the correct combination! See my solution below:

working_automation.jpg

My Edit Issue formula is: {{lookupIssues.customfield_10156.sum|0}}.

 

Thank you for the help! This will make a huge difference in keeping track of invoices for a project I am managing.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events