Skip to content
Snippets Groups Projects
Commit 9040db68 authored by JediKev's avatar JediKev
Browse files

profile: Reply Redirect

This pull adds a Profile Setting for Agents to choose where to redirect
after replying to ticket. The two options are Queue (redirect to queue to
work on other tickets) or Ticket (redirect back to same ticket to continue
working) with the latter being the default. The setting is configurable for
each Agent in the helpdesk.
parent db132732
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable, Searchable {
'datetime_format' => '',
'thread_view_order' => '',
'default_ticket_queue_id' => 0,
'reply_redirect' => 'Ticket',
));
$this->_config = $_config->getInfo();
}
......@@ -347,6 +348,10 @@ implements AuthenticatedUser, EmailContact, TemplateVariable, Searchable {
return $this->default_paper_size;
}
function getReplyRedirect() {
return $this->reply_redirect;
}
function forcePasswdChange() {
return $this->change_passwd;
}
......@@ -744,6 +749,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable, Searchable {
'default_from_name' => $vars['default_from_name'],
'thread_view_order' => $vars['thread_view_order'],
'default_ticket_queue_id' => $vars['default_ticket_queue_id'],
'reply_redirect' => ($vars['reply_redirect'] == 'Queue') ? 'Queue' : 'Ticket',
)
);
$this->_config = $_config->getInfo();
......
......@@ -300,6 +300,23 @@ if ($avatar->isChangeable()) { ?>
<div class="error"><?php echo $errors['default_paper_size']; ?></div>
</td>
</tr>
<tr>
<td><?php echo __('Reply Redirect'); ?>:
<div class="faded"><?php echo __('Redirect URL used after replying to a ticket.');?></div>
</td>
<td>
<select name="reply_redirect">
<?php
$options=array('Queue'=>__('Queue'),'Ticket'=>__('Ticket'));
foreach($options as $key=>$opt) {
echo sprintf('<option value="%s" %s>%s</option>',
$key,($staff->reply_redirect==$key)?'selected="selected"':'',$opt);
}
?>
</select>
<div class="error"><?php echo $errors['reply_redirect']; ?></div>
</td>
</tr>
</tbody>
<tbody>
<tr class="header">
......
......@@ -214,7 +214,7 @@ if($_POST && !$errors):
$ticket = null;
$redirect = 'tickets.php';
if ($ticket)
if ($ticket && $thisstaff->getReplyRedirect() == 'Ticket')
$redirect = 'tickets.php?id='.$ticket->getId();
} elseif (!$errors['err']) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment