Created
May 12, 2020 00:25
-
-
Save iaindooley/82be585cb1bdef7ce1e11a34f3c1212b to your computer and use it in GitHub Desktop.
Copy card without polluting custom fields
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 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