Last active
March 27, 2019 22:46
-
-
Save iaindooley/e70de08be81152c229b2a47d1117e028 to your computer and use it in GitHub Desktop.
Flatten comments
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 flattenComments() | |
{ | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet_name = Trellinator.now().butlerDefaultDate()+" comments"; | |
var sheet = ss.getSheetByName(sheet_name); | |
if(!sheet) | |
ss.insertSheet(sheet_name); | |
new Trellinator().board("iaindooley").cards().each(function(card) | |
{ | |
try | |
{ | |
card.comments().each(function(comment) | |
{ | |
sheet.appendRow([card.link(), | |
comment.when().toLocaleString(), | |
comment.member().name(), | |
comment.text()]); | |
}); | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment