It's all about the answers!

Ask a question

fetch parent workItem details in java value provider in RTC


kavita herur (5876894) | asked Jan 26 '15, 6:55 a.m.

Hi  All,

 I have created java value provider, which will fecth current Iteration. And also want to fetch few details from parent workItem.

I have seen configuration.getChild  will it give me the parent workItem?

Thanks,

Kavita

3 answers



permanent link
Ralph Schoon (63.6k33647) | answered Jan 26 '15, 7:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, the configuration is the configuration information in the process XML. You have to find and resolve the parent link/references as described here:
https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

Comments
kavita herur commented Jan 26 '15, 8:35 a.m.

I have reffered this link before, As its mentioned to get references

IWorkItemServer workItemService = getService(IWorkItemServer.class);
IWorkItemReferences references = workItemService.resolveWorkItemReferences(workItem, null);

is this can be used in JAVA VALUE PROVIDER? But I see error on "getService" though I made sure that import is correct

Thanks,

Kavita


permanent link
kavita herur (5876894) | answered Jan 26 '15, 8:47 a.m.

Operation participant is extended from "AbstractService"  class So I feel it will work in participant but not in JAVA VALUE PROVIDER.

though I included  "import com.ibm.team.repository.service.AbstractService;" in my provider but still shows error.

 It would be great help if I get to know solution.

Thanks,

Kavita


permanent link
Ralph Schoon (63.6k33647) | answered Jan 26 '15, 11:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Sorry, did nit realize you talked about value providers.

Please see: https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ for providers as examples.

You can use the getService() only if you extend the AbstractService. this is only available on the server. Since value providers need to run on the server as well as the client, you can mostly only use the common API and only what you can reach from the API you have. Please see the blog and examples above for more information.

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.