Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created September 21, 2020 00:41
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/9a8070bdfa6485813805c86a1b2e1dbf to your computer and use it in GitHub Desktop.
Save iaindooley/9a8070bdfa6485813805c86a1b2e1dbf to your computer and use it in GitHub Desktop.
Card assigned to member added to list with one card
function cardAssignedToMemberAddedToListWithOneCard(notification)
{
//is added to the list "List Name"
var added = new Notification(notification).addedCard(/List Name/i);
//"if a card assigned to "member's name"
try
{
added.member("username");
//AND the number of cards in "List Name" is exactly equal to 1 then ...
if(added.currentList().countCards() == 1)
{
added.postComment("So lonely ... ");
}
}
catch(e)
{
Notification.expectException(InvalidDataException,e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment