Need help with script for calculate and average

Madhu February 26, 2021

Hi Team,

I need help 

I have parent issues task under task i have links contains in issues in that link issues i have some calculated number field.

for ex in 1 task i have 60 and task 2 i have 90 both values need to calculate and average the fields and the average value need to display in parent.

xyz ----parent issues

Link conatins in 

1 task  child  ---- number 60

2  task child ----- 90

60+90=150

average 150/2=75

the value 75 need to display in parent xyz field.

 

please help me how to write  script for this

 

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2021

We need to know what app is providing the place for you to do the scripting.

We can assume you are using Jira as the application, as you're talking about issues, and in there I can tell you that you need to use a scripted field or listener to do the work, but Jira does not have any scripting functionality, so you need an app to add some, and before we can give you any scripts, we need to know which one you are going to use.

Madhu February 28, 2021

we are using script runner app

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2021

https://library.adaptavist.com/entity/calculate-the-sum-of-all-values-of-a-custom-field-in-linked-issues is a script that does most of what you want and is easy to add an "average" step to.

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2021

Hi @Madhu ,

which app are you using for that?

Madhu February 26, 2021

app???

Madhu February 26, 2021

i need to write script for this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events