Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created November 4, 2018 03:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/988249a475159d90018b43b238d8f728 to your computer and use it in GitHub Desktop.
Save iaindooley/988249a475159d90018b43b238d8f728 to your computer and use it in GitHub Desktop.
Trellinator: Set due on list move
function setDueIn24Hours(notification)
{
new Notification(notification).movedCard("List one").setDue(Trellinator.now().addHours(24));
}
function setDueIn48Hours(notification)
{
new Notification(notification).movedCard("List two").setDue(Trellinator.now().addHours(48));
}
function setDueIn96Hours(notification)
{
new Notification(notification).movedCard("List three").setDue(Trellinator.now().addHours(96));
}
function scheduleMoveBeforeDue(notification)
{
var notif = new Notification(notification);
ExecutionQueue.clear("scheduled-"+notif.card().id());
notif.actionOnDueDateAdded("actionMoveBeforeDue","scheduled-"+notif.card().id(),function(date)
{
date.minusHours(24);
});
}
function actionMoveBeforeDue(notification)
{
var notif = new Notification(notification);
notif.card().moveToList(notif.board().list("List one"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment