Forums

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

Need Help with Nunjucks Template to Calcuate Story Points from SubTask

Lokesh Singh Sisodia December 24, 2024

I am using the script below to sum all child subtasks if Story Point changed in any one of them and want to update in the Parent task.

 

I am purpose fully using JWME and not Global automation for some reason. Help on priority is appreciated. 

 

similarly will be trying for Linked issues as well.

 

{% set totalStoryPoints = 0 %} {% for subtask in issue | subtasks("customfield_10004") %} {% if subtask.fields.customfield_10004 is not undefined %} {% set totalStoryPoints = totalStoryPoints + subtask.fields.customfield_10004 %} {% endif %} Status: {{ subtask | subtasks("status") | first | field("fields.status.name") }} {% endfor %} {{ totalStoryPoints }}


1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Valerie Knapp
Community Champion
December 31, 2024

Hi @Lokesh Singh Sisodia , thanks for your question. 

Have you already checked out the product documentation for how to use the Set issue fields post function?

https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465504849/Set+issue+fields 

If not, please check this out. 

If so and you're still not getting anywhere, I usually recommend to contact the vendor for support in these specific use cases as they should be the product expert https://marketplace.atlassian.com/apps/292/jira-misc-workflow-extensions-jmwe 

Best wishes

TAGS
AUG Leaders

Atlassian Community Events