Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get FishEye People stats?

Deleted user January 28, 2014

The management team here wants to track each developers stats when it comes to FishEye Crucible. I can figure various stats our in JIRA using SQL, plugins, and the API. However, I am unable to figure these out in the FishEye schema and I don't think they are available in the API.

What I am looking for is for each developer return the Commits, Files Changed and Changes in LOC for all time. We will take this data and create trends and other metrics from it.

In additon to this they want to know for a given time period how many reviews did each developer author ans well as review.

Thanks for any help on this.

Tom

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Deleted user February 13, 2014

Thanks to everyone who pitched in. I was unable to use any of the recommondations given to get what I needed. I ended up doing raw screen scrapes of the FishEye system to get the data I need.

2 votes
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2014

I wrote this Python script a while back that might help you get started with the API. It's calculating lines added and removed for each user. It's not too pretty, but if you have any questions about it, let me know and I'll try to refresh my memory on how it works.

import requests

baseUrl = "https://fisheye.example.com"
overallCount = 0
totalLines = 0
totalLinesAdded = 0
totalLinesRemoved = 0

repos = ["list", "of", "repositories"]
userCommits = {}
userLines = {}

username = "username"
password = "password"

headers = {'content-type': 'application/json', 'accept':'application/json'}

for repo in repos:
	r = requests.get("{base}/rest-service-fe/revisionData-v1/changesetList/{repo}?path=/&start=2013-01-01T00:00:00".format(base=baseUrl, repo=repo),
		auth=(username, password), headers=headers)

	data = r.json()

	for changeset in data['csid']:
		r2 = requests.get("{base}/rest-service-fe/revisionData-v1/changeset/{repo}/{cs}".format(base=baseUrl, repo=repo, cs=changeset),
		auth=(username, password), headers=headers)

		changesetResult = r2.json()

		for f in changesetResult['fileRevisionKey']:
			r = requests.get("{base}/rest-service-fe/revisionData-v1/revisionInfo/{repo}/?path={path}&revision={revision}".format(base=baseUrl, repo=repo, path=f['path'], revision=f['rev']),
				auth=(username, password), headers=headers)
			lines = r.json()

			totalLinesAdded += lines['linesAdded']
			totalLinesRemoved += lines['linesRemoved']

			user = lines['author']
			if user in userLines:
				userLines[user]['added'] = userLines[user]['added'] + lines['linesAdded']
				userLines[user]['removed'] = userLines[user]['removed'] + lines['linesRemoved']
			else:
				userLines[user] = {'added': lines['linesAdded'], 'removed': lines['linesRemoved']}

for user in userLines:
	print "{user} - {add} added, {remove} removed".format(user=user, add=userLines[user]['added'], remove=userLines[user]['removed'])

print "Lines Added: {add}\tLines Removed: {remove}".format(total=totalLines, add=totalLinesAdded, remove=totalLinesRemoved)

0 votes
Deleted user January 29, 2014

One of the directors in R&D wants to create metrics that shows over time how mcuh work each developer is doing. What he wants is an automated weekly summary of the items mentioned above. That way he can take this data and create trend reports that show over time how commits, lines of code, reviews, etc. each developer does. Currently he has to manully go to each developer (50+) and get the stats from the FishEye screen. He wants me to come up with a way to automaticcly get this data and store it for his reports to consume.

0 votes
Sten Pittet
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2014

Hi!

Could you please details what type of questions you want to answer with this data? We're planning improvements on FishEye reports and it would be great to have your feedback.

Cheers,

Sten Pittet
Dev Tools Product Manager

0 votes
Nick
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2014

For each developer in each repository, you can see the following page:

* https://fisheye6.atlassian.com/committer/ant/bodewig

You should be able to see the following:

You may also get some mileage from using EyeQL, which can export any result as a CSV for you that can be then imported into Excel and munged as you wish.

e.g.

* From this page https://fisheye6.atlassian.com/search/ant/?comment=&contents=&addedText=&deletedText=&author=bodewig&filename=&branch=&tag=&fromdate=&todate=&datesortorder=DESCENDING&groupby=changeset&col=path&col=revision&col=author&col=date&col=csid&col=linesAdded&col=linesRemoved&refresh=y

* You can get Download results as CSV

That query has an author filter for the ant repository. You can also use EyeQL to perform more advanced queries if you need them: https://confluence.atlassian.com/display/FISHEYE/EyeQL+Reference+Guide

Deleted user January 29, 2014

Nick, Thanks for the feedback. What we are looking for the numbers for a developer against all projects. The EyeQL only does it based on a project or repo. Plus we are looking to automate this data into a database so that it can be queried at any time.

Nick
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2014

Depending on how much data you have, if you are automating this, and putting it into a database, then you could simply query each repository for each developer.

This may get you some mileage, and if you store the repo names in your schema too, you could provide some drill-down reporting at the repo level too.

Deleted user February 2, 2014

Nick,

I ran a quick test and got very different results. When i use EyeQL on one Developer and one project I got massive numbers for lines of code changed. This in no way was a subset of the numbers shown on the users page which I assume are for all commits against all repositories.

The other issue with that approach is a major factoriing problem in that I now have to query each user against each repository and since both lists can grow that can be quite an undertaking.

Does Atlassian not publish how they come up with these numbers?

Tom

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events