Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get project area details for a changeset rtc java-api

 I need to get the project area details like project area name or project area uuid in which the changeset belongs.

I could see projectAreaId in the changeset link but not able to the project area id through RTC Java Api.

I have Ilink, IChangeSet, IChangeSetHandle

Thanks in advance

0 votes


Accepted answer

Permanent link

 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).

Dinesh Senthilvel selected this answer as the correct answer

0 votes

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);
try {
            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. 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Dec 05 '22, 4:36 a.m.

Question was seen: 1,286 times

Last updated: Dec 05 '22, 5:30 a.m.

Confirmation Cancel Confirm