How can I access attributes of a "Contributes To" work item across CCM repositories in a Follow-up Action?

Phrased differently:
The "tracks" link has the URI of the work item, so if Work Item 1 (on server ccm1) tracks Work Item 2 (on server ccm2) can a follow-up action on ccm1 access the attribute of Work Item 2 on ccm2? If so, how can it be done, or is it a bad practice to have one server make a request to another server? Also, do all the ccm servers have to use the same JTS server, or can this work across JTS server environments?
The function I am trying to achieve is to have a custom attribute which contains the rolled up story points into a tracking work item for monitoring progress. Basically like the current parent child relationship, but this has to cross multiple ccm servers, so I have to use the Tracks/Contributes To link.
3 answers

Comments

The follow-up action is a custom plugin. The question is how does one communicate between CCM servers in the follow-up action. Within a single server, one can access all the work items, but in a multi-server environment (where the servers are "friends") all one has is the URI of the other work item, so is there a way with the URI to request the attributes of the work item from the other server?

I have not tried to cross the border between two CLM and I don't know how that would work yet.
Comments

In the code, the link is "tracked by" on one side and "tracks" on the other. Within the same repository one would just use IWorkItemServer:
workItemServer.getAuditableServer().resolveHandleFromLocation(Location.location(uri));
So what mechanism is used to get the other ccm server's WorkItemServer or AuditableServer to get the handle from the uri and then use its AuditbleCommon to resolve the handle to get the actual work item.

As I said, I don't know if the API will automatically log in to the other server. I haven't tried that yet.
You would have to try. The location(s) contain the public URI of the different CCM's. If the CCM's are friends or registered to the same JTS, the backing code might do it for you. Otherwise this would be a problem, since you can't get at the credentials of the user to log into the remote server.