Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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.

0 votes



One answer

Permanent link

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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,950

Question asked: May 29 '18, 1:03 a.m.

Question was seen: 1,835 times

Last updated: May 29 '18, 3:31 a.m.

Confirmation Cancel Confirm