function processSprintResponse(data, isKanban) {
      /*
       * Sprint Name
       */
      var sprintID = null;
      var sprintName = null;
      var sprintUrl = null;
      var daysTilEnd = null;
      var iteration = null;
      var issue = null;
      var dupes = true;
      // Reset on every processing
      ctrl.showStatus = $scope.widgetConfig.options.showStatus;

      var iterations = isKanban? ctrl.iterationsKanban : ctrl.iterations;
      var issueCollection = isKanban? ctrl.issueStoryPointsKanban : ctrl.issueStoryPoints;
      
      if (ctrl.listType === 'issues') {
          ctrl.showFeatureLimitButton = data.result.length <= 4 ? false : true;
      }

      for (var i = 0; i < data.result.length; i++) {          
        // Add features only if there are no duplicates
        if (isInIssuesArray(data.result[i].sNumber, issueCollection) === false) {
            issue = {
              sNumber: data.result[i].sNumber,
              sName: data.result[i].sName,
              sUrl: data.result[i].sUrl,
              changeDate: data.result[i].changeDate,
              sEstimate: data.result[i].sEstimate,
              sEstimateTime: data.result[i].sEstimateTime !== null ? (parseInt(data.result[i].sEstimateTime)/60).toString() : null,
              sStatus: (data.result[i].sStatus !== null && data.result[i].sStatus !== undefined) ? data.result[i].sStatus.toLowerCase() : null
            };
            issueCollection.push(issue);
        }
          
        if (data.result[i].sSprintID === undefined) {
          sprintID = "[No Sprint Available]";
          sprintName = "[No Sprint Available]";
          sprintUrl = null;
        } else {
          sprintID = data.result[i].sSprintID;
          sprintName = data.result[i].sSprintName;
          sprintUrl = data.result[i].sSprintUrl;
        }
        
        if (isKanban && (sprintID == null || sprintID === "" )) {
        	sprintID = "KANBAN"
        	sprintName = "KANBAN"
        }

        /*
         * Days Until Sprint Expires
         */
        if (data.result[i].sSprintID === undefined) {
          daysTilEnd = "[N/A]";
        } else if (isKanban) {
          daysTilEnd = "[Unlimited]";
        } else {
          var nativeSprintEndDate = new Date(data.result[i].sSprintEndDate);
          if (nativeSprintEndDate < today) {
            daysTilEnd = "[Ended]";
          } else {
            var nativeDaysTilEnd = moment(nativeSprintEndDate).fromNow();
            daysTilEnd = nativeDaysTilEnd.substr(3);
          }
        }
        
        // Add iterations only if there are no duplicates
        if (isInArray(sprintID, iterations) === false) {
          iteration = {
            id: sprintID,
            name: sprintName,
            url: sprintUrl,
            tilEnd: daysTilEnd
          };
          iterations.push(iteration);
        }
        
        // Clean-up
        sprintID = null;
        sprintName = null;
        daysTilEnd = null;
        iteration = null;
      }
      
      issueCollection.sort(compareIssues).reverse();
      return getLastUpdated(data);
    }
/**
     * Processor for sprint-based data
     *
     * @param data
     */
Processor for sprint-based data
@param data
Processor for sprint - based data @param data
function processSprintResponse(data, isKanban) {
      var sprintID = null;
      var sprintName = null;
      var sprintUrl = null;
      var daysTilEnd = null;
      var iteration = null;
      var issue = null;
      var dupes = true;
      ctrl.showStatus = $scope.widgetConfig.options.showStatus;
      var iterations = isKanban? ctrl.iterationsKanban : ctrl.iterations;
      var issueCollection = isKanban? ctrl.issueStoryPointsKanban : ctrl.issueStoryPoints;
      if (ctrl.listType === 'issues') {
          ctrl.showFeatureLimitButton = data.result.length <= 4 ? false : true;
      }
      for (var i = 0; i < data.result.length; i++) {          
        if (isInIssuesArray(data.result[i].sNumber, issueCollection) === false) {
            issue = {
              sNumber: data.result[i].sNumber,
              sName: data.result[i].sName,
              sUrl: data.result[i].sUrl,
              changeDate: data.result[i].changeDate,
              sEstimate: data.result[i].sEstimate,
              sEstimateTime: data.result[i].sEstimateTime !== null ? (parseInt(data.result[i].sEstimateTime)/60).toString() : null,
              sStatus: (data.result[i].sStatus !== null && data.result[i].sStatus !== undefined) ? data.result[i].sStatus.toLowerCase() : null
            };
            issueCollection.push(issue);
        }
        if (data.result[i].sSprintID === undefined) {
          sprintID = "[No Sprint Available]";
          sprintName = "[No Sprint Available]";
          sprintUrl = null;
        } else {
          sprintID = data.result[i].sSprintID;
          sprintName = data.result[i].sSprintName;
          sprintUrl = data.result[i].sSprintUrl;
        }
        if (isKanban && (sprintID == null || sprintID === "" )) {
        	sprintID = "KANBAN"
        	sprintName = "KANBAN"
        }
        if (data.result[i].sSprintID === undefined) {
          daysTilEnd = "[N/A]";
        } else if (isKanban) {
          daysTilEnd = "[Unlimited]";
        } else {
          var nativeSprintEndDate = new Date(data.result[i].sSprintEndDate);
          if (nativeSprintEndDate < today) {
            daysTilEnd = "[Ended]";
          } else {
            var nativeDaysTilEnd = moment(nativeSprintEndDate).fromNow();
            daysTilEnd = nativeDaysTilEnd.substr(3);
          }
        }
        if (isInArray(sprintID, iterations) === false) {
          iteration = {
            id: sprintID,
            name: sprintName,
            url: sprintUrl,
            tilEnd: daysTilEnd
          };
          iterations.push(iteration);
        }
        sprintID = null;
        sprintName = null;
        daysTilEnd = null;
        iteration = null;
      }
      issueCollection.sort(compareIssues).reverse();
      return getLastUpdated(data);
    }
