Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active March 25, 2020 11:58
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/0e810a4625865d9f13b86878a8641b42 to your computer and use it in GitHub Desktop.
Save iaindooley/0e810a4625865d9f13b86878a8641b42 to your computer and use it in GitHub Desktop.
Attach product to supplier
function attachProductToSupplier(notification)
{
var added = new Notification(notification).addedChecklistItem();
if(added.checklist().name() == "Suppliers")
{
var supplier_card = new Trellinator()
.board("Suppliers")
.card(new RegExp(".*"+added.name()+".*","i"));
added.setName(supplier_card.link());
supplier_card.addChecklist("Products",function(cl)
{
cl.addUniqueItem(added.checklist().card().link());
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment