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)
 Hello,

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,

Antoine

3 answers



permanent link
Ralph Schoon (63.4k33646) | answered Jul 24 '12, 1:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This has been asked several times now. You will have to create a followup action. See https://jazz.net/library/article/1000 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.



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

Antoine  


permanent link
Ralph Schoon (63.4k33646) | answered Jul 24 '12, 4:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 24 '12, 4:33 a.m.
Hi Antoine,

no problem. I am getting better with searching Jazz.net, 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:

- https://jazz.net/library/article/784
- http://ryehle.wordpress.com/2011/12/21/adding-a-custom-ant-task-to-your-build-toolkit/ (look trough the older posts too for API hints)
- http://ryehle.wordpress.com/2011/11/21/finding-the-right-service-api-for-your-process-extension/
- http://jazzpractices.wordpress.com/2012/02/28/tip-finding-the-right-method-in-the-rtc-api/


Comments
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 ?

Thanks,

Antoine


Ralph Schoon commented Jul 26 '12, 5:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I would suggest searching jazz.net. For example https://jazz.net/search_results.jsp?q=participant#page=0&type=type%3DDocument-WikiPage&q=participant

There are some examples in https://jazz.net/wiki/bin/view/Main/PreconditionFollowupCreation2 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.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.5k9186201) | 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:

https://zrtc019443/ccm/oslc/contexts/_RB2v0PRCEeC68OiC1xPT9A/workitems?oslc_cm.query=dc:identifier=406

In the result will be
<rtc_cm:progressTracking>
and if one follows that link:
<?xml version="1.0" encoding="UTF-8"?>
 <oslc_pl:Progress xmlns:oslc_pl="http://open-services.net/ns/pl#" rdf:about="https://zrtc01:9443/ccm/oslc/workitems/_2-2-wMwbEeGGpPezq-xDTA/progressTracking" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<oslc_pl:sizingUnitsCompleted/>
 <oslc_pl:sizingUnitsRemaining/>
<oslc_pl:sizingUnitsLabel/>
<oslc_pl:sizingUnitsShortLabel/>
 <oslc_pl:workCompleted>
115200000</oslc_pl:workCompleted>
<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.


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.