{"id":19648332,"url":"https://github.com/bestpractical/rt-extension-sla","last_synced_at":"2025-09-25T17:20:59.635Z","repository":{"id":1440435,"uuid":"1669830","full_name":"bestpractical/rt-extension-sla","owner":"bestpractical","description":null,"archived":false,"fork":false,"pushed_at":"2015-07-20T16:08:09.000Z","size":467,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-09T22:52:07.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/RT-Extension-SLA","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bestpractical.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-27T09:25:48.000Z","updated_at":"2020-06-30T19:28:11.000Z","dependencies_parsed_at":"2022-07-29T13:39:05.555Z","dependency_job_id":null,"html_url":"https://github.com/bestpractical/rt-extension-sla","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Frt-extension-sla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Frt-extension-sla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Frt-extension-sla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Frt-extension-sla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestpractical","download_url":"https://codeload.github.com/bestpractical/rt-extension-sla/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240957851,"owners_count":19884815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T14:47:54.637Z","updated_at":"2025-09-25T17:20:54.590Z","avatar_url":"https://github.com/bestpractical.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    RT::Extension::SLA - Service Level Agreements for RT\n\nDESCRIPTION\n    RT extension to implement automated due dates using service levels.\n\nINSTALLATION\n    perl Makefile.PL\n    make\n    make install\n        May need root permissions\n\n    make initdb\n        Only run this the first time you install this module.\n\n        If you run this twice, you may end up with duplicate data in your\n        database.\n\n        If you are upgrading this module, check for upgrading instructions\n        in case changes need to be made to your database.\n\n    Edit your /opt/rt4/etc/RT_SiteConfig.pm\n        If you are using RT 4.2 or greater, add this line:\n\n            Plugin('RT::Extension::SLA');\n\n        For RT 3.8 and 4.0, add this line:\n\n            Set(@Plugins, qw(RT::Extension::SLA));\n\n        or add RT::Extension::SLA to your existing @Plugins line.\n\n    Restart your webserver\n\nUPGRADING\n  From versions prior to 0.06\n    You need to run an upgrade step on your RT database so this extension\n    continues to work. Run the following from inside the source of this\n    extension:\n\n        /opt/rt4/sbin/rt-setup-database --action insert --datafile etc/upgrade/0.06/content\n\n    It will prompt you for your DBA password and should complete without\n    error.\n\nCONFIGURATION\n    Service level agreements of tickets is controlled by an SLA custom field\n    (CF). This field is created during make initdb step (above) and applied\n    globally. This CF MUST be of select one value type. Values of the CF\n    define the service levels.\n\n    It's possible to define different set of levels for different queues.\n    You can create several CFs with the same name and different set of\n    values. But if you move tickets between queues a lot then it's going to\n    be a problem and it's preferred to use ONE SLA custom field.\n\n    There is no WebUI in the current version. Almost everything is\n    controlled in the RT's config using option %RT::ServiceAgreements and\n    %RT::ServiceBusinessHours. For example:\n\n        %RT::ServiceAgreements = (\n            Default =\u003e '4h',\n            QueueDefault =\u003e {\n                'Incident' =\u003e '2h',\n            },\n            Levels =\u003e {\n                '2h' =\u003e { Resolve =\u003e { RealMinutes =\u003e 60*2 } },\n                '4h' =\u003e { Resolve =\u003e { RealMinutes =\u003e 60*4 } },\n            },\n        );\n\n    In this example *Incident* is the name of the queue, and *2h* is the\n    name of the SLA which will be applied to this queue by default.\n\n    Each service level can be described using several options: Starts,\n    Resolve, Response, KeepInLoop, OutOfHours and ServiceBusinessHours.\n\n  Starts (interval, first business minute)\n    By default when a ticket is created Starts date is set to first business\n    minute after time of creation. In other words if a ticket is created\n    during business hours then Starts will be equal to Created time,\n    otherwise Starts will be beginning of the next business day.\n\n    However, if you provide 24/7 support then you most probably would be\n    interested in Starts to be always equal to Created time.\n\n    Starts option can be used to adjust behaviour. Format of the option is\n    the same as format for deadlines which described later in details.\n    RealMinutes, BusinessMinutes options and OutOfHours modifiers can be\n    used here like for any other deadline. For example:\n\n        'standard' =\u003e {\n            # give people 15 minutes\n            Starts   =\u003e { BusinessMinutes =\u003e 15  },\n        },\n\n    You can still use old option StartImmediately to set Starts date equal\n    to Created date.\n\n    Example:\n\n        '24/7' =\u003e {\n            StartImmediately =\u003e 1,\n            Response =\u003e { RealMinutes =\u003e 30 },\n        },\n\n    But it's the same as:\n\n        '24/7' =\u003e {\n            Starts =\u003e { RealMinutes =\u003e 0 },\n            Response =\u003e { RealMinutes =\u003e 30 },\n        },\n\n  Resolve and Response (interval, no defaults)\n    These two options define deadlines for resolve of a ticket and reply to\n    customer(requestors) questions accordingly.\n\n    You can define them using real time, business or both. Read more about\n    the latter below.\n\n    The Due date field is used to store calculated deadlines.\n\n   Resolve\n    Defines deadline when a ticket should be resolved. This option is quite\n    simple and straightforward when used without \"Response\".\n\n    Example:\n\n        # 8 business hours\n        'simple' =\u003e { Resolve =\u003e 60*8 },\n        ...\n        # one real week\n        'hard' =\u003e { Resolve =\u003e { RealMinutes =\u003e 60*24*7 } },\n\n   Response\n    In many companies providing support service(s) resolve time of a ticket\n    is less important than time of response to requestors from staff\n    members.\n\n    You can use Response option to define such deadlines. The Due date is\n    set when a ticket is created, unset when a worker replies, and re-set\n    when the requestor replies again -- until the ticket is closed, when the\n    ticket's Due date is unset.\n\n    NOTE that this behaviour changes when Resolve and Response options are\n    combined; see \"Using both Resolve and Response in the same level\".\n\n    Note that by default, only the requestors on the ticket are considered\n    \"outside actors\" and thus require a Response due date; all other email\n    addresses are treated as workers of the ticket, and thus count as\n    meeting the SLA. If you'd like to invert this logic, so that the Owner\n    and AdminCcs are the only worker email addresses, and all others are\n    external, see the \"AssumeOutsideActor\" configuration.\n\n    The owner is never treated as an outside actor; if they are also the\n    requestor of the ticket, it will have no SLA.\n\n    If an outside actor replies multiple times, their later replies are\n    ignored; the deadline is awlways calculated from the oldest\n    correspondence from the outside actor.\n\n   Using both Resolve and Response in the same level\n    Resolve and Response can be combined. In such case due date is set\n    according to the earliest of two deadlines and never is dropped to 'not\n    set'.\n\n    If a ticket met its Resolve deadline then due date stops \"flipping\", is\n    freezed and the ticket becomes overdue. Before that moment when an\n    inside actor replies to a ticket, due date is changed to Resolve\n    deadline instead of 'Not Set', as well this happens when a ticket is\n    closed. So all the time due date is defined.\n\n    Example:\n\n        'standard delivery' =\u003e {\n            Response =\u003e { RealMinutes =\u003e 60*1  }, # one hour\n            Resolve  =\u003e { RealMinutes =\u003e 60*24 }, # 24 real hours\n        },\n\n    A client orders goods and due date of the order is set to the next one\n    hour, you have this hour to process the order and write a reply. As soon\n    as goods are delivered you resolve tickets and usually meet Resolve\n    deadline, but if you don't resolve or user replies then most probably\n    there are problems with delivery of the goods. And if after a week you\n    keep replying to the client and always meeting one hour response\n    deadline that doesn't mean the ticket is not over due. Due date was\n    frozen 24 hours after creation of the order.\n\n   Using business and real time in one option\n    It's quite rare situation when people need it, but we've decided that\n    business is applied first and then real time when deadline described\n    using both types of time. For example:\n\n        'delivery' =\u003e {\n            Resolve =\u003e { BusinessMinutes =\u003e 0, RealMinutes =\u003e 60*8 },\n        },\n        'fast delivery' {\n            StartImmediately =\u003e 1,\n            Resolve =\u003e { RealMinutes =\u003e 60*8 },\n        },\n\n    For delivery requests which come into the system during business hours\n    these levels define the same deadlines, otherwise the first level set\n    deadline to 8 real hours starting from the next business day, when\n    tickets with the second level should be resolved in the next 8 hours\n    after creation.\n\n  Keep in loop (interval, no defaults)\n    If response deadline is used then Due date is changed to repsonse\n    deadline or to \"Not Set\" when staff replies to a ticket. In some cases\n    you want to keep requestors in loop and keed them up to date every few\n    hours. KeepInLoop option can be used to achieve this.\n\n        'incident' =\u003e {\n            Response   =\u003e { RealMinutes =\u003e 60*1  }, # one hour\n            KeepInLoop =\u003e { RealMinutes =\u003e 60*2 }, # two hours\n            Resolve    =\u003e { RealMinutes =\u003e 60*24 }, # 24 real hours\n        },\n\n    In the above example Due is set to one hour after creation, reply of a\n    inside actor moves Due date two hours forward, outside actors' replies\n    move Due date to one hour and resolve deadine is 24 hours.\n\n  Modifying Agreements\n   OutOfHours (struct, no default)\n    Out of hours modifier. Adds more real or business minutes to resolve\n    and/or reply options if event happens out of business hours, read also\n    \u003c/\"Configuring business hours\"\u003e below.\n\n    Example:\n\n        'level x' =\u003e {\n            OutOfHours =\u003e { Resolve =\u003e { RealMinutes =\u003e +60*24 } },\n            Resolve    =\u003e { RealMinutes =\u003e 60*24 },\n        },\n\n    If a request comes into the system during night then supporters have two\n    hours, otherwise only one.\n\n        'level x' =\u003e {\n            OutOfHours =\u003e { Response =\u003e { BusinessMinutes =\u003e +60*2 } },\n            Resolve    =\u003e { BusinessMinutes =\u003e 60 },\n        },\n\n    Supporters have two additional hours in the morning to deal with bunch\n    of requests that came into the system during the last night.\n\n   IgnoreOnStatuses (array, no default)\n    Allows you to ignore a deadline when ticket has certain status. Example:\n\n        'level x' =\u003e {\n            KeepInLoop =\u003e { BusinessMinutes =\u003e 60, IgnoreOnStatuses =\u003e ['stalled'] },\n        },\n\n    In above example KeepInLoop deadline is ignored if ticket is stalled.\n\n    NOTE: When a ticket goes from an ignored status to a normal status, the\n    new Due date is calculated from the last action (reply, SLA change, etc)\n    which fits the SLA type (Response, Starts, KeepInLoop, etc). This means\n    if a ticket in the above example flips from stalled to open without a\n    reply, the ticket will probably be overdue. In most cases this shouldn't\n    be a problem since moving out of stalled-like statuses is often the\n    result of RT's auto-open on reply scrip, therefore ensuring there's a\n    new reply to calculate Due from. The overall effect is that ignored\n    statuses don't let the Due date drift arbitrarily, which could wreak\n    havoc on your SLA performance. ExcludeTimeOnIgnoredStatuses option could\n    get around the \"probably be overdue\" issue by excluding the time spent\n    on ignored statuses.\n\n            'level x' =\u003e {\n                KeepInLoop =\u003e {\n                    BusinessMinutes =\u003e 60,\n                    ExcludeTimeOnIgnoredStatuses =\u003e 1,\n                    IgnoreOnStatuses =\u003e ['stalled'],\n                },\n            },\n\n  Configuring business hours\n    In the config you can set one or more work schedules. Use the following\n    format:\n\n        %RT::ServiceBusinessHours = (\n            'Default' =\u003e {\n                ... description ...\n            },\n            'Support' =\u003e {\n                ... description ...\n            },\n            'Sales' =\u003e {\n                ... description ...\n            },\n        );\n\n    Read more about how to describe a schedule in Business::Hours.\n\n   Defining different business hours for service levels\n    Each level supports BusinessHours option to specify your own business\n    hours.\n\n        'level x' =\u003e {\n            BusinessHours =\u003e 'work just in Monday',\n            Resolve    =\u003e { BusinessMinutes =\u003e 60 },\n        },\n\n    then %RT::ServiceBusinessHours should have the corresponding definition:\n\n        %RT::ServiceBusinessHours = (\n            'work just in Monday' =\u003e {\n                1 =\u003e { Name =\u003e 'Monday', Start =\u003e '9:00', End =\u003e '18:00' },\n            },\n        );\n\n    Default Business Hours setting is in\n    $RT::ServiceBusinessHours{'Default'}.\n\n  Defining service levels per queue\n    In the config you can set per queue defaults, using:\n\n        %RT::ServiceAgreements = (\n            Default =\u003e 'global default level of service',\n            QueueDefault =\u003e {\n                'queue name' =\u003e 'default value for this queue',\n                ...\n            },\n            ...\n        };\n\n  AssumeOutsideActor\n    When using a Response configuration, the due date is unset when anyone\n    who is not a requestor replies. If it is common for non-requestors to\n    reply to tickets, and this should *not* satisfy the SLA, you may wish to\n    set AssumeOutsideActor. This causes the extension to assume that the\n    Response SLA has only been met when the owner or AdminCc reply.\n\n        %RT::ServiceAgreements = (\n            AssumeOutsideActor =\u003e 1,\n            ...\n        };\n\n  Access control\n    You can totally hide SLA custom field from users and use per queue\n    defaults, just revoke SeeCustomField and ModifyCustomField.\n\n    If you want people to see the current service level ticket is assigned\n    to then grant SeeCustomField right.\n\n    You may want to allow customers or managers to escalate thier tickets.\n    Just grant them ModifyCustomField right.\n\nTODO\n        * [implemented, TODO: tests for options in the config] default SLA for queues\n\n        * [implemented, TODO: tests] add support for multiple b-hours definitions,\n          this could be very helpfull when you have 24/7 mixed with 8/5 and/or\n          something like 8/5+4/2 for different tickets(by requestor, queue or\n          something else). So people would be able to handle tickets in the right\n          order using Due dates.\n\n        * [not implemented] tests for AssumeOutsideActor - need tests for all of the\n          conditionals in RT::Action::SLA_SetDue::IsOutsideActor\n\n        * [not implemented] WebUI\n\nDESIGN\n  Classes\n    Actions are subclasses of RT::Action::SLA class that is subclass of\n    RT::Extension::SLA and RT::Action classes.\n\n    Conditions are subclasses of RT::Condition::SLA class that is subclass\n    of RT::Extension::SLA and RT::Condition classes.\n\n    RT::Extension::SLA is a base class for all classes in the extension, it\n    provides access to config, generates Business::Hours objects, and other\n    things useful for whole extension. As this class is the base for all\n    actions and conditions then we MUST avoid adding methods which overload\n    methods in 'RT::{Condition,Action}' RT's modules.\n\nNOTES\n    If you run make initdb more than once you will create multiple SLA CFs.\n    You can remove these via RT's Configuration-\u003eGlobal menu, (both Custom\n    Fields and Scrips).\n\nAUTHOR\n    Best Practical Solutions, LLC \u003cmodules@bestpractical.com\u003e\n\nBUGS\n    All bugs should be reported via email to\n\n        L\u003cbug-RT-Extension-SLA@rt.cpan.org|mailto:bug-RT-Extension-SLA@rt.cpan.org\u003e\n\n    or via the web at\n\n        L\u003crt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-SLA\u003e.\n\nCOPYRIGHT\n    This extension is Copyright (C) 2007-2014 Best Practical Solutions, LLC.\n\n    This is free software, licensed under:\n\n      The GNU General Public License, Version 2, June 1991\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestpractical%2Frt-extension-sla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestpractical%2Frt-extension-sla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestpractical%2Frt-extension-sla/lists"}