Hi, I need to calculate and display a score in a Jira Form based on multiple custom field values also completed in the form. All form fields are linked to Jira custom fields. I am using automation with a lookup to get the corresponding value of each field's drop-down selection, and math smart values to add those values for a sum (i.e., the overall score) and update the overall score field. I know the values aren't written to the Jira database until the form is saved or submitted, and I can't use the Form Submit trigger because the Customer needs that score to enter other data in the form. I want to display the overall score to help the Customer complete other fields on the form before submitting it, but I can't figure out a way to automate a Form Save or otherwise be able to calculate the form field values. Or is there another approach I can take to achieve this?
I'm using a company-managed project in JSM Standard cloud, here's my automation:
In this branch, if either of two drop-down selection options is selected, then the overall score is 100. The action above the one shown just clears the field if there's already a value in it.
This is the selection list value lookup:
This is the calculation that adds the looked-up values for a sum (overall score):
The actual calculation "code" is:
{{#=}}{{PScoreLookup.get(issue.customfield_11044.value)}} + {{PScoreLookup.get(issue.customfield_11039.value)}} + {{PScoreLookup.get(issue.customfield_11043.value)}} + {{PScoreLookup.get(issue.customfield_11038.value)}} + {{PScoreLookup.get(issue.customfield_11071.value)}} + {{PScoreLookup.get(issue.customfield_11041.value)}} + 0 {{/}}
The first branch works if I manually Save the form (not Submit), the score of 100 is displayed. The second branch does not work -- nothing is displayed.
The resolution of the images you posted is a bit low, and so it is difficult to see what is happening in the logic. From what I can see, are you observing one of these...
Kind regards,
Bill
Hi @Bill Sheboy , thanks for responding to my "tome"! If I understand your question correctly, I've been testing this by only selecting an option once for each driver (I'm not worried yet about recalculating when a value changes), and none of the values entered before the lookup are related to those fields. What I'm looking for is how to "trigger" a form Save (not a Submit) so the numeric values found via lookup that are associated with selections made by the Customer in the form can be written to the Jira database and, so, can be used to calculate the total.
I just realized you probably need to know what the lookup is doing (sorry):
Regulatory or Compliance Requirement |
Not a Reg/Compliance Rqmt Reg/Compliance Rqmt |
0 100 |
Executive Leadership Initiative
|
Not an Exec Leadership Initiative Exec Leadership Initiative |
0 100 |
Timing/Project Completion
|
Very flexible Somewhat flexible Hard deadline |
5 10 15 |
Internal Controls Improved data quality, security, reporting, etc. |
Low impact on ICs Moderate impact on ICs High impact on ICs |
6 13 20 |
System Integrity
|
Low impact on SI Moderate impact on SI High impact on SI |
5 10 15 |
Financial/ROI
|
Low impact on Fin/ROI Moderate impact on Fin/ROI High impact on Fin/ROI |
5 10 15 |
External Resources
|
Low impact on ER Moderate impact on ER High impact on ER |
20 13 6 |
Process Efficiencies
|
Low impact on PE Moderate impact on PE High impact on PE |
5 10 15 |
Driver |
Options |
Weight |
So for instance, if the Customer indicates the Timeline for the request is "Somewhat flexible" (10 points), the application developed by the request will have "Low impact on ICs" (Internal Controls, 6 points), and all other drivers are the minimum impact, then the score would be 10+6+5+5+20+5 = 51 out of 86 possible points. (Either of the first two drivers being 'true' will automatically assign an overalls score of 100 because they have to be done and are highest priority.)
I believe that when you're entering data in a Jira form, the form has to be Saved or Submitted for the values to actually be saved to the Jira database. I just don't know how to trigger a "save" so the Customer can continue working on the form while it's open (submitting the form causes other things to happen so I don't want them to submit).
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.