bug-fix-patch-8

# correcting comparision between integer number and string number
# Importing help topic's set priority and auto-assigne while creating
ticket from cleint panel.
This commit is contained in:
Manish Verma
2016-12-23 12:58:34 +05:30
parent 179cb4e362
commit d3f3497fe0
2 changed files with 8 additions and 2 deletions

View File

@@ -2218,7 +2218,7 @@ class TicketController extends Controller
if ($count === 1) {
$user_id = $user->id;
$ticket = Tickets::where('id', '=', $id)->first();
if ($user_id === $ticket->user_id) {
if ($user_id === (int)$ticket->user_id) {
return 400;
}
$ticket_number = $ticket->ticket_number;

View File

@@ -178,10 +178,13 @@ class FormController extends Controller
$sla = $ticket_settings->first()->sla;
// $priority = $ticket_settings->first()->priority;
$default_priority = Ticket_Priority::where('is_default', '=', 1)->first();
$default_priority = Ticket_Priority::where('is_default', '=', 1)->first();
$user_priority = CommonSettings::where('option_name', '=', 'user_priority')->first();
if (!($request->input('priority'))) {
$priority = $default_priority->priority_id;
if ($helpTopicObj->exists() && ($helpTopicObj->value('status') == 1)) {
$priority = $helpTopicObj->value('priority');
}
} else {
$priority = $request->input('priority');
}
@@ -189,6 +192,9 @@ class FormController extends Controller
$attachments = $request->file('attachment');
$collaborator = null;
$assignto = null;
if ($helpTopicObj->exists() && ($helpTopicObj->value('status') == 1)) {
$assignto = $helpTopicObj->value('auto_assign');
}
$auto_response = 0;
$team_assign = null;
if ($phone != null || $mobile_number != null) {