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) { if ($count === 1) {
$user_id = $user->id; $user_id = $user->id;
$ticket = Tickets::where('id', '=', $id)->first(); $ticket = Tickets::where('id', '=', $id)->first();
if ($user_id === $ticket->user_id) { if ($user_id === (int)$ticket->user_id) {
return 400; return 400;
} }
$ticket_number = $ticket->ticket_number; $ticket_number = $ticket->ticket_number;

View File

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