Using the REST API to get a complete list of change set owners
Need: List of users with code (one or more delivered change sets). Any idea how to get this? I'm thinking if there is a way to export a complete list of ALL change sets ever delivered, with owner info included, I can extrapolate a list of users with one or more change sets from that.
The Goal: A list of RTC users that have no code and no work items in the system, IE "unused users".
The Method: Get a complete list of users. Get a list of users that are "owner" of one or more work items. Get a list of users that have delivered one or more change sets. Remove IDs from list 1 that are on list 2 and 3. The resulting list will be those with no code and no work items.
The Goal: A list of RTC users that have no code and no work items in the system, IE "unused users".
The Method: Get a complete list of users. Get a list of users that are "owner" of one or more work items. Get a list of users that have delivered one or more change sets. Remove IDs from list 1 that are on list 2 and 3. The resulting list will be those with no code and no work items.
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jul 15 '13, 1:50 p.m.One thing you'll want to consider is whether the "delivered" condition is important. I assume by "delivered", you mean "delivered to a stream" (one can also deliver to a workspace, if you are the owner of the workspace). A person could create some private stream, and then deliver their change set to that private stream. Is that significantly different from never delivering it at all? It is very possible that checking for whether a change set has been delivered to a stream will be very expensive, since you might need to query every stream in the system for whether that change set appears in its history (I'll defer to our SCM API experts on that question). As another edge case, what if the user delivered a change set to a stream, and then that stream is deleted. Is that a "delivered change set"?
Another approach to this use case is to tell all project area and team area leaders that they need to remove all "inactive" members form their project/team areas. Then archive all users that are not a member of some project/team area.
Mike Shkolnik
Jul 15 '13, 2:53 p.m.I'll take whatever info I can get from the API. A complete list of delivered change sets (with owners) would be a good start. Private streams are less of an issue. If I can only get a complete list of change sets that includes private streams, that would still be adequate. If I need to first poll a list of streams and/or components and then poll each stream/component for a list of change sets, I could do that but of course the "poll once" method is preferred, if possible, even if it includes too much.