Due date not being set as per SLA


#1

Hi

I’m trying to setup SLA’s on RT 4.4.3 running on Centos 7.6.1810 Kernel 3.10.0-957.1.3.el7.x86_64.

The problem is that the due date is not being set on new tickets as per SLA. The Due: field under the Dates section remains blank despite the changes. SLA configs in RT_SiteConfig.pm are as follows:

Set( %ServiceAgreements, (
    Default => '4h',
    Levels => {
        '4h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*4, 
        IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
        'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
        '8h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*8, 
        IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
        'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
        '48h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*48, 
        IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
        'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
        '72h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*72, 
        IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
        'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
    },
));
Set( %ServiceBusinessHours, (
    'Default' => {
        1 => { Name => 'Monday', Start => '8:00', End => '17:00' },
        2 => { Name => 'Tuesday', Start => '8:00', End => '17:00' },
        3 => { Name => 'Wednesday', Start => '8:00', End => '17:00' },
        4 => { Name => 'Thursday', Start => '8:00', End => '17:00' },
        5 => { Name => 'Friday', Start => '8:00', End => '17:00' },
        holidays => [qw(01-01 03-21 2019-04-19 2019-04-22 04-27 05-01  06-16 08-09 09-24 12-16 
        12-25 12-26)],
    },
));

Could you please guide me as to where I might be getting things wrong and how I can fix it.


#2

Before anyone dives in deeply, I assume you’ve cleared the Mason cache and restarted the web server after changing the RT_SiteConfig.pm file?


#3

Hi GreenJimll

Thanks for the response.

I had only done a httpd reload initially but I’ve also done as you suggested and cleared the mason cache

# rm -Rf /usr/local/rt4/var/mason_data/obj/*

then restarted the web server but that hasn’t helped.

FYI - I’ve enabled debug logging as well but I haven’t seen any entries related to SLAs or any errors in particular. We’ve also recently upgraded from version 4.4.1 to 4.4.3 and hadn’t implemented SLAs till now.

Please see the full RT_SiteConfig.pm file below:

