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

Automation Rule for Sum

Alexa Gutierrez April 9, 2024

I need help with an automation rule. I have two type of forms that each has Forecasted Hours as a field. I created a new field called Total Forecasted Hours for each as well.  I am trying to set up the rule so for each issue submitted, it sums all the Forecasted Hours and shows it in the Total Forecasted Hours field. Here is the screenshot of what i have but is not working.Forecasted hours.PNG

2 answers

2 accepted

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2024

Hi @Alexa Gutierrez and welcome to the community!

I see the use of Lookup Issues and at a glance it doesn't look right because it should be driven by JQL.  The smart value you have in there would likely be used on an Edit Issue action.

I'm not quite clear on your goal.  You mention that you "have two type of forms that each has Forecasted Hours as a field".  I'm unclear on this.  Is it...

  1. This is a Jira form (Jira Service Management) that is capturing Forecasted Hours several times
    or
  2. You have a number of issues that are capturing the Forecasted Hours and you wish to sum those up on the trigger issue that was just updated

If #1, you would not use Lookup Issues. I'd need more information on the form itself to gain better understanding of the problem you're trying to solve.

Alexa Gutierrez April 12, 2024

Hi mark,

Thank you for taking the time to review my question. My goal is to sum up hours from the field called "Forecasted Hours" and show the total sum in the field called "Total Forecasted Hours" in all issues but by form (Sorry if i am not using the correct terminology). 

1. I have two forms created in Jira Work Management. One called Ideas and the other Hours. (Picture attached). They each have the field "Forecasted Hours". Everytime a user submits a form for either one, they have to fill out that field.
2. I am trying to create a rule where it adds all the Forecasted hours for each form and shows the total in another field. (Third picture - This is an issue i open where you can see a field i created called "Total Forecasted Hours".

Alexa Gutierrez April 12, 2024

Form Hours.PNGForm Ideas.PNGIssue Backend.PNG

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 12, 2024

Thanks for the additional clarity.  This helps me understand why you're trying to use  Lookup Issues action.

So, we need a common thread here. I'm assuming "form" creates a new issue.  And we need to understand how Jira is supposed to know which issues it needs to bring together to perform the sum calculation. 

Most commonly, these issues should be linked in some way so that we can easily execute a query to find the related content.  For example as the user submits the form, is it creating a sub-task on your main issue, creating a linked issue, using a common label, custom field, etc.?

Having that business logic to identify what issues are in play will help us in establishing the JQL that is required to execute the Lookup Issues action

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2024

Hello @Alexa Gutierrez 

Welcome to the Atlassian community.

Can you show us the details of each of those steps?

Can you show us what is in the Audit Log for the rule?

Screenshot 2024-04-09 at 3.02.18 PM.png

 

If the rule has executed you should see an entry there with a status other than CONFIG CHANGE. Click on the "Show More" link next to the most recent entry that is newer than the last entry with a CONFIG CHANGE status, and share the details with us.

Screenshot 2024-04-09 at 3.04.35 PM.png

 

How is the rule not working? What do you expect it to do? Do you expect it to update a field in the newly created issue? Based on what you have shown us there is no step to update any issues.

I think you are also using the Lookup Issues action incorrectly. Lookup Issues requires that you enter a JQL to use to select issues that you want to use in your rule. The results of the Lookup Issues action are stored in the {{lookupIssues}} smart value. It appears that you plugged in a smart value in that action where you needed to specify a JQL.

Can you perhaps provide some screen images of your form and issues and walk us through where values are entered and how you want the automation to update the issues?

Alexa Gutierrez April 12, 2024

Hi Trudy,

Thank you for taking the time to review my question. My goal is to sum up hours from the field called "Forecasted Hours" and show the total sum in the field called "Total Forecasted Hours" in all issues but by form (Sorry if i am not using the correct terminology). 

1. I have two forms created in Jira Work Management. One called Ideas and the other Hours. (Picture attached). They each have the field "Forecasted Hours". Everytime a user submits a form for either one, they have to fill out that field.
2. I am trying to create a rule where it adds all the Forecasted hours for each form and shows the total in another field. (Third picture - This is an issue i open where you can see a field i created called "Total Forecasted Hours".

Alexa Gutierrez April 12, 2024

Form Hours.PNGForm Ideas.PNGIssue Backend.PNG

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events