diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php
index 51d6caca..535b5b31 100644
--- a/admin/admin_ticket.php
+++ b/admin/admin_ticket.php
@@ -757,9 +757,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
+
+
diff --git a/api/BusinessLogic/Security/UserToTicketChecker.php b/api/BusinessLogic/Security/UserToTicketChecker.php
index be688fdb..70ee684d 100644
--- a/api/BusinessLogic/Security/UserToTicketChecker.php
+++ b/api/BusinessLogic/Security/UserToTicketChecker.php
@@ -36,9 +36,9 @@ class UserToTicketChecker extends \BaseClass {
return false;
}
- $categoryManagerId = $this->userGateway->getManagerForCategory($ticket->categoryId, $heskSettings);
+ $categoryManager = $this->userGateway->getManagerForCategory($ticket->categoryId, $heskSettings);
- if ($user->id === $categoryManagerId) {
+ if ($categoryManager !== null && $user->id === $categoryManager->id) {
return true;
}
diff --git a/api/BusinessLogic/Tickets/Ticket.php b/api/BusinessLogic/Tickets/Ticket.php
index 43011ec9..1b5c0967 100644
--- a/api/BusinessLogic/Tickets/Ticket.php
+++ b/api/BusinessLogic/Tickets/Ticket.php
@@ -42,7 +42,7 @@ class Ticket extends \BaseClass {
$ticket->numberOfReplies = intval($row['replies']);
$ticket->numberOfStaffReplies = intval($row['staffreplies']);
$ticket->ownerId = intval($row['owner']);
- $ticket->assignedBy = $row['assigned_by'] === null ? null : intval($row['assigned_by']);
+ $ticket->assignedBy = $row['assignedby'] === null ? null : intval($row['assignedby']);
$ticket->timeWorked = $row['time_worked'];
$ticket->lastReplyBy = intval($row['lastreplier']);
$ticket->lastReplier = $row['replierid'] === null ? null : intval($row['replierid']);
diff --git a/internal-api/js/admin-ticket.js b/internal-api/js/admin-ticket.js
index 81ae9c8a..ac781592 100644
--- a/internal-api/js/admin-ticket.js
+++ b/internal-api/js/admin-ticket.js
@@ -23,7 +23,7 @@ $(document).ready(function() {
var ticketId = $('input[type="hidden"][name="orig_id"]').val();
$.ajax({
method: 'POST',
- url: heskPath + 'api/v1/staff/tickets/' + ticketId + '/due-date',
+ url: heskPath + 'api/index.php/v1/staff/tickets/' + ticketId + '/due-date',
headers: {
'X-Internal-Call': true,
'X-HTTP-Method-Override': 'PATCH'