Copy labels and fields
function copyLabelsAndFields(notification) | |
{ | |
var notif = new Notification(notification); | |
var parent = notif.attachedCard().card(); | |
var child = notif.card(); | |
parent.labels().each(function(label) | |
{ | |
child.addLabel(label.name()); | |
}); | |
parent.customFields().each(function(field) | |
{ | |
child.setCustomFieldValue(field.name(),parent.customFieldValue(field.name())); | |
//wait a couple of seconds, the custom field values API is pretty heavy | |
Utilities.sleep(2000); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment