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

Project Area Filter While Fetching changeset and baselines for a component (RTC Enterprise version 6.0.4)

I am using plain Java api to fetch all changeset for a component within a projectArea. But If a component has been added across the project  then by using changesetSearchCriteria it gives me changeset for all project areas. 

Code to fetch all changeset within a time duration :

IChangeSetSearchCriteria criteria = IChangeSetSearchCriteria.FACTORY.newInstance(); 
Timestamp startDateTimeStamp = new Timestamp(startTime); 
Timestamp toDateTimestamp = new Timestamp(endTime); 
criteria.setModifiedAfter(startDateTimeStamp); 
criteria.setModifiedBefore(toDateTimestamp);
criteria.setComponent(componentHandle);
Same is happening in case of BaseLineSearchCreteria : 
Can I apply projectAreaFilter here while fetching all changeset and baselines ?

IBaselineSearchCriteria baselineSearchCriteria = IBaselineSearchCriteria.FACTORY.newInstance(); 
baselineSearchCriteria.setModifiedAfterOptional(new Date(startTime));

baselineSearchCriteria.setModifiedBeforeOptional(new Date(endTime));     
baselineSearchCriteria.setComponentRequired(componentHandle);

    
</pre>
<blockquote>
    <pre style="background-color:#ffffff; color:#000000; font-family:'Menlo'; font-size:9.0pt;">







    </pre>
</blockquote>

1

0 votes

Comments

 A component is not "within" a project area.   It can have a project area "owner" property, but that just determines the access control on the component.   The component can be added to any stream in any project area by a user that has read access to that component and write access to that stream.   Similarly, a change set is not "within" a project area ... it is within a component.


So you will need to clarify what you are doing.

 Hi @ Geoffrey Clemm, Thanks for the response

 I am trying to add project area filter while fetching changesets and baselines for a component. But I can't find any ? Am I doing anything wrong ?

Neither a change set or a baseline is associated with a project area, so "filtering change sets and baselines of a component by project area" doesn't mean anything.


Accepted answer

Permanent link

No, there is no way to use the IChangeSetSearchCriteria or IBaselineSetSearchCriteria and have it filtered by Project Area. Like Geoffrey already said in the comment, change sets and baselines are not associated / scoped to a particular project area. Change sets and Baselines essentially 'live' inside a component, which 'can' have the owner be a project area, but this is only to provide access control on the component (and this ownership can easily be changed to a different project area).

You might have better luck scoping to a particular stream if that might work for you.

Shiva Tiwari selected this answer as the correct answer

0 votes

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
× 10,938
× 411
× 169
× 149

Question asked: Jan 31 '18, 5:26 a.m.

Question was seen: 2,718 times

Last updated: Feb 12 '18, 7:43 p.m.

Confirmation Cancel Confirm