calculate the estimation of a workitem parent
3 answers
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
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
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
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.
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.
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>
Apologies for the kruppy formatting. I tried 1/2 dozen times.