Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created November 10, 2018 03:01
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/949a12ba85d42af059215da3f5c55336 to your computer and use it in GitHub Desktop.
Save iaindooley/949a12ba85d42af059215da3f5c55336 to your computer and use it in GitHub Desktop.
function backupBoard(notification)
{
var notif = new Notification(notification);
notif.addedLabel("Trigger Backup");
var new_board = Board.create(notif.board().name()+" "+Trellinator.now().toLocaleString()+" backup");
notif.board().lists().each(function(list)
{
list.copy().move(new_board);
});
Card.create(Board.findOrCreate("Board Backups").findOrCreateList(Trellinator.now().monthName()),Trellinator.now().toLocaleString())
.attachLink(new_board.link());
new_board.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment