Skip to content

Instantly share code, notes, and snippets.

@ntotten
Created June 27, 2015 18:28
Show Gist options
  • Save ntotten/8c87eebb0774b8161977 to your computer and use it in GitHub Desktop.
Save ntotten/8c87eebb0774b8161977 to your computer and use it in GitHub Desktop.
function(ticket, event, callback) {
if (event.entity === 'ticket' && event.name === 'created' && !ticket.status) {
if (ticket.tags.indexOf('priority-support') ||
ticket.tags.indexOf('standard-support') ||
ticket.tags.indexOf('enterprise-support') ||
ticket.tags.indexOf('priority-sales') {
ticket.status = 'normal';
}
}
}
callback(null, ticket)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment