Skip to content

Instantly share code, notes, and snippets.

var added = new Notification(notification).addedLabel("Everyone");
added.card().board().members().each(function(member)
{
added.card().addMember(member);
});
new Trellinator().board("My Board").list("My List").cards().each(function(card)
{
console.log(card.name()+" ("+card.link()+"):")
card.checklists().each(function(cl)
{
console.log(" "+cl.name()+":");
cl.items().each(function(item)
{
Card.findOrCreate(
new Trellinator().board("My Board").findOrCreateList("Today 🎯")
"Daily/Weekly/Monthly Recurring Tasks"
)
.checklist("Daily").items().each(function(item)
{
item.markIncomplete();
});
var added = new Notification(notification).addedCard();
try
{
added.setDue(
Trellinator
.now()
.addHours(10)
.minusDays(1)
.next(added.currentList().name())
@iaindooley
iaindooley / gist:aacc01e1aa392b727830993d2d82e378
Created July 23, 2021 11:02
removeOtherLabelsWhenLabelAdded
var added = new Notification(notification).addedLabel();
added.card().labels().each(function(label)
{
if(label.id() != added.id())
{
added.card().removeLabel(added.name());
}
});
new Trellinator().team("Workspace Name").members().each(function(member)
{
console.log(member.name());
});
var created = new Notification(notification).createdCard(/Origin List.*/i);
created.board().lists().each(function(list)
{
if(list.id() != created.currentList().id())
{
created.copyToList(list,"top");
}
});
var comp = new Notification(notification).completedChecklistItem();
comp.checklist().card().postComment(
"@"+comp.checklist().items().itemAfter(comp).member().name()+" You're up!"
);
var new_workspace = new Trellinator().team("New Workspace");
new Trellinator().team("Old Workspace").members().each(function(member)
{
//new_workspace.addMember(member,"admin");//must be admins in a free team anyway, upgrade to BC to remove admins
console.log(member.name());
});
var target = new Trellinator().board("Archive Board");
TrelloApi.searchCardsInBoards(
new Trellinator().board("From Board"),
"is:archived"
//comment out the below line to run for more than one card
,1
).each(function(card)
{
card