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.
Thanks in advance!
Shelley
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was finally able to get the correct combination! See my solution below:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, i can not get i work on datacenter. Is your automation running on cloud or datacenter version?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @wstromm -- Welcome to the Atlassian Community!
For Jira Data Center's version of automation, custom fields and many other fields are not yet supported for the Lookup Issues action. Please watch / vote for this suggestion to see progress on adding them: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
There are two possible workarounds, depending upon what you need to do:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.