It's all about the answers!

Ask a question

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


0
1
Shiva Tiwari (173) | asked Jan 31 '18, 5:26 a.m.
edited Jan 31 '18, 6:00 a.m.

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>

Comments
Shiva Tiwari commented Jan 31 '18, 6:08 a.m. | edited Jan 31 '18, 6:09 a.m.


Geoffrey Clemm commented Jan 31 '18, 10:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 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.


Shiva Tiwari commented Feb 01 '18, 11:42 p.m. | edited Feb 01 '18, 11:42 p.m.

 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 ?


Geoffrey Clemm commented Feb 05 '18, 3:38 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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
David Lafreniere (4.0k7) | answered Feb 12 '18, 7:43 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

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

Your answer


Register or to post your answer.