It's all about the answers!

Ask a question

Need help with RTC Server side API to extract contributor of parent WI


Mohan Udata (111) | asked May 29 '18, 1:03 a.m.

Hello,

I am new to RTC and working on server side plugin wherein once parent WI is saved it triggers different child WI's. Child WI is initialized with most of the parent WI details like, Project Area, couple of custom Enumerator attributes.  

There is a requirement wherein all the child WI contributor should be initialized with the contributor selected in parent WI. I see lots of examples for client side API to extract contributor which implements following code

if ((value instanceof IContributorHandle)) {
IContributor contributor = (IContributor) getTeamRepository()
.itemManager().fetchCompleteItem(
(IContributorHandle) value, IItemManager.DEFAULT,
getMonitor());
return contributor.getName();
}

I need something similar for server side to extract Contributor and also initialize child WI Contributor with the value selected in parent.

One answer



permanent link
Ralph Schoon (63.1k33645) | answered May 29 '18, 3:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

How to find the parent and work across parent child links can be found here:
https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/
https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

How to access the owner of a work item can be found here: https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/ .Any other IContributor attribute can be read using getValue(IAttribute). https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/ also shows how to get the currently logged in user.

If you haven IContributor (or an IContributorHandle) you can follow https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ and use parentworkingcopy.setOwner(value) or parentworkingcopy.setValue(contributorIAttribute,value) to set the attribute.

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.