- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 02:09 AM
Update story points automatically based on the combined effort (story points) of its sub-tasks. Can someone help me achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 02:21 AM
Hi @MK-p ,
Create one before Insert/Update BR on story task table and use below code in your business rule.
var storyGR = new GlideRecord('rm_story');
if (storyGR.get(current.parent)) {
var subTaskGR = new GlideRecord('rm_scrum_task');
subTaskGR.addQuery('parent', current.parent);
subTaskGR.query();
var totalStoryPoints = 0;
while (subTaskGR.next()) {
totalStoryPoints += parseInt(subTaskGR.planned_hours);
}
storyGR.story_points = totalStoryPoints;
storyGR.update();
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 02:21 AM
Hi @MK-p ,
Create one before Insert/Update BR on story task table and use below code in your business rule.
var storyGR = new GlideRecord('rm_story');
if (storyGR.get(current.parent)) {
var subTaskGR = new GlideRecord('rm_scrum_task');
subTaskGR.addQuery('parent', current.parent);
subTaskGR.query();
var totalStoryPoints = 0;
while (subTaskGR.next()) {
totalStoryPoints += parseInt(subTaskGR.planned_hours);
}
storyGR.story_points = totalStoryPoints;
storyGR.update();
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 02:28 AM
Hi @MK-p
As per my, it is not a valid case, the reason to begin a story have a task for another team or a different task type like analysis, documentation or testing. There might be testing done by the Business or BA which should not be part of the story point. You can use BR to combine it but one more thing, the story point is decided at the beginning and a task may get created during the story life cycle if you add the point in the story the sprint capacity gets impacted and you will not get a clear picture of the. Either complete the task beforehand and then BR should run but the story point only covered development stuff.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************