$ENV{'MYSQL_UNIX_PORT'} = '/var/lib/mysql/mysql.sock';
Set($rtname, 'Company');
Set($Organization, "Company");
Set($WebDomain, "rt.company1");
Set($OwnerEmail , 'rt@company1.com');
Set($EmailSubjectTagRegex, qr/(?:company1\.com|company2\.com)/i);
Set($CorrespondAddress, 'support@company.com');
Set($CommentAddress, 'rt-comment@company.com');
Set($RTAddressRegexp , '^(development|development-comment|rt|rt-comment|support|support- 
comment|miscellaneous|miscellaneous-comment|cm|cm-comment|test|test- 
comment|internal|internal-comment)?\@(company1\.com\|company2\.com)$');
Set($Timezone , 'Time/Zone');
Set(@LogToSyslogConf, facility => 'local0');
#Set($LogToFile , 'debug');
#Set($LogDir, '/var/log/');
#Set($LogToFileNamed , "rt.log");
Set($WebPort, 443);
Set($UseFriendlyToLine, 1);
Set($LogoLinkURL, "http://www.company.com");
Set($WebDefaultStylesheet, "aileron");
Set($HomepageComponents, [qw(QuickCreate Quicksearch MyAdminQueues MySupportQueues 
MyReminders RefreshHomepage Dashboards)]);
Set($SetOutgoingMailFrom, 1);
Set($UsernameFormat, "concise");
Set($MailPlugins, 'Auth::MailFrom', 'Auth::Crypt');
Set($RestrictReferrer, 0);
Set($DatabaseType, "mysql");
Set($DatabaseHost,   "db_host");
Set($DatabaseRTHost, "db_host");
Set($DatabaseUser, "rt");
Set($DatabasePassword, q{password});
Set(%GnuPG,
Enable                 => 1,
GnuPG                  => 'gpg',
Passphrase             => password,
OutgoingMessagesFormat => "RFC",
);
Set( %ServiceAgreements, (
Default => '4h',
Levels => {
    '4h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*4, 
    IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
    'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
    '8h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*8, 
    IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
    'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
    '48h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*48, 
    IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
    'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
    '72h' => { Resolve => { Starts => { BusinessMinutes => 0 }, BusinessMinutes => 60*72, 
    IgnoreOnStatuses => [ 'stalled', 'handover', 'no_access_to_site', 'rejected', 'resolved', 
    'cancelled', 'user_unavailable', 'offline' ] }, BusinessHours => 'Default', },
},
));
Set( %ServiceBusinessHours, (
'Default' => {
    1 => { Name => 'Monday', Start => '8:00', End => '17:00' },
    2 => { Name => 'Tuesday', Start => '8:00', End => '17:00' },
    3 => { Name => 'Wednesday', Start => '8:00', End => '17:00' },
    4 => { Name => 'Thursday', Start => '8:00', End => '17:00' },
    5 => { Name => 'Friday', Start => '8:00', End => '17:00' },
    holidays => [qw(01-01 03-21 2019-04-19 2019-04-22 04-27 05-01  06-16 08-09 09-24 12-16 
    12-25 12-26)],
},
));
Set(%Lifecycles,
default => {
    initial         => [ 'new' ],
    active          => [ 'assigned', 'offline', 'user_unavailable', 'no_access_to_site', 'soc_confrm', 'seclvl_res', 'escalate', 'vendor_escalate' ],
    inactive        => [ 'resolved', 'handover', 'cancelled', 'rejected', 'stalled' ],
    defaults => {
        on_create => 'new',
        on_merge  => 'resolved',
        approved  => 'assigned',
        denied    => 'rejected',
        reminder_on_open     => 'assigned',
        reminder_on_resolve  => 'resolved',
    },
    transitions => {
        ''       => [qw(new)],
        new      => [qw(assigned)],
        assigned => [qw(new stalled resolved rejected)],
        stalled  => [qw(new assigned rejected resolved)],
        rejected => [qw(resolved)],
    escalate => [qw(resolved cancelled vendor_escalate)],
    vendor_escalate => [qw(resolved cancelled)],
    assigned => [qw(soc_confrm offline user_unavailable seclvl_res escalate vendor_escalate cancelled resolved rejected no_access_to_site)],
    offline => [qw(assigned cancelled rejected)],
    soc_confrm => [qw(seclvl_res cancelled resolved rejected)],
    seclvl_res => [qw(cancelled resolved rejected handover escalate)],
    cancelled => [qw(resolved)],
    escalate => [qw(rejected handover resolved)],
    vendor_escalate => [qw(rejected handover resolved)],
    no_access_to_site => [qw(rejected handover resolved)],
    user_unavailable => [qw(assigned)],
    cancelled => [qw(assigned)],
    },
    rights => {
        '* -> *'        => 'ModifyTicket',
        'cancelled -> assigned'        => 'ReopenTicket',
    },
    actions => [
        'new -> assigned'      => {
            label  => 'Open It',
            update => 'Respond',
        },
        'new -> resolved'  => {
            label  => 'Resolve',
            update => 'Comment',
        },
        'new -> rejected'  => {
            label  => 'Reject',
            update => 'Respond',
        },
        'assigned -> stalled'  => {
            label  => 'Stall',
            update => 'Comment',
        },
        'assigned -> resolved' => {
            label  => 'Resolve',
            update => 'Comment',
        },
        'assigned -> rejected' => {
            label  => 'Reject',
            update => 'Respond',
        },

        'stalled -> assigned'  => {
            label  => 'Open It',
        },
        'resolved -> assigned' => {
            label  => 'Re-open',
            update => 'Comment',
        },
        'rejected -> assigned' => {
            label  => 'Re-open',
            update => 'Comment',
        },
    ],
},
security => {
    initial         => [ 'new' ],
    active          => [ 'open', 'stalled' ],
    inactive        => [ 'resolved', 'rejected', 'deleted' ],
    defaults => {
        on_create => 'new',
        on_merge  => 'resolved',
        approved  => 'open',
        denied    => 'rejected',
        reminder_on_open     => 'open',
        reminder_on_resolve  => 'resolved',
    },
    transitions => {
        ''       => [qw(new open resolved)],
        new      => [qw(open stalled resolved rejected deleted)],
        open     => [qw(new stalled resolved rejected deleted)],
        stalled  => [qw(new open rejected resolved deleted)],
        resolved => [qw(new open stalled rejected deleted)],
        rejected => [qw(new open stalled resolved deleted)],
        deleted  => [qw(new open stalled rejected resolved)],
    },
    rights => {
        '* -> deleted'  => 'DeleteTicket',
        '* -> *'        => 'ModifyTicket',
    },
    actions => [
        'new -> open'      => {
            label  => 'Open It',
            update => 'Respond',
        },
        'new -> resolved'  => {
            label  => 'Resolve',
            update => 'Comment',
        },
        'new -> rejected'  => {
            label  => 'Reject',
            update => 'Respond',
        },
        'new -> deleted'   => {
            label  => 'Delete',
        },

        'open -> stalled'  => {
            label  => 'Stall',
            update => 'Comment',
        },
        'open -> resolved' => {
            label  => 'Resolve',
            update => 'Comment',
        },
        'open -> rejected' => {
            label  => 'Reject',
            update => 'Respond',
        },

        'stalled -> open'  => {
            label  => 'Open It',
        },
        'resolved -> open' => {
            label  => 'Re-open',
            update => 'Comment',
        },
        'rejected -> open' => {
            label  => 'Re-open',
            update => 'Comment',
        },
        'deleted -> open'  => {
            label  => 'Undelete',
        },
    ],
},
approvals => {
    initial         => [ 'new' ],
    active          => [ 'open', 'stalled' ],
    inactive        => [ 'resolved', 'rejected', 'deleted' ],
    defaults => {
        on_create => 'new',
        on_merge => 'resolved',
        reminder_on_open     => 'open',
        reminder_on_resolve  => 'resolved',
    },
    transitions => {
        ''       => [qw(new open resolved)],
        new      => [qw(open stalled resolved rejected deleted)],
        open     => [qw(new stalled resolved rejected deleted)],
        stalled  => [qw(new open rejected resolved deleted)],
        resolved => [qw(new open stalled rejected deleted)],
        rejected => [qw(new open stalled resolved deleted)],
        deleted  => [qw(new open stalled rejected resolved)],
    },
    rights => {
        '* -> deleted'  => 'DeleteTicket',
        '* -> rejected' => 'ModifyTicket',
        '* -> *'        => 'ModifyTicket',
    },
    actions => [
        'new -> open'      => {
            label  => 'Open It',
            update => 'Respond',
        },
        'new -> resolved'  => {
            label  => 'Resolve',
            update => 'Comment',
        },
        'new -> rejected'  => {
            label  => 'Reject',
            update => 'Respond',
        },
        'new -> deleted'   => {
            label  => 'Delete',
        },

        'open -> stalled'  => {
            label  => 'Stall',
            update => 'Comment',
        },
        'open -> resolved' => {
            label  => 'Resolve',
            update => 'Comment',
        },
        'open -> rejected' => {
            label  => 'Reject',
            update => 'Respond',
        },

        'stalled -> open'  => {
            label  => 'Open It',
        },
        'resolved -> open' => {
            label  => 'Re-open',
            update => 'Comment',
        },
        'rejected -> open' => {
            label  => 'Re-open',
            update => 'Comment',
        },
        'deleted -> open'  => {
            label  => 'Undelete',
        },
    ],
},
);
1;

Thanks


#4

Hi,

I’ve discovered what was wrong and causing SLA functionality to fail. The two scrips “Set due date if needed according to SLA” and " Set starts date if needed according to SLA" were disabled.

I enabled them and everything is now working as it should. Funny how this is not mentioned in the official documentation on how to configure SLAs.

Could the team please add that.

Thanks