Attribute customization Story story points
I would like to make non-editable and calculate story points for a Story based on the cumulative of it's children work item points.
I also would like to track story progress by adding up all points of completed children work items. The only way I see how this can be done is by adding attribute customization (or may be there is a different mechanism, if yes please let me know what it is ).
How can I query all the children of a work item ? E.g. here:
dojo.provide("com.myteam.StoryPointTotalsProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
dojo.declare("com.myteam.StoryPointTotalsProvider", null, {
getValue: function(attribute, workItem, configuration) {
var id = workItem.getValue(WorkItemAttributes.ID);
(function() {
dojo.declare("com.myteam.StoryPointTotalsProvider", null, {
getValue: function(attribute, workItem, configuration) {
var id = workItem.getValue(WorkItemAttributes.ID);
var children = configuration.getChildren(id); // is this how to obtain all children of the story work item ?
var storyPoints = 0;
for(var i =0 ; i < children.length;i++){
storyPoints += children[i].getValue("com.ibm.team.apt.attribute.complexity");
}
return storyPoints ;
}
});
})();
return storyPoints ;
}
});
})();
3 answers
I don't think you can do it that way. The parent/child relationship is basically a type of links. And I am not aware of the JavaScript API being able to handle link types.
Comments
For all I know JavaScript will not work. Here is a description how to achieve something similar using a Java server extension: https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/
Please note that story points for child stories are rolled up to epics in plans. If you use the built in story points with automation as above, all the roll up in plans would be broken.
Please note that story points for child stories are rolled up to epics in plans. If you use the built in story points with automation as above, all the roll up in plans would be broken.
Comments
and, story points in the traditional Agile mode cannot be summed. because it is a measure of complexity, not duration. (unless you changed to ideal days as the measure.
it would be better to use count of child tasks completed vs total number of tasks. yes, this does not take into account those hard tasks. So much fun!..
it would be better to use count of child tasks completed vs total number of tasks. yes, this does not take into account those hard tasks. So much fun!..