Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Trellinator Quick Start Projects Overview Demo
function setup()
{
var template = Board.create({name: "Project Template"});
var overview = Board.create({name: "Projects Overview"});
}
function createNewProjectBoard(notification)
{
var card = new Notification(notification).addedCard("To Do");
var trellinator = new Trellinator();
var new_board = trellinator.board("Project Template").copy(card.name(),trellinator.team("Projects"));
Trellinator.addBoardToGlobalCommandGroup(new_board,"Project Boards");
card.attachLink(new_board.link());
}
function cardStarted(notification)
{
var card = new Notification(notification).movedCard("Doing");
postCommentToOverviewCard(card.board(),"Started work on "+card.link());
}
function cardFinished(notification)
{
var card = new Notification(notification).movedCard("Done");
postCommentToOverviewCard(card.board(),"Finished work on "+card.link());
}
function postCommentToOverviewCard(board,comment)
{
new Trellinator().board("Projects Overview").cards().find(function(loop)
{
if(loop.boardsLinkedInAttachments().first().id() == board.id())
return loop
else
return false
}).first().postComment(comment);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.