Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation to trigger Save in a JSM Form

Susan Waldrip
Community Champion
July 22, 2025

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:

automation rule.jpg

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.

if either reg_compliance then equals 100.jpg

This is the selection list value lookup:

selection value lookup.jpg

This is the calculation that adds the looked-up values for a sum (overall score):

lookup values sum with smart values.jpg

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. 

1 answer

1 vote
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.
July 22, 2025

Hi @Susan Waldrip 

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...

  • The incorrect values are used in the lookups based on earlier edits in the rule? 
    • If so, there may be a Re-fetch Work Item Data action missing so the changes are used the later rule logic
  • Even though the rule is manually triggered, you were expecting other values to exist in the fields?
  • Something else?

 

Kind regards,
Bill

Susan Waldrip
Community Champion
July 22, 2025

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).

Like # people like this
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.
July 23, 2025

Thanks for the additional information, and...I do not believe a rule can be triggered when a form is only saved.

Checking the JAC and Ecosystem public backlogs, I do not find any suggestions for that feature.  And I searched in the developer community and did not find anyone else trying this.  Finally, I checked and there is no event for webhooks in system settings which would allow creating an Incoming Webhook Trigger for this case.

 

You may need to ponder the customer steps / workflow to decide how mitigate / solve this one.

Like Susan Waldrip likes this
Susan Waldrip
Community Champion
July 23, 2025

Thank you @Bill Sheboy , I appreciate your time to look at all those resources. I'll have to implement a different approach to enable this, and I'll open a JAC ticket.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events