Skip to content

Instantly share code, notes, and snippets.

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/82be585cb1bdef7ce1e11a34f3c1212b to your computer and use it in GitHub Desktop.
Save iaindooley/82be585cb1bdef7ce1e11a34f3c1212b to your computer and use it in GitHub Desktop.
Copy card without polluting custom fields
function copyCardWithoutPollutingCustomFields(notification)
{
var added = new Notification(notification).addedLabel("Copy to Other Board");
var copy = added.card().copyToList(added.card().currentList());
added.card().board().customFields().each(function(field)
{
copy.setCustomFieldValue(field.name(),"");
});
added.card().attachLink(copy.attachLink(added.card().link()).link());
copy.moveToList(new Trellinator().board("Target Board").findOrCreateList("Target List"),"top");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment