Last active
September 7, 2019 04:13
-
-
Save iaindooley/81636c9a046375dca864a3dde3df5a06 to your computer and use it in GitHub Desktop.
Linked checklists
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 linkCards(notification) | |
{ | |
//Get a card moved to the To Do List | |
var card = new Notification(notification).movedCard("To Do"); | |
//Copy the card to the top of the Started list in the Work In Progress Board | |
//and link the two cards to each other | |
card.attachLink( | |
card | |
.copyToList(new Trellinator().board("Work In Progress").findOrCreateList("Started"),"top") | |
.attachLink(card.link()) | |
.link() | |
); | |
} | |
function synchChecklist(notification) | |
{ | |
var notif = new Notification(notification); | |
//If a user other than Trellinator took this action | |
if(notif.member().notTrellinator()) | |
{ | |
//Get a completed checklist item | |
var completed = new Notification(notification).completedChecklistItem(); | |
//Complete the same item in the first card linked in the attachments | |
completed.card().cardsLinkedInAttachments().first().checkItemByName(completed.name()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment