It's all about the answers!

Ask a question

calculate the estimation of a workitem parent

Antoine LELEU (5012728) | asked Jul 23 '12, 11:30 a.m.
retagged Jul 23 '12, 7:51 p.m. by Millard Ellingsworth (2.5k12431)

I would like calculate automaticly the field "Estimation" from the estimation filed of the child workitems.

I looking for a script or a code to integrate.

Thanks for your help,


3 answers

permanent link
Ralph Schoon (62.7k33643) | answered Jul 24 '12, 1:43 a.m.
This has been asked several times now. You will have to create a followup action. See and articles related to your version.

 Scripting does not work as far as I can tell, you can't follow the links in scripts. Also I was not able to set the duration field in scripts.

Antoine LELEU commented Jul 24 '12, 3:48 a.m. | edited Jul 25 '12, 9:08 p.m.


Hello Ralph,

Thanks four your answer. 
Effectively, i found fiew questions like mine after my post. Sorry for that.

But, it seems that create followup action is very complicated. I don't realy understand how works the extension workwhop.
Do i need to install an other RTC plateform like a lab ?

Thanks you very much for your help...


permanent link
Ralph Schoon (62.7k33643) | answered Jul 24 '12, 4:28 a.m.
edited Jul 24 '12, 4:33 a.m.
Hi Antoine,

no problem. I am getting better with searching, probably because I have seen so many posts and found and know the keywords to use.

Yes, the extensions are more complex than scripting. On the other hand scripting just does not cut it right now, except very basic scenarios.

The Extensions are great, because you can really debug them and use the Plug-In development Environment environment to search the API.

You should closely follow the workshop. The instructions are very detailed. What you basically do is to setup a new RTC deployment with the RTC SDK on your machine and use that as development environment.

If you don't need a configuration UI for the followup action, you can skip the lab. The last lab is about deploying. You should definitely do that.

You will end up having an example you can use as a starting point for your work. You can create your own extension. based on how the example is done.

You will probably have issues with the SDK e.g. how to get the parent and the siblings. 8-) There are several posts with code in the forum. If you get stuck, post a new question and tag it with extending. Don't feel bad about asking, nobody knows the whole API and we try to help each other as good as possible.

Some additional reading:

- (look trough the older posts too for API hints)

Antoine LELEU commented Jul 26 '12, 5:13 a.m.

Thansk Ralph,

This last 2 days, i followed the RTC Extension Workshop. I understant basicly how add follow up action through the plugin development. However, it's complicated for me to code a new plugin for my need. Do you know where i can found several example of plugins and follow up action ?



Ralph Schoon commented Jul 26 '12, 5:22 a.m.

I would suggest searching For example

There are some examples in There are also some in IBM developerworks.

Ralph Schoon commented Jul 26 '12, 5:36 a.m. | edited Jul 26 '12, 5:36 a.m.

One more remark, you can use refactoring to start with the example code. Please make sure to include xml files if you refactor and check the plugin.xml later for correct content. class names thend to be wrong after refactoring in the plugin.xml if you didn't include the XML files. This is easy enough to find and fix. You also want to change the ID's e.g. forthe component from your example to something like com.mycompany.extension.somename.

There are also a lot of code snippets e.g. how to get the parent and child work item that you can find in thisforum.

permanent link
Kevin Ramer (4.5k8178197) | answered Jul 25 '12, 9:48 a.m.
edited Jul 25 '12, 9:56 a.m.
Disclaimer:  I haven't read any of the links above, but would like to point out this nugget I located via OSLC. 

Suppose you have a query for a work item thus:


In the result will be
and if one follows that link:
<?xml version="1.0" encoding="UTF-8"?>
 <oslc_pl:Progress xmlns:oslc_pl="" rdf:about="https://zrtc01:9443/ccm/oslc/workitems/_2-2-wMwbEeGGpPezq-xDTA/progressTracking" xmlns:rdf="">
<oslc_pl:effortRemaining>86400000</oslc_pl:effortRemaining> <oslc_pl:planDurationCompleted/> <oslc_pl:planDurationRemaining/> <oslc_pl:itemsCompleted>2</oslc_pl:itemsCompleted> <oslc_pl:itemsRemaining>3</oslc_pl:itemsRemaining> <oslc_pl:itemsRemainingEffortEstimated>3</oslc_pl:itemsRemainingEffortEstimated><oslc_pl:itemsRemainingSizingEstimated/> </oslc_pl:Progress>
The units of workCompleted, effortRemaining are mili-seconds so division by 3600000 will give hours.

Apologies for the kruppy formatting.  I tried 1/2 dozen times.

Your answer

Register or to post your answer.