diff --git a/include/library/Crunchbutton/Community/Shift.php b/include/library/Crunchbutton/Community/Shift.php index af93817fd..74aafb581 100644 --- a/include/library/Crunchbutton/Community/Shift.php +++ b/include/library/Crunchbutton/Community/Shift.php @@ -652,7 +652,7 @@ class Crunchbutton_Community_Shift extends Cana_Table { $num = ( $txt != '' ) ? $txt : $phone; $cs_message = 'Driver notificaton: ' . str_replace( '|', '
', $message ); - // Crunchbutton_Support::createNewWarning( [ 'body' => $cs_message, 'phone' => $num ] ); + Crunchbutton_Support::createNewWarning( [ 'dont_open_ticket' => false, 'body' => $cs_message, 'phone' => $num ] ); if (strpos( $message, '|') > 0) { $message = str_replace('|', "\n", $message); diff --git a/include/library/Crunchbutton/Support.php b/include/library/Crunchbutton/Support.php index b0102c9aa..87972ccef 100644 --- a/include/library/Crunchbutton/Support.php +++ b/include/library/Crunchbutton/Support.php @@ -284,7 +284,10 @@ class Crunchbutton_Support extends Cana_Table { } if( $support && $support->id_support ){ - $support->status = Crunchbutton_Support::STATUS_OPEN; + $open = isset( $params[ 'dont_open_ticket' ] ) ? false : true; + if( $open ){ + $support->status = Crunchbutton_Support::STATUS_OPEN; + } } else { $support = new Crunchbutton_Support(); $support->type = Crunchbutton_Support::TYPE_WARNING;