Guest User

Untitled

a guest
Sep 16th, 2019
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function copyBoardWithAssignments(notification)
  2. {
  3. var template = new Trellinator().board("My Template")
  4. //This automatically preserves membership of the original board
  5. var copy = template.copy("New Board Name");
  6.  
  7. template.lists().each(function(list)
  8. {
  9. list.cards().each(function(card)
  10. {
  11. card.members().each(function(member)
  12. {
  13. //Assuming card name per list is unique
  14. copy.list(list.name()).cards(card.name()).addMember(member);
  15. })
  16. });
  17. });
  18. }
RAW Paste Data