Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active November 9, 2019 01:29
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/7ba28b44ffe78a845631341a078ddfb6 to your computer and use it in GitHub Desktop.
Save iaindooley/7ba28b44ffe78a845631341a078ddfb6 to your computer and use it in GitHub Desktop.
Set main card date to earliest sub card date
function setMainCardDateToEarliestSubCardDate(notification)
{
var card = new Notification(notification).addedDueDate();
var master = card.cardsLinkedInAttachments().first();
if(!master.due() || (master.due() > card.due()))
{
master.setDue(new Date(card.due()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment