Error while fetching the parent work item type
Mahesh Vasamsetti (17●6)
| asked Aug 06 '15, 9:53 a.m.
edited Aug 07 '15, 2:42 a.m. by Ralph Schoon (63.3k●3●36●46)
ISaveParameter data = (ISaveParameter) serviceUtils.getOperation().getOperationData();
List<IEndPointDescriptor> parentList = data.getNewReferences().getChangedReferenceTypes();
System.out.println("parent list size::::"+parentList.size());
System.out.println("1:::::"+parentList.get(0).getDisplayName());
output:
parent list size::::0
09:26:25,992 [526458721@qtp-1491425509-9 @@ 09:25 TestJazzAdmin1 <com.ibm.team.repository.transport.client.RemoteTeamService spnego-enabled@127.0.0.1> /jazz/service/com.ibm.team.workitem.common.internal.IWorkItemRepositoryService] ERROR c.extensions.workitem.service.impl.TaskServiceImpl - Index: 0, Size:
|
Accepted answer
Ralph Schoon (63.3k●3●36●46)
| answered Aug 07 '15, 2:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Aug 07 '15, 2:43 a.m.
I try to provide a beginners guide here: https://rsjazz.wordpress.com/
I understand the API is not trivial - I am working against it for several years now and I still find a lot of cases where I don't know the API and have to search for examples in the SDK or in the net. This happens almost every time I try something new. So regardless how many beginner guides we would write, every beginner will always feel that there should be something else in there. Setting up Rational Team Concert for API Development and the Extensions Workshop and Understanding and Using the RTC Java Client API and What API's are Available for RTC and What Can You Extend? and various other posts are meant to be beginners guides. There are many examples on the blog that you can follow, assuming you have set up your environment for debugging as described in the Extensions Workshop. In the link I mentioned in my initial answer all those are kind of accessible in the introduction "If you are just starting". In addition if you download the code and actually look into the code you find this code piece: private IWorkItemHandle findParentHandle(ISaveParameter saveParameter, IProgressMonitor monitor) throws TeamRepositoryException { // Check to see if the references contain a 'Parent' link ListI don't know if you actually read the post that I send in my first answer. I don't have the impression you did. So I question why I actually spend the precious time to
However, more examples code for the link API can be found here: https://rsjazz.wordpress.com/?s=link
Mahesh Vasamsetti selected this answer as the correct answer
Comments PS: the call you use in your example will return the end point descriptors where there are changes e.g. new references added or referenced deleted.
Mahesh Vasamsetti
commented Aug 13 '15, 1:33 a.m.
This is working for me. Thank you so much...
- Mahesh
|
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.
Comments
For the next questions you want to ask, please see this guidance: How should I ask a question in the Forum if I want to receive useful answers?
For this one: I can't see an error. This is probably just wrong usage of the API. See https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ for an example.
Thank you Ralph Schoon. I Appreciate your quick response and useful suggestions all the time. I understand your frustration, you may be seeing such questions all the time, so may be thinking like waste of time.