Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created September 27, 2019 12:21
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/5a8ad0c8b00c84eabc7b287b2bb37ea8 to your computer and use it in GitHub Desktop.
Save iaindooley/5a8ad0c8b00c84eabc7b287b2bb37ea8 to your computer and use it in GitHub Desktop.
Add points when card archived
function addPointsWhenCardArchived(notification)
{
var archived = new Notification(notification).archivedCard();
var current_report = new Trellinator().board("My Tracking Board")
.findOrCreateCard("Week "+(Trellinator.now().weekOfMonth()+1)+", "+Trellinator.now().monthName()+" "+Trellinator.now().getFullYear());
current_report.setCustomFieldValue("Points Completed",current_report.customFieldValue("Points Completed")+archived.customFieldValue("Points"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment