How to get project area details for a changeset rtc java-api
Accepted answer
As far as I can tell, there is no direct relationship between a change set and a project area in EWM.
It is absolutely possible to access the same change set in several project areas. So it is unclear what you want to achieve with this information, that is not really provided or available.
It would be possible to access the project area context in an operation e.g. during a deliver in a pre condition or follow up action.
The interface IChangeSet provides you with the component the change set belongs to. The component is owned by a user or a project area. In the latter case, you can access said project area. Components are selected in streams and streams are owned by a project area, which might be another relationship. Please note that the stream does not have to be in the same project area (owned by) as the component(s).
Comments
The task was to take all the task workitem changeset and its file content as well as full path of every file.
From task workitem am able to fetch changeset links
From changeset links i will be able to get the file content
But for the full path always i need a configuration
To get the configuration i use below code -> which takes more time so i thought i can provide some more criterias for example "projectarea name" (exact owner name) -- now how can i fetch project area name from changeset handle or ichangeset - can you please let me know.
or any other way how can i get the full path - without a performance hit
IWorkspaceSearchCriteria criteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
criteria.setKind(IWorkspaceSearchCriteria.STREAMS);
List<IWorkspaceHandle> workspaceHandles = workspaceManager.findWorkspacesContainingChangeset(csHandle, criteria, Integer.MAX_VALUE, monitor);
criteria.setKind(IWorkspaceSearchCriteria.STREAMS);
List<IWorkspaceHandle> workspaceHandles = workspaceManager.findWorkspacesContainingChangeset(csHandle, criteria, Integer.MAX_VALUE, monitor);
try {
IConfiguration configuration = null;
for(IWorkspaceHandle workspaceHandle: workspaceHandles){
IWorkspaceConnection workspaceConnection = workspaceManager.getWorkspaceConnection(workspaceHandle, monitor);
configuration = workspaceConnection.configuration(changeSet.getComponent());
return configuration;
IConfiguration configuration = null;
for(IWorkspaceHandle workspaceHandle: workspaceHandles){
IWorkspaceConnection workspaceConnection = workspaceManager.getWorkspaceConnection(workspaceHandle, monitor);
configuration = workspaceConnection.configuration(changeSet.getComponent());
return configuration;
You could limit the search to Workspace Connections owned by/visible to one project area if you wanted. The search would then not show the ones owned by/visible to other project areas.