Created
November 4, 2018 03:39
-
-
Save iaindooley/988249a475159d90018b43b238d8f728 to your computer and use it in GitHub Desktop.
Trellinator: Set due on list move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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