Created
September 21, 2020 00:41
-
-
Save iaindooley/9a8070bdfa6485813805c86a1b2e1dbf to your computer and use it in GitHub Desktop.
Card assigned to member added to list with one card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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