Forums

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

Scripted field in Cloud- sum of story points of linked issues with "Epic Link"or Epic Name

Mohammed-Amine Rouh January 13, 2019

Hi,

I am trying to add an event listener so when any story or subtask is updated then its linked Epic will be updated with the sum of all the story points for its related issues.

I am using JIRA CloudAdaptavist script runner, I couldn't find anything on documentation as they always rely on parents.

The following examples and answers here, do not execute as I get error for the imports : 

- https://community.atlassian.com/t5/Jira-questions/Scripted-field-sum-of-story-points-of-linked-issues-only-with/qaq-p/33025

https://community.atlassian.com/t5/Jira-questions/Scripted-field-to-sum-story-points-of-issues-linked-to-an-epic/qaq-p/456350

 

Would anyone be able to help or direct me to the right answer please ?

Thank you

1 answer

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
January 14, 2019

Hi Mohamed,

Thank you for your question.

I can confirm that the reason that the code you have linked to in the articles above will not work inside of ScriptRunner for Jira Cloud is due to the fact the code you have provided is fro ScriptRunner for Jira Server and this will not work as Atlassian only provide a rest API in Jira Cloud and do not provide a Java API in the cloud like they do in Jira Server.

You can see more detailed information on the differences between the cloud and server versions inside of our documentation page located here.

I can confirm however that we have some example Script Listeners in the cloud documentation located here which you can refer to in order to see an example of how, to sum up, all of the story points for subtasks and to store the total on the parent issue. 

You will be able to take this example script and to modify it in order to achieve your requirement.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer