Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/60a75f64c9c1632a956e93e5c7dc555d to your computer and use it in GitHub Desktop.
Save iaindooley/60a75f64c9c1632a956e93e5c7dc555d to your computer and use it in GitHub Desktop.
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