Skip to content

Instantly share code, notes, and snippets.

iaindooley

Block or report user

Report or block iaindooley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6c3e0364a60b4c11c4ce5cbdb2ab85fb
function mirrorAndLinkCards(notification)
{
var moved = new Notification(notification).movedCard("Doing");
var copy = moved.copyToList(new Trellinator().board("Target").findOrCreateList("Inbox"));
moved.attachLink(copy.attachLink(moved.link()).link());
}
View gist:dafe7be113b0283817ed744bab9bf532
function countLabelsOfOneKind()
{
var output = [];
new Trellinator().board("My Board").lists().each(function(list)
{
output.push(list.name()+":\n");
var current = {};
list.cards().each(function(card)
{
View gist:b406ff0aebc6c9bf1a15e9d834ae5cbb
function setCustomFieldToZeroWeekly(params,signature,original_time)
{
new Board(params).cards().each(function(card)
{
card.setCustomFieldValue("My Number",0);
Utilities.sleep(2000);//custom field value API is VERY heavy, wait or you'll hit the rate limit
});
ExecutionQueue.push("setCustomFieldToZeroWeekly",params,signature,original_time.addDays(7).at("23:59"));
}
View gist:a8f5f90ba46b52eaac05505a4b0ffca7
function importSpreadsheetData(event)
{
var values = getSpreadsheetDataFromEventTrigger(event);
var board = new Trellinator().board("Production");
board.lists().each(function(list)
{
list.archiveAllCards();
});
View gist:9c74f91cb59c4d42ce54ed792dddd184
function setAttachmentName(params,signature,original_time)
{
var list = new Board(params).findOrCreateList("To Create");
Card.create(list,"My Recurring Card")
.attachLink({name: "Link 1",url: "http://whawtever.com")
.attachLink({name: "Link 2",url: "http://whawtever.com")
.attachLink({name: "Link 3",url: "http://whawtever.com");
ExecutionQueue.push("setAttachmentName",params,signature,original_time.addDays(1).at("9:00"));
View gist:c6ec800b2b5c1bd2c094dd24597eef4e
function copyMyBoards()
{
var douchebag = new Member({username: "exteammember"});
new Trellinator().boards().each(function(board)
{
board.copy(board.name()).removeMember(douchebag);
});
}
View gist:39fc9e9b0812ab42ceb976e704fa968e
function inviteMemberAndAddToCards(notification)
{
var changed = new Notification(notification).changedCustomFieldValue();
if(changed.card().currentList().name() == "Role Cards")
{
var member = new Member({username: changed.value()});
changed.card().board().addMember(member);
View gist:6649d2279627a8db46f448ef69cd855e
function cardWithCommentsReport(params,signature,original_time)
{
var output = [];
new Board(params).lists().each(function(list)
{
output.push(list.name()+":");
list.cards().each(function(card)
{
View gist:1aef7ebc05ab2701366d020dc490209a
function updateListTotalForMovedCard(notification)
{
var notif = new Notification(notification);
var added = notif.addedCard();
if(parts = /(.+) \(([0-9]+)\)/.exec(notif.listAfter().name()))
{
notif.listAfter().setName(parts[1]+" ("+totalPointsForList(notif.listAfter())+")");
if(parts = /(.+) \(([0-9]+)\)/.exec(notif.listBefore().name()))
@iaindooley
iaindooley / gist:fd7f5fe9f4bf55ba7c394b181d172f95
Created May 20, 2020
Export cards with checklist to spreadsheet
View gist:fd7f5fe9f4bf55ba7c394b181d172f95
function exportCardsWithChecklistToSpreadsheet()
{
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
new Trellinator().board("My Board").cards().each(function(card)
{
sheet.appendRow([card.link(),card.name()]);
card.checklists().each(function(cl)
{
You can’t perform that action at this time.