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 restrictMovesOutOfLists(notification) | |
{ | |
var notif = new Notification(notification); | |
var card = notif.movedCard(); | |
bounceBackIfNotAllowed("from "+notif.listBefore().name(),notif.member().name()); | |
} | |
function restrictMovesIntoLists(notification) | |
{ | |
var notif = new Notification(notification); |
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 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())) |
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
git submodule add git@github.com:iaindooley/benko-board-trellinator.git apps/benko-board-trellinator | |
git submodule add git@github.com:iaindooley/trellinator-libs.git apps/trellinator-libs | |
git submodule add git@github.com:iaindooley/trellinator.git apps/trellinator | |
git submodule init | |
git submodule update |
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 removeAttachmentsFromCopiedCard(notification) | |
{ | |
new Notification(notification).copiedCard().attachments().each(function(att) | |
{ | |
att.remove(); | |
}); | |
} |
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 copyTemplateBoardAndMembers(notification) | |
{ | |
var created = new Notification(notification).createdCard(); | |
created.attachLink(new Trellinator().board(created.currentList().name()).copy(created.name()).link()); | |
} |
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 subtasks(notification) | |
{ | |
var notif = new Notification(notification); | |
//If a new checklist item was added | |
var item = notif.addedChecklistItem(); | |
//If this was not added by Trellinator, and it was added to a checklist | |
//called "Subtasks" | |
if(notif.member().notTrellinator() && (item.checklist().name() == "Subtasks")) | |
{ | |
//Set the text of the item ... |
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 lockCardInPlace(notification) | |
{ | |
var notif = new Notification(notification); | |
if(notif.member().notTrellinator()) | |
{ | |
var card = notif.movedCard(); | |
if(!card.allChecklistsComplete()) | |
card.moveToList(notif.listBefore()); |
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 notifyWithAttachments(notification) | |
{ | |
var card = new Notification(notification).addedCard("Internal review"); | |
try | |
{ | |
card.postComment("@board ready for review. Here are the attachments\n\n"+card.attachments().find(function(att) | |
{ | |
return att.link(); | |
}).asArray().join("\n")); |
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
new Notification(notification).addedLabel("Remove All Attachments").card().attachments().each(function(att) | |
{ | |
att.remove(); | |
}); |
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 setNewCardId(notification) | |
{ | |
new Notification(notification) | |
.createdCard() | |
.setCustomFieldValue("Unique ID",latestCardId()); | |
} | |
function latestCardId() | |
{ | |
var card = Card.findOrCreate(Board.findOrCreate("System Configuration").findOrCreateList("Card ID"),"Latest Card Count"); |
NewerOlder