Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Move when percentage complete
function moveWhenPercentageComplete(notification)
{
var notif = new Notification(notification);
var cl = notif.completedChecklist();
var complength = notif.card().checklists().find(function(loop)
{
if(loop.isComplete())
{
return loop;
}
else
{
return false;
}
}).length();
var total = notif.card().checklists().length();
var percentage = (complength*100)/total;
if(percentage > 70)
{
notif.card().moveToList(notif.board().list("Done"),"top");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment