Created
March 27, 2019 23:12
-
-
Save iaindooley/f6d89afac01d0961c9020ac704f245b2 to your computer and use it in GitHub Desktop.
Sort cards by date modified descending
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
function sortCardsByDateModifiedDescending() | |
{ | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet("Cards Last Modified"); | |
new IterableCollection(TrelloApi | |
.searchCardsInTeams(new Trellinator().team("My Team"),"edited:week") | |
.asArray() | |
.sort(function(card1,card2) | |
{ | |
return card2.lastActivity().getTime() - card.lastActivity().getTime(); | |
})).each(function(card) | |
{ | |
sheet.appendRow([card.link(),card.lastActivity().toLocaleString(),card.name()]); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment