It's all about the answers!

Ask a question

Query ChangeSets of specific ProjectArea / TeamArea


Marc Mai (1111) | asked Jul 30 '12, 9:22 a.m.
Hi!
I want to generate Users Activity Reports depending on their Check-In behavior using plain java api.
Therefore I need to Query ChangeSets by User and ProjectArea / TeamArea.

I found out how to query for a user's ChangeSets by using IChangeSetSearchCriteria.setAuthor(...)
How can i further restrict the query to a special ProjectArea / TeamArea?

Atm I'm doing the following:

IChangeSetSearchCriteria criteria = IChangeSetSearchCriteria.FACTORY.newInstance();

criteria.setAuthor(member);

criteria.setModifiedAfter(new Timestamp(from.getTime()));

List<IChangeSetHandle> changeSets = SCMPlatform.getWorkspaceManager(

repo).findChangeSets(criteria,

IWorkspaceManager.MAX_QUERY_SIZE, monitor);


// Available Parameters in this Method are IContributorHandle member, ITeamRepository repo, Date from, 

// Date to, IProjectArea area (the ProjectArea the ChangeSets should belong to)


RTC & Plain Java API Version is 4.0

One answer



permanent link
John Camelon (1.7k14) | answered Jul 30 '12, 5:06 p.m.
JAZZ DEVELOPER
 You cannot easily query by project area.  You can instead search each stream in the project area separately.  
You may want to raise an RFE on this, as it will likely not be super efficient.  

Thanks
JohnC 
SCM Lead

Comments
Marc Mai commented Jul 31 '12, 3:00 a.m.

Hey John, thank you for your answer!

The report-creation is not time-critical. So it would be a possibility to search all streams and restrict the ChangeSet query to these Streams (<= is that possible? What Type is a Stream of? Does it implement IContextHandle or IComponentHandle?) How can I retrieve all Streams of a ProjectArea? Is there a Method of the ProjectArea-Object itself? Or do I have to use some kind of Query-Mechanism of any other Component?

...and sorry for that Question, but what is an 'RFE' ? :-)

Your answer


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