Attribute customization Story story points
(function() {
dojo.declare("com.myteam.StoryPointTotalsProvider", null, {
getValue: function(attribute, workItem, configuration) {
var id = workItem.getValue(WorkItemAttributes.ID);
return storyPoints ;
}
});
})();
3 answers
Comments
Thanks, Donald.
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.
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
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.
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!..