It's all about the answers!

Ask a question

Under what conditions does RTC display "full" information of remote change sets ?


Kevin Ramer (4.5k8183200) | asked Aug 19 '15, 3:49 p.m.
Hi,
We have users who have begun using Related Change Requests in one RTC project when delivering changes into separate repositories.  No remote SCM.

Users have discovered that not all the information about the change set is displayed.  For example, in the "local" RTC work item links, snapshot compares, etc things like the work item ID, component aren't displayed when the work item linked to the change set is in the "remote" project.

I have done some research and have found:
  • Sometimes in a work item view to see details of the change set, a login hover (web ui) might display [ I saw it once for a particular work item, thereafter the displayed info was "complete" ]
  • In Eclipse client, doing a compare of snapshots can display (unreachable in remote.rtc.server ) if only logged into the "local" repository
  • Login to the "remote" and refreshing shows [remote.rtc.server] adjacent to those change sets only moments ago were unreachable.
  • I'm guessing there are read permissions involved as well (i.e. user is not a member at both ends of the change set links )
They also report that using a java application they cannot ferret out the desired change set information. 

There is not much discussion on jazz.net about this scenario.

One answer



permanent link
Kevin Ramer (4.5k8183200) | answered Aug 21 '15, 4:14 p.m.
From the "For What It's Worth" department:

Our users shared a java file with us, which was very like this post.  In the method that actually output results was this:


               Collection<IChangeSetLinkSummary> linkSummaries = workspaceManager.getChangeSetLinkSummary(changeSets, new SysoutProgressMonitor());
               
                // Collect all of the link handles for the change sets so that we can do one fetch of all of the links
                List<ILinkHandle> linkHandles = new ArrayList<ILinkHandle>();
                for (IChangeSetLinkSummary linkSummary: linkSummaries) {
                    linkHandles.addAll(linkSummary.getLinks());
                }
               
                // Some of the change sets could be attached to the same work item. Although work item handles
                //  do have a unique ID those objects don't implement equals so we use a map of a work item handle
                //  UUID to a work item handle with that UUID.
                HashMap<UUID, IWorkItemHandle> workItemHandles = new HashMap<UUID, IWorkItemHandle>();
                for (Object o: itemManager.fetchCompleteItems(linkHandles, IItemManager.DEFAULT, new SysoutProgressMonitor())) {
                    ILink link = (ILink) o;
                   
                    // Any links that aren't item references are not work item links so discard them now
                    if (link.getTargetRef().isItemReference()) {
                        IItemHandle itemHandle = (IItemHandle) link.getTargetRef().resolve();
                       
                        if (itemHandle instanceof IWorkItemHandle) {
                            workItemHandles.put(itemHandle.getItemId(), (IWorkItemHandle)itemHandle);
                        }
                    }
                }
                // Fetch all of the work items so that we can inspect the approvals
                for (Object item: itemManager.fetchCompleteItems(new ArrayList<IItemHandle>(workItemHandles.values()), IItemManager.DEFAULT, new SysoutProgressMonitor())) {
                    IWorkItem workItem = (IWorkItem)item;
                   
                    System.out.println("[" + workItem.getId() + "] " + workItem.getHTMLSummary().getPlainText());
                   
                }

The test in bold was failing for some of the returned ILink, so I dug a little and found a getComment() method

link.getTargetRef().getComment()
which I used as an else part to that if

                        ......
                        if (itemHandle instanceof IWorkItemHandle) {
                            workItemHandles.put(itemHandle.getItemId(), (IWorkItemHandle)itemHandle);
                        }
                    }
                    else 
                    System.out.println(link.getTargetRef().getComment());

That last System.out.println gave info very like what is displayed in the RTC UI's.   There is also a getExtraInfo() method on the IReference object that in this case provides the PublicURI of the remote change and an ID ( which seems to be constant )

 

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.