Script Runner - Calculation from Attributes

Luigi Lari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2024

Dear all,

I would like to post this question as I am not proficient in script writing. Could someone assist me with these two use cases? I am attaching slides I have prepared to aid comprehension.

The first use case involves calculations of number fields.
The second use case entails calculations I need to perform by associating numbers with text fields derived from certain drop-down menus.Use Case 1 - slide 1.PNG

  • Use Case 1 - slide 2.PNGUse Case 2 - slide 1.PNGUse Case 2 - slide 2.PNG 

    Regarding the first use case, I specify these conditions:

    • The calculation is triggered whenever a number field on the children is manually modified.
    • The numeric values of the Epics cannot be changed manually (override).
    • The result of the calculation on the Epic must be available immediately after updating the child tickets.
    • When there are no Child Issues, return empty fields at the Epic level.
    • When only one value exists, still perform the calculation (e.g., ("Capex Value" Child Issue A1 + 0)).

    Thank you.



1 answer

0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2024

Hi @Luigi Lari , welcome to the Atlassian Community and thanks for your question!

First, I added some labels as I think they will help you find an audience that could help you more with the scripting side.

Adaptavist has a library of scripts available, which I would always recommend for someone (like me) who isn't an experienced scripter, to start from - https://library.adaptavist.com/search?library-content%5Bpage%5D=2&library-content%5BrefinementList%5D%5Bapp_pretty_names%5D%5B0%5D=ScriptRunner%20for%20Jira&library-content%5BrefinementList%5D%5Bplatforms%5D%5B0%5D=cloud&library-content%5BrefinementList%5D%5Bfeature_names%5D%5B0%5D=listeners 

When you talk about something that is triggered by another action, normally this would be a Listener, so I have already filtered for you in this link here for Jira, cloud, and Listeners, but I would recommend anyway you have a look there and see if it helps you.

Good luck and cheers!

Luigi Lari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2024

Thanks Valerie for your reply! I will check.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events