Skip to content

Commit fde863b

Browse files
committed
added customization for member list and status notifications
1 parent 33dc46c commit fde863b

3 files changed

Lines changed: 46 additions & 21 deletions

File tree

src/Controllers/ConfigurationsController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function index()
2323
$configurations_by_sections = ['init' => [], 'email' => [], 'tickets' => [], 'perms' => [], 'editor' => [], 'other' => []];
2424
$init_section = ['main_route', 'main_route_path', 'admin_route', 'admin_route_path', 'master_template', 'routes'];
2525
$email_section = ['status_notification', 'comment_notification', 'queue_emails', 'assigned_notification',
26+
'list_owner_notification', 'status_owner_notification',
2627
'email.template', 'email.owner.newticket.template', 'email.header', 'email.signoff', 'email.signature', 'email.dashboard',
2728
'email.google_plus_link', 'email.facebook_link', 'email.twitter_link', 'email.footer', 'email.footer_link',
2829
'email.color_body_bg', 'email.color_header_bg', 'email.color_content_bg', 'email.color_footer_bg',

src/Controllers/NotificationsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function ticketClosed(Ticket $original_ticket, Ticket $ticket)
6666
$a_to = $this->defaultRecipients($ticket, $notification_owner, $subject, $template);
6767

6868
// Notificate ticket owner
69-
if(!$ticket->hidden and !in_array($ticket->owner->email, [$notification_owner->email, $ticket->agent->email])){
69+
if(Setting::grab('list_owner_notification') and !$ticket->hidden and !in_array($ticket->owner->email, [$notification_owner->email, $ticket->agent->email])){
7070
$a_to[] = [
7171
'recipient' => $ticket->owner,
7272
'subject' => $subject,
@@ -95,7 +95,7 @@ public function ticketStatusUpdated(Ticket $original_ticket, Ticket $ticket)
9595
$a_to = $this->defaultRecipients($ticket, $notification_owner, $subject, $template);
9696

9797
// Notificate ticket owner
98-
if(!$ticket->hidden and !in_array($ticket->owner->email, [$notification_owner->email, $ticket->agent->email])){
98+
if(Setting::grab('status_owner_notification') and !$ticket->hidden and !in_array($ticket->owner->email, [$notification_owner->email, $ticket->agent->email])){
9999
$a_to[] = [
100100
'recipient' => $ticket->owner,
101101
'subject' => $subject,

src/Seeds/SettingsTableSeeder.php

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,45 @@ public function getDefaults()
126126
'email.color_footer_bg' => '#414141',
127127
'email.color_button_bg' => '#AC4D2F',
128128

129+
130+
/**
131+
* Configurable notifications.
132+
*/
133+
134+
/*
135+
* Agent notify: To notify assigned agent (either auto or manual assignment) of new assigned or transferred tickets
136+
* Default: 'yes'
137+
* not to notify agent: 'no'
138+
*/
139+
'assigned_notification' => 'yes',
140+
141+
/*
142+
* Comment notification: Send notification when new comment is posted
143+
* Default is send notification: 'yes'
144+
* Do not send notification: 'no'
145+
*/
146+
'comment_notification' => 'yes',
147+
148+
/*
149+
* Status notification: Send email notification to ticket owner/Agent when ticket status is changed
150+
* Default: 'yes'
151+
*/
152+
'status_notification' => 'yes',
153+
154+
/*
155+
* Notify owner when ticket list changes (between active and complete only)
156+
* Default: 'yes'
157+
*/
158+
'list_owner_notification' => 'yes',
159+
160+
/*
161+
* Notify owner when ticket status changes
162+
* Default: 'yes'
163+
*/
164+
'status_owner_notification' => 'yes',
165+
166+
167+
129168
/*
130169
* The default status for new created tickets
131170
* Default: 1
@@ -185,38 +224,23 @@ public function getDefaults()
185224
*/
186225
'attachments_path' => 'panichd_attachments',
187226
'thumbnails_path' => 'panichd_thumbnails',
188-
227+
189228

190229
/*
191230
* Pagination length: For tickets table.
192231
* Default: 1
193232
*/
194233
'length_menu' => [[10, 50, 100], [10, 50, 100]],
195-
/*
196-
* Status notification: send email notification to ticket owner/Agent when ticket status is changed
197-
* Default is send notification: 'yes'
198-
* Do not send notification: 'no'
199-
*/
200-
'status_notification' => 'yes',
201-
/*
202-
* Comment notification: Send notification when new comment is posted
203-
* Default is send notification: 'yes'
204-
* Do not send notification: 'no'
205-
*/
206-
'comment_notification' => 'yes',
234+
235+
207236
/*
208237
* Use Queue method when sending emails (Mail::queue instead of Mail::send). Note that Mail::queue needs to be
209238
* configured first http://laravel.com/docs/5.1/queues
210239
* Default is to not use queue: 'no'
211240
* use queue: 'yes'
212241
*/
213242
'queue_emails' => 'no',
214-
/*
215-
* Agent notify: To notify assigned agent (either auto or manual assignment) of new assigned or transferred tickets
216-
* Default: 'yes'
217-
* not to notify agent: 'no'
218-
*/
219-
'assigned_notification' => 'yes',
243+
220244
/*
221245
* Agent restrict: Restrict agents access to only their assigned tickets
222246
* Default: 'no'

0 commit comments

Comments
 (0)