Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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);
                 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 ; 

        }
    });
})();

0 votes



3 answers

Permanent link
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.

0 votes

Comments

 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

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!

Jonas,

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
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.

0 votes

Comments

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.

https://"YourServer"/"YourApplication"/oslc/workitems/"ID_OF_ITEM"/rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.children?oslc_cm.properties=rtc_cm:archived,rtc_cm:contextId,dc:identifier,dc:title,rdf:resource,rtc_cm:startDate,rtc_cm:endDate,dc:type{{}},rtc_cm:filedAgainst{{}},rtc_cm:state{{}},rtc_cm:plannedFor{{}},rtc_cm:teamArea{{}},oslc_cm:priority{{}},rtc_cm:com.ibm.team.apt.attribute.complexity{{}},rtc_cm:timeline{{}}

https://localhost:7443/jazz/oslc/workitems/3/rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.children?oslc_cm.properties=rtc_cm:archived,rtc_cm:contextId,dc:identifier,dc:title,rdf:resource,rtc_cm:startDate,rtc_cm:endDate,dc:type{{}},rtc_cm:filedAgainst{{}},rtc_cm:state{{}},rtc_cm:plannedFor{{}},rtc_cm:teamArea{{}},oslc_cm:priority{{}},rtc_cm:com.ibm.team.apt.attribute.complexity{{}},rtc_cm:timeline{{}},

Jonas, please - carefully - read the context of this question carefully and realize that this is attribute customization. See https://jazz.net/wiki/bin/view/Main/AttributeCustomization .

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
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!..

0 votes

Comments

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: Dec 11 '15, 8:56 p.m.

Question was seen: 2,595 times

Last updated: Jan 15 '16, 8:34 a.m.

Confirmation Cancel Confirm