function processSprintResponse ( data , isKanban ) { var sprintID = null ; var sprintName = null ; var sprintUrl = null ; var daysTilEnd = null ; var iteration = null ; var issue = null ; var dupes = true ; ctrl . showStatus = $scope . widgetConfig . options . showStatus ; var iterations = isKanban ? ctrl . iterationsKanban : ctrl . iterations ; var issueCollection = isKanban ? ctrl . issueStoryPointsKanban : ctrl . issueStoryPoints ; if ( ctrl . listType === 'issues' ) { ctrl . showFeatureLimitButton = data . result . length <= 4 ? false : true ; } for ( var i = 0 ; i < data . result . length ; i ++ ) { if ( isInIssuesArray ( data . result [ i ] . sNumber , issueCollection ) === false ) { issue = { sNumber : data . result [ i ] . sNumber , sName : data . result [ i ] . sName , sUrl : data . result [ i ] . sUrl , changeDate : data . result [ i ] . changeDate , sEstimate : data . result [ i ] . sEstimate , sEstimateTime : data . result [ i ] . sEstimateTime !== null ? ( parseInt ( data . result [ i ] . sEstimateTime ) / 60 ) . toString ( ) : null , sStatus : ( data . result [ i ] . sStatus !== null && data . result [ i ] . sStatus !== undefined ) ? data . result [ i ] . sStatus . toLowerCase ( ) : null } ; issueCollection . push ( issue ) ; } if ( data . result [ i ] . sSprintID === undefined ) { sprintID = "[No Sprint Available]" ; sprintName = "[No Sprint Available]" ; sprintUrl = null ; } else { sprintID = data . result [ i ] . sSprintID ; sprintName = data . result [ i ] . sSprintName ; sprintUrl = data . result [ i ] . sSprintUrl ; } if ( isKanban && ( sprintID == null || sprintID === "" ) ) { sprintID = "KANBAN" sprintName = "KANBAN" } if ( data . result [ i ] . sSprintID === undefined ) { daysTilEnd = "[N/A]" ; } else if ( isKanban ) { daysTilEnd = "[Unlimited]" ; } else { var nativeSprintEndDate = new Date ( data . result [ i ] . sSprintEndDate ) ; if ( nativeSprintEndDate < today ) { daysTilEnd = "[Ended]" ; } else { var nativeDaysTilEnd = moment ( nativeSprintEndDate ) . fromNow ( ) ; daysTilEnd = nativeDaysTilEnd . substr ( 3 ) ; } } if ( isInArray ( sprintID , iterations ) === false ) { iteration = { id : sprintID , name : sprintName , url : sprintUrl , tilEnd : daysTilEnd } ; iterations . push ( iteration ) ; } sprintID = null ; sprintName = null ; daysTilEnd = null ; iteration = null ; } issueCollection . sort ( compareIssues ) . reverse ( ) ; return getLastUpdated ( data ) ; }
Processor for sprint-based data
 @param data
Processor for sprint - based data @param data
/*
       * Sprint Name
       */ // Reset on every processing // Add features only if there are no duplicates /*
         * Days Until Sprint Expires
         */ // Add iterations only if there are no duplicates // Clean-up