[Rt-commit] rtir branch, 2.6-trunk, updated. 2.6.1rc1-3-gb678688

Ruslan Zakirov ruz at bestpractical.com
Wed Aug 10 07:16:21 EDT 2011


The branch, 2.6-trunk has been updated
       via  b678688bb84c5c5d834a8eea8001ec20c33e701f (commit)
       via  85587c406f189b68d15ec9205e3e2646207f7f1b (commit)
       via  1856b29eaa872dc7a5c617a1ef75d44d40dc8ac8 (commit)
      from  be7de2e7dd1c00410fc6d1e828dcb9a70e832a6c (commit)

Summary of changes:
 TODO.switch_custom_fields_to_generic_RT_methods |   72 ----
 etc/RTIR_Config.pm                              |  472 +++++++++++++++--------
 2 files changed, 307 insertions(+), 237 deletions(-)
 delete mode 100644 TODO.switch_custom_fields_to_generic_RT_methods

- Log -----------------------------------------------------------------
commit 1856b29eaa872dc7a5c617a1ef75d44d40dc8ac8
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Aug 9 16:03:48 2011 +0400

    remove TODO

diff --git a/TODO.switch_custom_fields_to_generic_RT_methods b/TODO.switch_custom_fields_to_generic_RT_methods
deleted file mode 100644
index f578ae3..0000000
--- a/TODO.switch_custom_fields_to_generic_RT_methods
+++ /dev/null
@@ -1,72 +0,0 @@
-* Suspect that failed custom field validation check or gnupg error that returns back to
-  create page will dropp fields to defaults
-
-* Rename some fields to variants with spaces
-
-* Custom fields in Incident display are very specific and mixed with generic RT properties
-
-* Description CF in Incidents had Cols => 60 argument, check if we preserve behaviour
-(update: the answer is no. and seems there's no way to do this except hacking rt's
-/Elements/EditCustomField or /Elements/EditCustomFieldFreeform)
-
-* On edit State need special treating for Blocks
-* Constituency has special treating on edit depending on constituency propagation mode
-** These two custom fields are still massaged via callback and RTIR has special editor
-
-Implemented changes:
-
-* RTIR's custom fields are renamed, no more '_RTIR_' prefix. As well some CFs had two
-  word names, spaces have been added. Handled in upgrade script.
-
-* Autoreply and BlockRemoved templates in blocks queue need changes. Block that adds
-  CF values to the mail should be:
-
-    { my $output = "";
-      my @mailfields = ( 'IP', 'Netmask', 'Port', 'Where Blocked' );
-
-      my $CustomFields = $Ticket->QueueObj->TicketCustomFields;
-      while ( my $CustomField = $CustomFields->Next ) {
-        my $name = $CustomField->Name;
-        next unless grep lc $_ eq lc $name, @mailfields;
-
-        my $Values = $Ticket->CustomFieldValues( $CustomField->Id );
-        while ( my $Value = $Values->Next ) {
-          $output .= $name .": ". $Value->Content ."\n";
-        }
-      }
-      return $output;
-    }
-
-* Default values:
-** Reports/SLA/OnCreate: RT::IR::DefaultSLA()
-** Reports/How Reported/OnCreate: $ARGS{'HowReported-Value'} || RT->Config->Get('_RTIR_HowReported_default')
-** the same for 'reporter type'
-** Blocks/Port/OnCreate: $ARGS{'Port-Value'} || RT->Config->Get('_RTIR_Port_default')
-** Blocks/Where Blocked/OnCreate: $ARGS{'WhereBlocked-Value'} || RT->Config->Get('_RTIR_WhereBlocked_default')
-** similar applies to 'Net Mask'
-** Incident/OnCreate:
-*** Description, Classification, Function: RT->Config->Get('_RTIR_Description_default'),
-*** Resolution: no default
-** IP default on Create for children:
-my $ip_default = $ARGS{'IP-Value'};
-if ( !$ip_default && $IncidentObj ) {
-    $ip_default = join "\n", grep $_, map $_->Content,
-        @{ $IncidentObj->CustomFieldValues( 'IP' )->ItemsArrayRef };
-}
-$ip_default ||= RT->Config->Get('_RTIR_IP_default') || '';
-
-** IP for incidents:
-my $ip_default = $ARGS{'IP-Value'};
-if ( !$ip_default && $ChildObj ) {
-    $ip_default = join "\n", grep $_, map $_->Content,
-        @{ $ChildObj->CustomFieldValues( 'IP' )->ItemsArrayRef };
-}
-$ip_default ||= RT->Config->Get('_RTIR_IP_default') || '';
-
-* Names of custom fields were localized in RT, we should localize them in RTIR as well
-( this is automatically done since we use RT's cf edit component )
-
-* Stripping of _RTIR_ prefix results in changes of searches: Formats and Queries, write an upgrader for saved searches
-( the script is at etc/upgrade/2.5.1/update_saved_searches.pl, maybe put it somewhere
-better? )
-

commit 85587c406f189b68d15ec9205e3e2646207f7f1b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Aug 10 12:34:56 2011 +0400

    sort config options logicaly for PODifcation

diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index c9a212d..702c3f9 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -1,9 +1,3 @@
-# WebNoAuthRegex - What portion of RT's URLspace should not require
-# authentication. Adjust it according to RTIR paths
-
-my $rt_no_auth = RT->Config->Get('WebNoAuthRegex');
-Set($WebNoAuthRegex, qr{ (?: $rt_no_auth | ^/+RTIR/+NoAuth/ ) }x);
-
 # Set the name of the RTIR application.
 
 Set($rtirname, RT->Config->Get('rtname') );
@@ -18,147 +12,6 @@ Set($MaxInlineBody, 0);
 
 Set($OverdueAfter, 7);
 
-# Which research tools should RTIR display for address/domain lookups
-#
-
-
-# For each tool listed in this section, RTIR will attempt to display
-#   share/html/RTIR/Tools/Elements/ToolForm____
-#       and
-#   share/html/RTIR/Tools/Elements/ToolResults____
-#
-# on the Tools/Lookup.html
-Set( @RTIRResearchTools, (qw(Traceroute Whois Iframe)));
-
-# One of the research tools available in RTIR allows you to
-# configure a set of search URLs that incident handlers
-# can use to open searches in IFRAMES. Entries are keyed
-# by integer in the order you'd like to see them in the dropdown
-# on the research page
-# Each entry consists of a hashref containing "FriendlyName" and "URL"
-# The URLs will be evaluated to replace __SearchTerm__ with the
-# user's current search term.
-
- Set ($RTIRIframeResearchToolConfig, {
-   1 => { FriendlyName => 'Google', URL => 'https://encrypted.google.com/search?q=__SearchTerm__' },
-   2 => { FriendlyName => 'CVE', URL => 'http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=__SearchTerm__'},
-    3 => { FriendlyName => 'TrustedSource.org', URL => 'http://www.trustedsource.org/query/__SearchTerm__'},
-    4 => { FriendlyName => 'McAfee SiteAdvisor', URL => 'http://www.siteadvisor.com/sites/__SearchTerm__'},
-    5 => { FriendlyName => 'BFK DNS Logger', URL => 'http://www.bfk.de/bfk_dnslogger.html?query=__SearchTerm__#result'}
-    } );
-
-
-# Set the hash of whois servers
-# Host is of the form "hostname:port"
-Set($whois, {
-    1 => {
-        Host         => "whois.iana.org",
-        FriendlyName => "IANA",
-    },
-    5 => {
-        Host         => "whois.ripe.net",
-        FriendlyName => "RIPE",
-    },
-    2 => {
-        Host         => "whois.internic.net",
-        FriendlyName => "INTERNIC",
-    },
-    3 => {
-        Host         => "whois.arin.net",
-        FriendlyName => "ARIN",
-    },
-} );
-
-
-# Set the name of the Business::SLA class
-# Use this if you have a custom SLA module
-# Set($SLAModule, "Business::MySLA");
-
-# Set the number of minutes for the SLA
-
-Set($SLA, {
-    'Full service'               => { BusinessMinutes => 60,    RealMinutes => 0 },
-    'Full service: out of hours' => { BusinessMinutes => 120,   RealMinutes => 0 },
-    'Reduced service'            => { BusinessMinutes => 120,   RealMinutes => 0 },
-    'Now (in business hours)'    => { BusinessMinutes => 0,     RealMinutes => 0 },
-#   '60 Real Minutes'            => { BusinessMinutes => undef, RealMinutes => 60 },
-} );
-
-# Set the SLA for responses
-Set($SLA_Response_InHours,    'Now (in business hours)');
-Set($SLA_Response_OutOfHours, 'Now (in business hours)');
-
-# Set the SLA for re-opened tickets
-Set($SLA_Reopen_InHours,    'Full service');
-Set($SLA_Reopen_OutOfHours, 'Full service: out of hours');
-
-# Set the defaults for RTIR custom fields
-# default values are case-sensitive
-
-Set(
-    %RTIR_CustomFieldsDefaults,
-    SLA => {
-        InHours    => 'Full service',
-        OutOfHours => 'Full service: out of hours',
-    },
-    'How Reported'  => "",
-    'Reporter Type' => "",
-    IP              => "",
-    Netmask         => "",
-    Port            => "",
-    'Where Blocked' => "",
-    Function        => "",
-    Classification  => "",
-    Description     => "",
-    Resolution      => {
-        resolved => "successfully resolved",
-        rejected => "no resolution reached",
-    },
-    Constituency => 'EDUNET',
-);
-
-# Constituency behaviour
-# read more about constituencies in lib/RT/IR/Constituency.pod
-
-# Constituency propagation algorithm
-# valid values are 'no', 'inherit', 'reject'
-# Algorithms are defined in lib/RT/IR/Constituency.pod/Changing the value
-Set( $_RTIR_Constituency_Propagation,    'no' );
-
-# Set the Business Hours for your organization
-# if left unset, defaults are Monday through Friday 09:00 to 18:00
-
-#Set($BusinessHours, {
-#    0 => { Name => 'Sunday',
-#           Start => undef,
-#           End => undef},
-#
-#    1 => { Name => 'Monday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    2 => { Name => 'Tuesday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    3 => { Name => 'Wednesday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    4 => { Name => 'Thursday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    5 => { Name => 'Friday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    6 => { Name => 'Saturday',
-#           Start => undef,
-#           End => undef},
-#} );
-
-
 # This is the string that indicates a reply, and which will be
 # pre-pended to subjects when you reply to tickets.
 
@@ -197,7 +50,7 @@ Set($RTIRSearchResultFormats, {
           __CreatedRelative__,
           __NEWLINE__,
           '', __Requestors__, __OwnerName__, __ToldRelative__, __DueRelative__, __TimeLeft__},
-    
+
     BlockDefault =>
         q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
           '<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
@@ -277,15 +130,10 @@ Set($RTIRSearchResultFormats, {
 
 } );
 
-
 # Enable this option if you want jump to display screen after saving changes
 # on the edit screen.
 Set($DisplayAfterEdit, 1);
 
-# path to traceroute command
-Set($TracerouteCommand, '/usr/sbin/traceroute');
-
-
 # Components that available to add on the first page of the RTIR
 Set(@RTIR_HomepageComponents, qw(
     QuickCreate
@@ -301,14 +149,6 @@ Set(@RTIR_HomepageComponents, qw(
     RefreshHomepage
 ));
 
-# if true then Blocks queue functionality inactive and disabled
-Set($RTIR_DisableBlocksQueue, 0);
-
-# When requestor replies on the block in pending state RTIR
-# changes state, you can set regular expresion so state would
-# be changed only when it matches
-Set($RTIR_BlockAproveActionRegexp, undef);
-
 # Define list of enabled MakeClicky extensions; RTIR extends the
 # default 'httpurl', and additionally provides 'ip', 'ipdecimal',
 # 'email', 'domain' and 'RIPE'.  It is possible to add your own types
@@ -318,4 +158,159 @@ Set($RTIR_BlockAproveActionRegexp, undef);
 # other actions don't apply to the same matched text
 Set(@Active_MakeClicky, qw(httpurl_overwrite ip email domain));
 
+# Set the defaults for RTIR custom fields
+# default values are case-sensitive
+
+Set(
+    %RTIR_CustomFieldsDefaults,
+    SLA => {
+        InHours    => 'Full service',
+        OutOfHours => 'Full service: out of hours',
+    },
+    'How Reported'  => "",
+    'Reporter Type' => "",
+    IP              => "",
+    Netmask         => "",
+    Port            => "",
+    'Where Blocked' => "",
+    Function        => "",
+    Classification  => "",
+    Description     => "",
+    Resolution      => {
+        resolved => "successfully resolved",
+        rejected => "no resolution reached",
+    },
+    Constituency => 'EDUNET',
+);
+
+# Constituency behaviour
+# read more about constituencies in lib/RT/IR/Constituency.pod
+
+# Constituency propagation algorithm
+# valid values are 'no', 'inherit', 'reject'
+# Algorithms are defined in lib/RT/IR/Constituency.pod/Changing the value
+Set( $_RTIR_Constituency_Propagation,    'no' );
+
+# if true then Blocks queue functionality inactive and disabled
+Set($RTIR_DisableBlocksQueue, 0);
+
+# When requestor replies on the block in pending state RTIR
+# changes state, you can set regular expresion so state would
+# be changed only when it matches
+Set($RTIR_BlockAproveActionRegexp, undef);
+
+# Which research tools should RTIR display for address/domain lookups
+
+# For each tool listed in this section, RTIR will attempt to display
+#   share/html/RTIR/Tools/Elements/ToolForm____
+#       and
+#   share/html/RTIR/Tools/Elements/ToolResults____
+#
+# on the Tools/Lookup.html
+Set( @RTIRResearchTools, (qw(Traceroute Whois Iframe)));
+
+# One of the research tools available in RTIR allows you to
+# configure a set of search URLs that incident handlers
+# can use to open searches in IFRAMES. Entries are keyed
+# by integer in the order you'd like to see them in the dropdown
+# on the research page
+# Each entry consists of a hashref containing "FriendlyName" and "URL"
+# The URLs will be evaluated to replace __SearchTerm__ with the
+# user's current search term.
+
+ Set ($RTIRIframeResearchToolConfig, {
+   1 => { FriendlyName => 'Google', URL => 'https://encrypted.google.com/search?q=__SearchTerm__' },
+   2 => { FriendlyName => 'CVE', URL => 'http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=__SearchTerm__'},
+    3 => { FriendlyName => 'TrustedSource.org', URL => 'http://www.trustedsource.org/query/__SearchTerm__'},
+    4 => { FriendlyName => 'McAfee SiteAdvisor', URL => 'http://www.siteadvisor.com/sites/__SearchTerm__'},
+    5 => { FriendlyName => 'BFK DNS Logger', URL => 'http://www.bfk.de/bfk_dnslogger.html?query=__SearchTerm__#result'}
+    } );
+
+# path to traceroute command
+Set($TracerouteCommand, '/usr/sbin/traceroute');
+
+
+# Set the hash of whois servers
+# Host is of the form "hostname:port"
+Set($whois, {
+    1 => {
+        Host         => "whois.iana.org",
+        FriendlyName => "IANA",
+    },
+    5 => {
+        Host         => "whois.ripe.net",
+        FriendlyName => "RIPE",
+    },
+    2 => {
+        Host         => "whois.internic.net",
+        FriendlyName => "INTERNIC",
+    },
+    3 => {
+        Host         => "whois.arin.net",
+        FriendlyName => "ARIN",
+    },
+} );
+
+
+# Set the name of the Business::SLA class
+# Use this if you have a custom SLA module
+# Set($SLAModule, "Business::MySLA");
+
+# Set the number of minutes for the SLA
+
+Set($SLA, {
+    'Full service'               => { BusinessMinutes => 60,    RealMinutes => 0 },
+    'Full service: out of hours' => { BusinessMinutes => 120,   RealMinutes => 0 },
+    'Reduced service'            => { BusinessMinutes => 120,   RealMinutes => 0 },
+    'Now (in business hours)'    => { BusinessMinutes => 0,     RealMinutes => 0 },
+#   '60 Real Minutes'            => { BusinessMinutes => undef, RealMinutes => 60 },
+} );
+
+# Set the SLA for responses
+Set($SLA_Response_InHours,    'Now (in business hours)');
+Set($SLA_Response_OutOfHours, 'Now (in business hours)');
+
+# Set the SLA for re-opened tickets
+Set($SLA_Reopen_InHours,    'Full service');
+Set($SLA_Reopen_OutOfHours, 'Full service: out of hours');
+
+# Set the Business Hours for your organization
+# if left unset, defaults are Monday through Friday 09:00 to 18:00
+
+#Set($BusinessHours, {
+#    0 => { Name => 'Sunday',
+#           Start => undef,
+#           End => undef},
+#
+#    1 => { Name => 'Monday',
+#           Start => '09:00',
+#           End => '18:00'},
+#
+#    2 => { Name => 'Tuesday',
+#           Start => '09:00',
+#           End => '18:00'},
+#
+#    3 => { Name => 'Wednesday',
+#           Start => '09:00',
+#           End => '18:00'},
+#
+#    4 => { Name => 'Thursday',
+#           Start => '09:00',
+#           End => '18:00'},
+#
+#    5 => { Name => 'Friday',
+#           Start => '09:00',
+#           End => '18:00'},
+#
+#    6 => { Name => 'Saturday',
+#           Start => undef,
+#           End => undef},
+#} );
+
+# WebNoAuthRegex - What portion of RT's URLspace should not require
+# authentication. Adjust it according to RTIR paths
+
+my $rt_no_auth = RT->Config->Get('WebNoAuthRegex');
+Set($WebNoAuthRegex, qr{ (?: $rt_no_auth | ^/+RTIR/+NoAuth/ ) }x);
+
 1;

commit b678688bb84c5c5d834a8eea8001ec20c33e701f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Aug 10 15:15:30 2011 +0400

    PODify config

diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 702c3f9..b322c02 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -1,29 +1,88 @@
-# Set the name of the RTIR application.
+=head1 NAME
 
-Set($rtirname, RT->Config->Get('rtname') );
+RT::IR::Config - RTIR specific options and defaults for RT
+
+=head1 WARNING
+
+NEVER EDIT RTIR_Config.pm.
+
+Instead, copy any sections you want to change to F<RT_SiteConfig.pm> and edit them there.
+
+=head1 Base Configuration
+
+=over 4
+
+=item C<$rtirname>
+
+Set the name of the RTIR application.
+
+=cut
+
+Set( $rtirname, RT->Config->Get('rtname') );
+
+=back
+
+=head1 Web Interface Configuration
+
+=over 4
+
+=item C<$WebNoAuthRegex>
+
+RTIR serves URLs with F</RTIR/NoAuth/> paths that shouldn't
+be protected by authentication. If you customize this option
+make sure to include this path as well.
+
+=cut
+
+my $rt_no_auth = RT->Config->Get('WebNoAuthRegex');
+Set($WebNoAuthRegex, qr{ (?: $rt_no_auth | ^/+RTIR/+NoAuth/ ) }x);
+
+=item C<$MaxInlineBody>
+
+By default, RT only displays text attachments inline up to
+the first 16k. RTIR will display them no matter how long
+they are.
+
+=cut
 
-# By default, RT only displays text attachments inline up to the first 16k
-# RTIR will display them no matter how long they are
-#
 Set($MaxInlineBody, 0);
 
-# Set the number of days a message awaiting an external response
-# may be inactive before the ticket becomes overdue
+=item C<$OverdueAfter>
+
+Set the number of days a message awaiting an external response
+may be inactive before the ticket becomes overdue
+
+=cut
 
 Set($OverdueAfter, 7);
 
-# This is the string that indicates a reply, and which will be
-# pre-pended to subjects when you reply to tickets.
+=item C<$ReplyString>
+
+This is the string that indicates a reply, and which will be
+pre-pended to subjects when you reply to tickets, for example:
+
+    Set($ReplyString, 'Re:');
+
+=cut
 
-# Set($ReplyString , "Re:");
+Set($ReplyString , '');
 
-# RTIR_OldestRelatedTickets controls how far back, in days, RTIR
-# should look for tickets which might contain a specific string,
-# such as an IP address.
+=item C<$RTIR_OldestRelatedTickets>
+
+Controls how far back, in days, RTIR should look for tickets which
+might contain a specific string, such as an IP address. Sixty
+days by default.
+
+=cut
 
 Set($RTIR_OldestRelatedTickets, 60);
 
-# Default formats for RTIR search results
+=item C<$RTIRSearchResultFormats>
+
+Default formats for RTIR search results
+
+=cut
+
 Set($RTIRSearchResultFormats, {
     Default =>
         q{'<b><a HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
@@ -130,11 +189,21 @@ Set($RTIRSearchResultFormats, {
 
 } );
 
-# Enable this option if you want jump to display screen after saving changes
-# on the edit screen.
+=item C<$DisplayAfterEdit>
+
+Enable this option if you want jump to display screen after saving changes
+on the edit screen.
+
+=cut
+
 Set($DisplayAfterEdit, 1);
 
-# Components that available to add on the first page of the RTIR
+=item C<@RTIR_HomepageComponents>
+
+Components that available to add on the first page of the RTIR.
+
+=cut
+
 Set(@RTIR_HomepageComponents, qw(
     QuickCreate
     Quicksearch
@@ -149,17 +218,35 @@ Set(@RTIR_HomepageComponents, qw(
     RefreshHomepage
 ));
 
-# Define list of enabled MakeClicky extensions; RTIR extends the
-# default 'httpurl', and additionally provides 'ip', 'ipdecimal',
-# 'email', 'domain' and 'RIPE'.  It is possible to add your own types
-# of clicky links using callbacks; see
-# html/Callbacks/RTIR/Elements/MakeClicky/Default for an example.
-# NOTE that list is order-sensetive, when one action matches text
-# other actions don't apply to the same matched text
+=item C<@Active_MakeClicky>
+
+Define list of enabled MakeClicky extensions; RTIR extends the
+default 'httpurl', and additionally provides 'ip', 'ipdecimal',
+'email', 'domain' and 'RIPE'.
+
+It is possible to add your own types of clicky links using callbacks;
+see F<html/Callbacks/RTIR/Elements/MakeClicky/Default> for an example.
+
+B<NOTE> that list is order-sensetive, when one action matches text
+other actions don't apply to the same matched text.
+
+By default RTIR enables 'httpurl_overwrite', 'ip', 'email' and 'domain'.
+
+=cut
+
 Set(@Active_MakeClicky, qw(httpurl_overwrite ip email domain));
 
-# Set the defaults for RTIR custom fields
-# default values are case-sensitive
+=back
+
+=head1 Custom Fields
+
+=over 4
+
+=item C<%RTIR_CustomFieldsDefaults>
+
+Set the defaults for RTIR custom fields. Values are case-sensitive.
+
+=cut
 
 Set(
     %RTIR_CustomFieldsDefaults,
@@ -183,55 +270,102 @@ Set(
     Constituency => 'EDUNET',
 );
 
-# Constituency behaviour
-# read more about constituencies in lib/RT/IR/Constituency.pod
+=item C<$_RTIR_Constituency_Propagation>
+
+Set constituency propagation algorithm. Valid values are 'no',
+'inherit' and 'reject', by default 'no' propagation happens.
+
+Read more about constituencies in F<lib/RT/IR/Constituency.pod>.
+Algorithms are described in 'Changing the value' chapter.
+
+=cut
 
-# Constituency propagation algorithm
-# valid values are 'no', 'inherit', 'reject'
-# Algorithms are defined in lib/RT/IR/Constituency.pod/Changing the value
 Set( $_RTIR_Constituency_Propagation,    'no' );
 
-# if true then Blocks queue functionality inactive and disabled
+=back
+
+=head1 Blocks
+
+=over 4
+
+=item C<$RTIR_DisableBlocksQueue>
+
+If true then Blocks queue functionality inactive and disabled.
+
+=cut
+
 Set($RTIR_DisableBlocksQueue, 0);
 
-# When requestor replies on the block in pending state RTIR
-# changes state, you can set regular expresion so state would
-# be changed only when it matches
+=item C<$RTIR_BlockAproveActionRegexp>
+
+When requestor replies on the block in pending state RTIR
+changes state, you can set regular expresion so state would
+be changed only when content matches the regexp.
+
+=cut
+
 Set($RTIR_BlockAproveActionRegexp, undef);
 
-# Which research tools should RTIR display for address/domain lookups
+=back
+
+=head1 Research Tools
+
+RTIR comes with a few research tools available at F<Tools/Lookup.html>.
+
+=over 4
+
+=item C<@RTIRResearchTools>
+
+Which research tools should RTIR display for address/domain lookups.
+
+For each tool listed in this section, RTIR will attempt to display
+using the following mason components:
+
+    html/RTIR/Tools/Elements/ToolForm____
+    html/RTIR/Tools/Elements/ToolResults____
+
+=cut
 
-# For each tool listed in this section, RTIR will attempt to display
-#   share/html/RTIR/Tools/Elements/ToolForm____
-#       and
-#   share/html/RTIR/Tools/Elements/ToolResults____
-#
-# on the Tools/Lookup.html
 Set( @RTIRResearchTools, (qw(Traceroute Whois Iframe)));
 
-# One of the research tools available in RTIR allows you to
-# configure a set of search URLs that incident handlers
-# can use to open searches in IFRAMES. Entries are keyed
-# by integer in the order you'd like to see them in the dropdown
-# on the research page
-# Each entry consists of a hashref containing "FriendlyName" and "URL"
-# The URLs will be evaluated to replace __SearchTerm__ with the
-# user's current search term.
-
- Set ($RTIRIframeResearchToolConfig, {
-   1 => { FriendlyName => 'Google', URL => 'https://encrypted.google.com/search?q=__SearchTerm__' },
-   2 => { FriendlyName => 'CVE', URL => 'http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=__SearchTerm__'},
+=item C<$RTIRIframeResearchToolConfig>
+
+One of the research tools available in RTIR allows you to
+configure a set of search URLs that incident handlers
+can use to open searches in IFRAMES.
+
+Entries are keyed by integer in the order you'd like to see
+them in the dropdown on the research page. Each entry consists
+of a hashref containing "FriendlyName" and "URL". The URLs will
+be evaluated to replace __SearchTerm__ with the user's current
+search term.
+
+=cut
+
+Set($RTIRIframeResearchToolConfig, {
+    1 => { FriendlyName => 'Google', URL => 'https://encrypted.google.com/search?q=__SearchTerm__' },
+    2 => { FriendlyName => 'CVE', URL => 'http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=__SearchTerm__'},
     3 => { FriendlyName => 'TrustedSource.org', URL => 'http://www.trustedsource.org/query/__SearchTerm__'},
     4 => { FriendlyName => 'McAfee SiteAdvisor', URL => 'http://www.siteadvisor.com/sites/__SearchTerm__'},
     5 => { FriendlyName => 'BFK DNS Logger', URL => 'http://www.bfk.de/bfk_dnslogger.html?query=__SearchTerm__#result'}
-    } );
+} );
+
+=item C<$TracerouteCommand>
+
+Path to traceroute command.
+
+=cut
 
-# path to traceroute command
 Set($TracerouteCommand, '/usr/sbin/traceroute');
 
+=item C<$whois>
+
+Whois servers for the research tool.
+
+Host is of the form "hostname:port"
+
+=cut
 
-# Set the hash of whois servers
-# Host is of the form "hostname:port"
 Set($whois, {
     1 => {
         Host         => "whois.iana.org",
@@ -251,66 +385,79 @@ Set($whois, {
     },
 } );
 
+=back
+
+=head1 Service Level Agreements (SLA)
+
+RTIR comes with very basic SLA implementation. Depending on the following
+options Due date of tickets is maintained.
+
+=over 4
+
+=item C<$SLAModule>
+
+Set the name of the Business::SLA class. Use this if you have
+a custom SLA module, for example:
 
-# Set the name of the Business::SLA class
-# Use this if you have a custom SLA module
-# Set($SLAModule, "Business::MySLA");
+    Set($SLAModule, 'Business::MySLA');
 
-# Set the number of minutes for the SLA
+=cut
+
+Set($SLAModule, '');
+
+=item C<$SLA>
+
+Define service levels and set the number of minutes.
+
+=cut
 
 Set($SLA, {
     'Full service'               => { BusinessMinutes => 60,    RealMinutes => 0 },
     'Full service: out of hours' => { BusinessMinutes => 120,   RealMinutes => 0 },
     'Reduced service'            => { BusinessMinutes => 120,   RealMinutes => 0 },
     'Now (in business hours)'    => { BusinessMinutes => 0,     RealMinutes => 0 },
-#   '60 Real Minutes'            => { BusinessMinutes => undef, RealMinutes => 60 },
+    '60 Real Minutes'            => { BusinessMinutes => undef, RealMinutes => 60 },
 } );
 
-# Set the SLA for responses
+=item C<$BusinessHours>
+
+Set the Business Hours for your organization, for example:
+
+    Set($BusinessHours, {
+        0 => { Name => 'Sunday', Start => undef, End => undef },
+        1 => { Name => 'Monday', Start => '09:00', End => '18:00' },
+        2 => { Name => 'Tuesday', Start => '09:00', End => '18:00' },
+        ...
+    } );
+
+If left unset, defaults are Monday through Friday 09:00 to 18:00
+
+=cut
+
+Set( $BusinessHours, undef );
+
+=item C<$SLA_Response_InHours> and C<$SLA_Response_OutOfHours>
+
+Set service levels for responses in business hours and out,
+correspondingly.
+
+=cut
+
 Set($SLA_Response_InHours,    'Now (in business hours)');
 Set($SLA_Response_OutOfHours, 'Now (in business hours)');
 
-# Set the SLA for re-opened tickets
+=item C<$SLA_Reopen_InHours> and C<$SLA_Reopen_OutOfHours>
+
+Set service levels for tickets re-opened in business hours and out,
+correspondingly.
+
+=cut
+
 Set($SLA_Reopen_InHours,    'Full service');
 Set($SLA_Reopen_OutOfHours, 'Full service: out of hours');
 
-# Set the Business Hours for your organization
-# if left unset, defaults are Monday through Friday 09:00 to 18:00
-
-#Set($BusinessHours, {
-#    0 => { Name => 'Sunday',
-#           Start => undef,
-#           End => undef},
-#
-#    1 => { Name => 'Monday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    2 => { Name => 'Tuesday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    3 => { Name => 'Wednesday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    4 => { Name => 'Thursday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    5 => { Name => 'Friday',
-#           Start => '09:00',
-#           End => '18:00'},
-#
-#    6 => { Name => 'Saturday',
-#           Start => undef,
-#           End => undef},
-#} );
-
-# WebNoAuthRegex - What portion of RT's URLspace should not require
-# authentication. Adjust it according to RTIR paths
+=back
 
-my $rt_no_auth = RT->Config->Get('WebNoAuthRegex');
-Set($WebNoAuthRegex, qr{ (?: $rt_no_auth | ^/+RTIR/+NoAuth/ ) }x);
+=cut
 
 1;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list