Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In de "backlogs" en "tags" poller de functie aanroepen ( $scope.tagsPbiCount(); )
- Functie in MainCtrl plakken
- $scope.tagsPbiCount = function(){
- //Laurens show pbis script
- if($rootScope.backlogitems && $rootScope.backlogitems.length > 0 && $rootScope.tags){
- for(var x in $rootScope.tags){
- var count = 0;
- var tag = $rootScope.tags[x];
- for(var i=0; i < $rootScope.backlogitems.length; i++){
- var pbi = $rootScope.backlogitems[i];
- if(pbi.tag){ // if pbi has tags, loop through tags of pbi
- for(var z=0; z < pbi.tag.length; z++){
- var pbiTag = pbi.tag[z];
- if(pbiTag.name == tag.name){ // if name of pbi tag == name of current then count++
- count++;
- }
- }
- }
- }
- tag.amountPbis = count; // assign count to tag
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement