Last active
December 22, 2015 02:08
-
-
Save avasyukov/6400986 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// model.data will contain the data to be used for our report | |
model.data = []; | |
// Get managees of current user | |
var managees = orgchart.getPerson( person.properties.userName ).managees; | |
// Loop through all managees | |
for each(var user in managees) | |
{ | |
// Find how many nodes in repository each managee has created | |
var nodes = search.luceneSearch("-TYPE:\"cm:folder\" AND @modifier:" + user.getUserName() + ""); | |
// Add one more item into report - 'x' is the object reported, 'y' is the value for this object | |
model.data.push( { "x": user.getUserName(), "y": nodes.length } ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment