It's all about the answers!

Ask a question

Attribute customization Story story points

Natalia Liaskovski (5711219) | asked Dec 11 '15, 8:56 p.m.
 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:


(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("");
                  return storyPoints ; 


3 answers

permanent link
Donald Nong (14.5k414) | answered Dec 13 '15, 11:19 p.m.
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.

Natalia Liaskovski commented Dec 14 '15, 7:54 a.m. | edited Dec 14 '15, 8:13 a.m.

 Thanks, Donald. 

Yes, the parent - child relationships are links (the code above is a crude approximation just for illustration purposes). I thought that may be it is possible to do a query in js to collect all children work item IDs ? Is there any way to do what I want (I don't care if it is js, java plugin, or any other means) ?

Thank you

Jonas Studer commented Jan 15 '16, 7:59 a.m.

Donald has no idea about the JS API but spams his opinions...
I already told you once, that it IS possible to set or read links from Workitems!

Ralph Schoon commented Jan 15 '16, 8:05 a.m. | edited Jan 15 '16, 8:10 a.m.


consider to edit or delete your comment, I find it quite offensive. This is a forum for professionals. Behave that way, please.

Donald refers to the JavaScript Attribute Customization which is the topic of the question and, as he correctly mentions, can not access links (for all I know and what is written down). At least not with the published API. There might be ways to do it that might work in the Web UI, but that would not be officially supported.

To do something as requested above you would typically use an approach like described here:
RTC Update Parent Duration Estimation and Effort Participant

Please note, that the planning component already does that for you in plans.

permanent link
Ralph Schoon (63.1k33646) | answered Dec 14 '15, 8:01 a.m.
For all I know JavaScript will not work. Here is a description how to achieve something similar using a Java server extension:

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.

Jonas Studer commented Jan 15 '16, 8:15 a.m.

Mister Schoon,

IT IS Possible! I for myself use the child items to see if a parent is overdue or not.

Here's one way to get the children of a specific workItem.
You can test it with RESTClient i.E.



Ralph Schoon commented Jan 15 '16, 8:34 a.m.

Jonas, please - carefully - read the context of this question carefully and realize that this is attribute customization. See .

There is no documentation in that API how to do that. In fact, a change in a different work item can even not trigger this. The attribute customization also runs in the Eclipse client, in case you use it. Where it is absolutely unclear, what other framework classes you have and what you can do - e.g. you don't have a session object. You don't even have a hint of the server URL, etc.

I am fully aware that you can use REST and OSLC to do all kinds of magic and stuff with JavaScript. But it is always a question in which context you want to do that.

permanent link
sam detweiler (12.5k6195201) | answered Dec 14 '15, 8:29 a.m.
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!..

Geoffrey Clemm commented Dec 23 '15, 12:34 a.m. | edited Dec 23 '15, 12:35 a.m.

In most tools that support agile that I'm aware of (including RTC), story points numbers can be summed (and as Ralph points out, they are summed by RTC).   

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.