Forums

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

Forms for Confluence - How to calculate the sum of several inputs?

Nicolas Casel
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.
March 21, 2017

After users have selected a unique value in 5 different fields (through 5 drop-down lists) and submitted a form, I would like to calculate the sum of these 5 values. Is it possible via the 'Forms for Confluence' macro?

Here is an example for a submission:

 

Userid - Date - Risk - Access complexity - Confidentiality - Exploit
--------------------------------------------------------------------
xxxx - 20/03/2017 - 5 - 3 - 5 - 1

 

In this case, sum should be: 14

 

1 answer

1 accepted

0 votes
Answer accepted
Rafael Franco
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.
March 21, 2017

Hi Nicolas,

Currently there is no way we can calculate the fields.

The good news is that we're releasing soon a new version of ScriptRunner for Confluence that will allow one to create Script Macros that can inject Javascript. This will allow you to calculate the sum of fields on the fly.

I'll let you know when we release this new version.

Regards,

Rafael

Shari Kreye June 27, 2017

Hi Rafael,

Do you have an update on the new Scriptrunner for Confluence version?

Rafael Franco
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.
June 27, 2017

Hi Shari,

The latest version of ScriptRunner for Confluence contains the possibility of adding Javascript in a ScriptMacro.

Could you please update and let me know if you're now able to calculate the fields?

Regards,

Rafael

Shari Kreye June 27, 2017

Hi Rafael,

I actually just submitted another question because I don't think the ScriptRunner for Confluence is something that will work for me. My question is at the link below. Perhaps you can help me with that one?

https://community.atlassian.com/t5/JIRA-questions/Can-I-calculate-the-sum-of-fields-captured-across-multiple-tasks/qaq-p/602300#M199292

Thanks for your reply,

Shari

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events