View gist:416d3487d41b86a531d788223099e24e
function setMemberOnLinkedCard(notification) | |
{ | |
var linked = new Notification(notification).convertedChecklistItemToCard(); | |
linked | |
.addMember(linked.source().members().first()) | |
.setDue(linked.due()); | |
} |
View gist:8128c5431e2c2adb3a565ec0cc55f76e
var board_name = "EDIT THIS";//put the name of your board | |
var list_name = "EDIT THIS";//put the name of the template list | |
var board = new Trellinator() | |
.board(board_name); | |
var template = board | |
.list(list_name); | |
var date = Trellinator.now(); | |
for(var i = 0;i < 52;i++) |
View gist:3d9e7e5aa82709b20b9f04abad574278
function copyTemplateAndSetDue(notification) | |
{ | |
var card = new Notification(notification).addedDueDate(); | |
new Card({link: "https://trello.com/c/ffkObfYM"})//update this link to your template card | |
.copyToList(card.currentList(),card.name()+" Copied From Template","top") | |
.setDue(card.due()); | |
} |
View gist:00f60cf86f76d5ab5448ab91ad074425
var cardlink = "SHORTLINK";//get this from the "share" button on the card | |
var card = new Card({link: cardlink}); | |
var target = card.currentList(); | |
var prev = card; | |
for(var i = 0;i < 52;i++) | |
{ | |
var prev = card.copyToList(target,card.name()).setDue(prev.due().addDays(7)); | |
} |
View gist:a97f8eeca4e398d8177a6e25651ee3ff
function setCustomFieldOnAllCards(notification) | |
{ | |
var added = new Notification(notification).addedLabel("Set Job Number"); | |
added.card().board().cards().each(function(card) | |
{ | |
if(card.id() != added.card().id()) | |
{ | |
card.setCustomFieldValue("Job #",added.card().customFieldValue("Job #")); | |
} |
View gist:2f9444f3042302d823f994bd71e286c5
function keepMemberAndDueDateOnConvertedChecklistItem(notification) | |
{ | |
var conv = new Notification(notification).convertedChecklistItemToCard(notification); | |
conv | |
.setDue(conv.source().due()) | |
.addMember(conv.source().member()); | |
} |
View gist:afb8982e1c864b202bf4d6b0080759db
new Trellinator().board("My Board Name") | |
.cards().each(function(card) | |
{ | |
console.log(card.name()+" ("+card.link()+")\n"); | |
card.checklists().each(function(cl) | |
{ | |
console.log(" - "+cl.name()+"\n"); | |
cl.items().each(function(item) |
View gist:06a9dd7833e2395a8034e259ab027c12
function assignMemberToLinkedCard(notification) | |
{ | |
var assigned = new Notification(notification).addedMemberToChecklistItem(); | |
assigned.item().linkedCard().addMember(assigned); | |
} |
View gist:bcbd3707aa233eb68d1c966ceec0b142
function twoItemsCompleted(notification) | |
{ | |
var comp = new Notification(notification).completedChecklistItem(/(First Item|Second Item)/i); | |
var compcount = 0; | |
comp.checklist().card().checklists().each(function(cl) | |
{ | |
cl.items().each(function(item) | |
{ | |
if(/First Item/i.test(item.name()) && item.isComplete()) |
View gist:a0e41549380a9613dfd557b5163d086b
function autoAssignAdvancedChecklistItems(notification) | |
{ | |
var moved = new Notification(notification).movedCard(/List B.*/i); | |
if(moved.members().length() == 1) | |
{ | |
moved.checklists().each(function(cl) | |
{ | |
cl.items().each(function(item) | |
{ |
NewerOlder