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
Community moderators have prevented the ability to post new answers.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
* 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.