Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ MANIFEST.SKIP
RT-Extension-SMSNotify-.*
\..*\.swp
README.md
Makefile
MYMETA.json
MYMETA.yml
11 changes: 8 additions & 3 deletions lib/RT/Extension/SMSNotify.pm
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ C<SMS::Send::RedSMS>.

=head2 $SMSNotifyGetPhoneForUserFn

This config-overridable method is useful for filtering users to limit the
recipients of a message. For example, you might want to return a user's phone
number only when their local time is between 08:00 and 17:00.
By default, notifications will use the Pager number defined on the RT
user record of recipients. This behavior can be overriden to support
additional logic.

Setting a custom method via C<$SMSNotifyGetPhoneForUserFn> is useful for
filtering users to limit the recipients of a message. For example, you
might want to return a user's phone number only when their local time
is between 08:00 and 17:00.

If set, this variable must be either a function reference or a string that names
a module with a function named GetPhoneForUser. In either case the variable is set
Expand Down
2 changes: 1 addition & 1 deletion lib/RT/Extension/SMSNotify/OnShift.pm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ See the configuration section and L<RT::Extension::SMSNotify>.
sub GetPhoneForUser {
# Cache the custom field on first use to avoid repeat lookups
if (!defined($cf)) {
$cf = RT::CustomField->new( RT::SystemUser );
$cf = RT::CustomField->new( RT->SystemUser );
$cf->Load('ShiftCode');
}

Expand Down