Skip to content
Snippets Groups Projects
Commit b104f87e authored by Jared Hancock's avatar Jared Hancock
Browse files

Always notify managers on new ticket

parent 9916214f
Branches
Tags
No related merge requests found
......@@ -2383,11 +2383,18 @@ class Ticket {
// Configure service-level-agreement for this ticket
$ticket->selectSLAId($vars['slaId']);
//Auto assign staff or team - auto assignment based on filter rules.
if($vars['staffId'] && !$vars['assignId'])
$ticket->assignToStaff($vars['staffId'], 'Auto Assignment');
if($vars['teamId'] && !$vars['assignId'])
$ticket->assignToTeam($vars['teamId'], 'Auto Assignment');
// Assign ticket to staff or team (new ticket by staff)
if($vars['assignId']) {
$ticket->assign($vars['assignId'], $vars['note']);
}
else {
// Auto assign staff or team - auto assignment based on filter
// rules. Both team and staff can be assigned
if ($vars['staffId'])
$ticket->assignToStaff($vars['staffId'], 'Auto Assignment');
if ($vars['teamId'])
$ticket->assignToTeam($vars['teamId'], 'Auto Assignment');
}
/********** double check auto-response ************/
//Override auto responder if the FROM email is one of the internal emails...loop control.
......@@ -2454,7 +2461,10 @@ class Ticket {
$errors['name'] = 'Name required';
}
if(!($ticket=Ticket::create($vars, $errors, 'staff', false, (!$vars['assignId']))))
if (!$thisstaff->canAssignTickets())
unset($vars['assignId']);
if(!($ticket=Ticket::create($vars, $errors, 'staff', false)))
return false;
$vars['msgId']=$ticket->getLastMsgId();
......@@ -2475,13 +2485,14 @@ class Ticket {
}
}
//Post Internal note
if($vars['assignId'] && $thisstaff->canAssignTickets()) { //Assign ticket to staff or team.
$ticket->assign($vars['assignId'], $vars['note']);
} elseif($vars['note']) { //Not assigned...save optional note if any
// Not assigned...save optional note if any
if (!$vars['assignId'] && $vars['note']) {
$ticket->logNote('New Ticket', $vars['note'], $thisstaff, false);
} else { //Not assignment and no internal note - log activity
$ticket->logActivity('New Ticket by Staff','Ticket created by staff -'.$thisstaff->getName());
}
else {
// Not assignment and no internal note - log activity
$ticket->logActivity('New Ticket by Staff',
'Ticket created by staff -'.$thisstaff->getName());
}
$ticket->reload();
......
......@@ -16,8 +16,14 @@
new_ticket:
title: New Ticket Alert
content: >
<p>
Alert sent out to staff members when new tickets are created in the
system.
</p><p class="info-banner">
<i class="icon-info-sign"></i>
Staff members (department members) are not
notified with this alert if the ticket is automatically assigned.
</p>
links:
- title: Default New Ticket Alert Template
href: /scp/templates.php?default_for=ticket.alert
......
......@@ -47,13 +47,17 @@ a {
color: #555;
}
#msg_info { margin: 0; padding: 5px; margin-bottom: 10px; color: #3a87ad; border: 1px solid #bce8f1; background-color: #d9edf7; }
#msg_info,
.info-banner { margin: 0; padding: 5px; margin-bottom: 10px; color: #3a87ad; border: 1px solid #bce8f1; background-color: #d9edf7; }
#msg_notice { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
#msg_notice,
.notice-banner { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
#msg_warning { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #f26522; background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; }
#msg_warning,
.warning-banner { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #f26522; background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; }
#msg_error { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #a00; background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; }
#msg_error,
.error-banner { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #a00; background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; }
#notice_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment