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

How to find out how many team areas each user is a member of?

How can you find out how many team areas each user is a member of?

0 votes


Accepted answer

Permanent link
I think I have a way to identify the data you are requesting, using a REST API call, the same way that the ETL jobs fetch data.

1. Try this REST API call:
https://SERVER/ccm/rpt/repository/foundation?fields=foundation/teamArea/(itemId|qualifiedName|teamMembers/(itemId|name))&size=100000

The output will be:
  - For each team area (by itemId and qualified name)
    -- list all users (by itemId and name)

2. Save the output XML to a file "UserData.xml"

3. The top of the XML output will be a link to the "next" page which I expect will be empty. If not, follow that link and concatenate the result to "UserData.xml". Repeat if needed.
 

4. Then run this on a Linux or Cygwin command line:
cat UserData.xml  | sed 's/teamMembers><itemId>/@/g' | tr '@' '\n' | cut -d '<' -f 1 | sort | uniq -c | sort

The output will be number of team areas for each user itemId. Example:
      1 _CqtAAGaLEeSzX8ALDnR3YA
      3 _NCdyQHYnEeSnLYxGo5NAEw
      5 _19zx0HCqEeSSpfO5JdNebQ
      6 _2ArfoXCqEeSSpfO5JdNebQ

5. You can search the file UserData.xml for ItemIds to match them to user, OR open any user in jts/admin and then replace the itemId at the end of the URL with one found this way, to map the itemId to a user identity.

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

To make it a bit more "user friendly", probably we can just do a simple search in Chrome? I know some users are just scared of Linux and/or command lines.

So basically, just use the said URL in Chrome, then in the response find the user name of interest, say "John Smith", and search the term "<name>John Smith</name>" after pressing Crtl+F. Chrome will tell you how many matches found.

1 vote

Thank you Donald, good ideas. In fact a user could quite easily import this into Excel and create Pivot charts in three simple steps:

1. Replace all occurrences of this string with a newline: teamMembers><itemid>
2. Replace all <> brackets with comma
3. Import as CSV in Excel

But my customer's goal was to find out if there are any users who are members of an unusually high number of team areas, so they needed to summarize somehow.

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: Feb 29 '16, 5:15 p.m.

Question was seen: 2,432 times

Last updated: Feb 13 '17, 9:09 a.m.

Confirmation Cancel Confirm