Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active March 27, 2019 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/e70de08be81152c229b2a47d1117e028 to your computer and use it in GitHub Desktop.
Save iaindooley/e70de08be81152c229b2a47d1117e028 to your computer and use it in GitHub Desktop.
Flatten comments
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