Now new tickets and client replies can have statuses set

merge-requests/2/head
Mike Koch 10 years ago
parent 38bcd28249
commit 00bdb9b6e6

@ -1846,6 +1846,21 @@ if ( defined('HESK_DEMO') )
</div>
<h6 style="font-weight: bold"><?php echo $hesklang['defaultStatusForAction']; ?></h6>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="newTicket" class="col-sm-8 col-xs-12 control-label"><?php echo $hesklang['isNewTicketMsg']; ?></label>
<div class="col-sm-4 col-xs-12">
<select name="newTicket" class="form-control" id="newTicket">
<?php
$statusesRS = hesk_dbQuery($statusesSql);
while ($row = $statusesRS->fetch_assoc())
{
$selectedEcho = ($row['IsNewTicketStatus'] == 1) ? 'selected="selected"' : '';
echo '<option value="'.$row['ID'].'" '.$selectedEcho.'>'.$hesklang[$row['ShortNameContentKey']].'</option>';
}
?>
</select>
</div>
</div>
<div class="form-group">
<label for="closedByClient" class="col-sm-8 col-xs-12 control-label"><?php echo $hesklang['isClosedByClientMsg']; ?></label>
<div class="col-sm-4 col-xs-12">
@ -1861,6 +1876,21 @@ if ( defined('HESK_DEMO') )
</select>
</div>
</div>
<div class="form-group">
<label for="replyFromClient" class="col-sm-8 col-xs-12 control-label"><?php echo $hesklang['isRepliedByClientMsg']; ?></label>
<div class="col-sm-4 col-xs-12">
<select name="replyFromClient" class="form-control" id="replyFromClient">
<?php
$statusesRS = hesk_dbQuery($statusesSql);
while ($row = $statusesRS->fetch_assoc())
{
$selectedEcho = ($row['IsCustomerReplyStatus'] == 1) ? 'selected="selected"' : '';
echo '<option value="'.$row['ID'].'" '.$selectedEcho.'>'.$hesklang[$row['ShortNameContentKey']].'</option>';
}
?>
</select>
</div>
</div>
<div class="form-group">
<label for="staffClosedOption" class="col-sm-8 col-xs-12 control-label"><?php echo $hesklang['isStaffClosedOptionMsg']; ?></label>
<div class="col-sm-4 col-xs-12">

@ -452,12 +452,26 @@ if ($_POST['sN_shortName'] != null && $_POST['sN_longName'] != null && $_POST['s
//-- Update default status for actions
$defaultQuery = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET ";
hesk_dbConnect()->query($defaultQuery . "`IsNewTicketStatus` = 0");
$updateQuery = $defaultQuery . "`IsNewTicketStatus` = 1 WHERE `ID` = ?";
$stmt = hesk_dbConnect()->prepare($updateQuery);
$stmt->bind_param('i', $_POST['newTicket']);
$stmt->execute();
hesk_dbConnect()->query($defaultQuery . "`IsClosedByClient` = 0");
$updateQuery = $defaultQuery . "`IsClosedByClient` = 1 WHERE `ID` = ?";
$stmt = hesk_dbConnect()->prepare($updateQuery);
$stmt->bind_param('i', $_POST['closedByClient']);
$stmt->execute();
hesk_dbConnect()->query($defaultQuery . "`IsCustomerReplyStatus` = 0");
$updateQuery = $defaultQuery . "`IsCustomerReplyStatus` = 1 WHERE `ID` = ?";
$stmt = hesk_dbConnect()->prepare($updateQuery);
$stmt->bind_param('i', $_POST['replyFromClient']);
$stmt->execute();
hesk_dbConnect()->query($defaultQuery . "`IsStaffClosedOption` = 0");
$updateQuery = $defaultQuery . "`IsStaffClosedOption` = 1 WHERE `ID` = ?";
$stmt = hesk_dbConnect()->prepare($updateQuery);

@ -34,11 +34,11 @@ $hesklang['closedQuestionMark'] = 'Closed?';
$hesklang['closedQuestionMarkDescr'] = 'If checked, tickets will be considered closed if they are set to this status.';
$hesklang['basicProperties'] = 'Basic Properties';
$hesklang['defaultStatusForAction'] = 'Default Status For Action';
$hesklang['isClosedByClientMsg'] = 'When a client clicks the "Close ticket" link, change the status to:';
$hesklang['isStaffClosedOptionMsg'] = 'When a staff member clicks the "Close ticket" link, change the status to:';
$hesklang['isStaffReopenedStatusMsg'] = 'When a staff member clicks the "Open ticket" link, change the status to:';
$hesklang['isDefaultStaffReplyStatusMsg'] = 'When a staff member replies to a ticket, change the status to:';
$hesklang['lockedTicketStatusMsg'] = 'When a ticket is locked, change the status to:';
$hesklang['isClosedByClientMsg'] = 'When a client clicks the "Close ticket" link, change the status to';
$hesklang['isStaffClosedOptionMsg'] = 'When a staff member clicks the "Close ticket" link, change the status to';
$hesklang['isStaffReopenedStatusMsg'] = 'When a staff member clicks the "Open ticket" link, change the status to';
$hesklang['isDefaultStaffReplyStatusMsg'] = 'When a staff member replies to a ticket, change the status to';
$hesklang['lockedTicketStatusMsg'] = 'When a ticket is locked, change the status to';
$hesklang['nuHeskVersion'] = 'NuHesk Version';
$hesklang['shortNameRequired'] = 'Short Name Key is required.';
$hesklang['longNameRequired'] = 'Long Name Key is required.';
@ -47,6 +47,8 @@ $hesklang['addNew'] = 'Add New';
$hesklang['close_action']='Close Ticket'; // Close ACTION
$hesklang['whyCantIDeleteThisStatus'] = "Why Can't I Delete This Status?";
$hesklang['whyCantIDeleteThisStatusReason'] = 'This status cannot be deleted because it is being used as a default status for a particular action.';
$hesklang['isNewTicketMsg'] = 'When a new ticket is created, set its status to';
$hesklang['isRepliedByClientMsg'] = 'When a client replies to a ticket, set its status to';
// ADDED OR MODIFIED IN HESK UI

Loading…
Cancel
Save