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:5fc0437ac68aa39589cbe56cad65d5b1
function createCustomReport(params,signature,original_time)
{
var output = [];
new Board(params).list("Live on MP").cards().each(function(card)
{
output.push(reportLineForCard(card));
});
MailApp.send("iain@benkoboard.com","Report for: "+Trellinator.now().butlerDefaultDate(),output.join("\n\n"));
View gist:26258599480e5c1ec1c2a64d88c036af
function initProjectTemplate(notification)
{
var added = new Notification(notification).addedCard("Create Project")
var copy = Board.findOrCreate("Project Template").copy(added.name());
copy.list("Parent Tasks").cards().each(function(card)
{
relinkSubtasks(card);
});
@iaindooley
iaindooley / gist:97098272a9fb87effbdc4db3917e8e1a
Created Nov 8, 2019
Sort all lists by due date descending
View gist:97098272a9fb87effbdc4db3917e8e1a
function sortAllListsByDueDateDescending(params,signature,original_time)
{
new Board(params).lists().each(function(list)
{
list.sort(List.SORT_DATE_DESC);
});
ExecutionQueue.push("sortAllListsByDueDateDescending",params,signature,original_time.addHours(24));
}
@iaindooley
iaindooley / gist:7ba28b44ffe78a845631341a078ddfb6
Last active Nov 9, 2019
Set main card date to earliest sub card date
View gist:7ba28b44ffe78a845631341a078ddfb6
function setMainCardDateToEarliestSubCardDate(notification)
{
var card = new Notification(notification).addedDueDate();
var master = card.cardsLinkedInAttachments().first();
if(!master.due() || (master.due() > card.due()))
{
master.setDue(new Date(card.due()));
}
}
View gist:fde1b426df687dee6a950bc44f57038f
function moveCardBasedOnName(notification)
{
var created = new Notification(notification).createdCard();
if(/.*(Autostart|Config, Ini file|Settings).*/.test(created.name()))
{
creatd.moveToList(Board.findOrCreate("Backlog Windows").findOrCreateList("Windows Configuration"),"top");
}
}
@iaindooley
iaindooley / gist:d1a78472a217706a9023d38af502ef1e
Created Nov 3, 2019
Copy and link cards preserving checklist state
View gist:d1a78472a217706a9023d38af502ef1e
function copyAndLinkCardsPreservingChecklistState(notification)
{
var added = new Notification(notification).addedCard("A");
var copy = added.copyToList(
Board.findOrCreate("B").findOrCreateList("A faire"),
"top"
);
added
.attachLink(
View gist:6519efe96ab9741ef4421161856a2a2e
function emailMemberReport(params,signature,original_time)
{
if(!params)
params = {id: new Trellinator().board("My Board").id()};
if(!signature)
signature = "emailMemberReport";
var board = new Board(params);
board.members().each(function(member)
View gist:fb597ecb1b63fb7fe28ba93576b4277f
function subtasks(notification)
{
var notif = new Notification(notification);
//If a checklist item was converted to a card
var converted = notif.convertedChecklistItemToCard();
//If it was converted in a list called Subtasks
if(card.source.name() == "Subtasks")
{
converted.setName(converted.source.card().name()+" "+converted.name());
View gist:a2640a1ca4a3aa691b6cd85adf4c1e42
function createBoardsFromSpreadsheet()
{
var values = SpreadsheetApp.openByUrl("paste document URL here").getSheets()[0].getDataRange().getValues();
new IterableCollection(values).each(function(row)
{
//assume format is: name, email1,email2 etc.
var board = Board.create(row[0]);
for(i = 1;i < row.length;i++)
View gist:03035b030c17424001db0a591f4a1bef
function addChecklistTemplates(notification)
{
var created = new Notification(notification);
Board
.findOrCreate("Checklist Templates")
.list("Global")
.cards()
.each(function(card)
{
You can’t perform that action at this time.