sprinter.js
function sortIssues(issues) {
    var sorted;
    // Issues might be pre-arranged by super/sub tasks.
    if (Object.keys(issues).indexOf('supers') > -1) {
        // Network format issue sort
        issues.supers = _.sortBy(issues.supers, function(issue) {
            return new Date(issue.updated_at);
        }).reverse();

        issues.singletons = _.sortBy(issues.singletons, function(issue) {
            return new Date(issue.updated_at);
        }).reverse();
        sorted = issues;
    } else {
        sorted = _.sortBy(issues, function(issue) {
            return new Date(issue.updated_at);
        }).reverse();
    }
    return sorted;
}
function sortIssues(issues) {
    var sorted;
    // Issues might be pre-arranged by super/sub tasks.
    if (Object.keys(issues).indexOf('supers') > -1) {
        // Network format issue sort
        issues.supers = _.sortBy(issues.supers, function(issue) {
            return new Date(issue.updated_at);
        }).reverse();

        issues.singletons = _.sortBy(issues.singletons, function(issue) {
            return new Date(issue.updated_at);
        }).reverse();
        sorted = issues;
    } else {
        sorted = _.sortBy(issues, function(issue) {
            return new Date(issue.updated_at);
        }).reverse();
    }
    return sorted;
}
Sorts array of issue objects by last updated date.