Skip to content

Commit 7409675

Browse files
committed
Patch: Ticket creation from user: Priority id is taken from settings if configured
1 parent cb88c91 commit 7409675

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Controllers/TicketsController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,8 @@ public function store(Request $request)
941941
$ticket->priority_id = $request->priority_id;
942942
}else{
943943
$ticket->status_id = Setting::grab('default_status_id');
944-
$ticket->priority_id = Models\Priority::first()->id;
944+
$default_priority_id = Setting::grab('default_priority_id');
945+
$ticket->priority_id = $default_priority_id == 0 ? Models\Priority::first()->id : $default_priority_id;
945946
}
946947

947948
if ($request->start_date != ""){

0 commit comments

Comments
 (0)