[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.1-505-g4baa05f

Ruslan Zakirov ruz at bestpractical.com
Fri Oct 14 19:58:23 EDT 2011


The branch, 2.9-trunk has been updated
       via  4baa05f64fb2cccaace17d8ae58639f95e5e4279 (commit)
       via  d6c58f8d0c4c860e5d0c0879bcd7bdbc57f75456 (commit)
       via  5aeabb60678b738454e806e379a3ac83342c3a53 (commit)
       via  7aa03d5df6c8faab55aa36a4555470df12d9ae2e (commit)
       via  e3a039b7853f6c3088fe83fd830b001b90d12bf2 (commit)
      from  0e2892b7f73f644e5e897a04c7a9f967f72782eb (commit)

Summary of changes:
 etc/RTIR_Config.pm                        |    2 +
 lib/RT/Action/RTIR_SetBlockStatus.pm      |   25 +++++-
 lib/RT/Action/RTIR_SetDueIncident.pm      |   16 ++++-
 lib/RT/Condition/RTIR_RequireDueChange.pm |    5 +-
 lib/RT/IR/AdministrationTutorial.pod      |  128 +++++++++--------------------
 5 files changed, 83 insertions(+), 93 deletions(-)

- Log -----------------------------------------------------------------
commit e3a039b7853f6c3088fe83fd830b001b90d12bf2
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Oct 15 03:30:19 2011 +0400

    delete things we don't have

diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index cf7406f..6fcf624 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -15,15 +15,6 @@ but other fields can be.
 
 =over 4
 
-=item State
-
-The various states an incident, IR, investigation, or block can be in, such as
-'open', 'stalled', 'abandoned', etc.
-
-This field represent custom status of tickets and values are different in
-different queues. Critical field for functionality, don't change it.
-Even values can not be changed without consequences.
-
 =item Constituency
 
 The constituency of an incident, IR, investigation, or block.
@@ -41,11 +32,6 @@ Short description of an Incident
 
 How an Incident was or wasn't resolved
 
-=item SLA
-
-The SLA of an IR. Due dates are calculated using this custom
-field.
-
 =item Function
 
 Who is handling the Incident
@@ -147,94 +133,12 @@ this template instead of global.
 
 =over 4
 
-=item DetectUserResponse
-
-Applies to the Incident Reports, Blocks and Investigations queues.
-Sets the Due date based on the SLA_Response_* settings
-if the user sending Correspondence is not a staff member (Duty Team group).
-
-=item DetectStaffResponse
-
-Applies to the Incident Reports, Blocks and Investigations queues.
-Sets the Due date based on the Queue's Default Due or the global OverdueAfter
-configuration using your SLA configuration if the user sending Correspondence 
-is a staff member (Duty Team group).
-
-=item SetStartsDate
-
-Applies to the Incidents Queue.
-On Ticket creation, set the Starts date to now.
-
-=item SetStarts
-
-Applies to the Incident Reports, Blocks and Investigations queues.
-On Ticket creation, set the Starts date to the next instant during Business Hours.
-
-=item SetStartsDateOnQueueChange
-
-In the Incidents Queue, set the Starts date to now when the Queue changes.
-In the Incident Reports, Blocks and Investigations queues, set the Starts
-date to the next instant during Business Hours on a Queue change.
-
-=item SetStarted
-
-In the Block queue: When a Block with Status = 'Active' is created or
-is switched from Pending Activation to Active, set the Started date to now.
-
-In the Incident Reports queue: When a Ticket is created that links to a
-Ticket in the Incidents queue or an existing IR is linked to an Incident,
-set the Started date to now.
-
-=item SetDue
-
-In the Incident Reports queue, Due is set based on the SLA Custom Field 
-during Ticket creation.  SLA is set if needed, based on your Business Hours
-definitions.
-
-In the Investigations and Blocks queues, Due is set to the first instant during
-Business Hours for your Default Due setting, during Ticket creation.
-
-=item SetDueOnQueueChange
-
-In the Incident Reports queue, Due is set based on the SLA Custom Field 
-during Queue Change.  SLA is set if needed, based on your Business Hours
-definitions.
-
-In the Investigations and Blocks queues, Due is set to the first instant during
-Business Hours for your Default Due setting, during Ticket creation.
-
-=item UnsetDue
-
-Applies to the Incident Reports, Blocks and Investigations queues.
-When the Status of a Ticket changes from an Active Status to an Inactive
-Status (see F<RT_Config.pm>) the Due date is unset.
-
-=item SetDueReopen
-
-Applies to the Incident Reports, Blocks and Investigations queues.
-When the Status of a Ticket changes from an Inactive Status to an Active
-Status (see F<RT_Config.pm>) the Due date is set based on your SLA_Reopen
-Config settings.
-
 =item SetHowReported
 
 Applies to the Incident Reports queue.
 On Ticket creation, set the HowReported Custom Field to a default
 value of Email if it wasn't otherwise specified.
 
-=item SetRTIRState
-
-Applies to the Incident Reports, Blocks, Incidents and Investigations queues.
-Sets the State Custom Field based on the current Status
-of the Ticket.  This is triggered on Create, Custom Field change, Status Change,
-Linking of tickets or Queue Change.  Correspondence in the Blocks queue also
-triggers this.
-
-Applies to the Incident Reports, Blocks and Investigations queues.
-If Links between tickets are added or removed, or the Due date is changed,
-the parent Incident ticket has its Due date updated to reflect the Due
-date of the "most due" child ticket.
-
 =item ResolveAllChildren
 
 Applies to the IncidentsQueue.

commit 7aa03d5df6c8faab55aa36a4555470df12d9ae2e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Oct 15 03:31:51 2011 +0400

    better describe SetBlockStatus action

diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index e99a160..cd280fd 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -558,6 +558,8 @@ 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.
 
+See also L<RT::Action::RTIR_SetBlockStatus/DESCRIPTION>.
+
 =cut
 
 Set($RTIR_BlockAproveActionRegexp, undef);
diff --git a/lib/RT/Action/RTIR_SetBlockStatus.pm b/lib/RT/Action/RTIR_SetBlockStatus.pm
index ae95b4a..e097680 100644
--- a/lib/RT/Action/RTIR_SetBlockStatus.pm
+++ b/lib/RT/Action/RTIR_SetBlockStatus.pm
@@ -50,9 +50,30 @@ use warnings;
 package RT::Action::RTIR_SetBlockStatus;
 use base 'RT::Action::RTIR';
 
+=head1 NAME
+
+RT::Action::RTIR_SetBlockStatus - sets status of the block acording to a few rules
+
+=head1 DESCRIPTION
+
+If transaction is inbound and status is pending then
+change it to corresponding not pending status. This
+rule can be protected with C<$RTIR_BlockAproveActionRegexp>
+option. Content of the transaction should match the regexp
+if it's defined. Statuses are hardcoded and can not be
+changed or this will not work properly.
+
+If block is in an inactive status (by default 'removed')
+then status changed to first possible active status
+for blocks' lifecycle (by default 'active').
+
+In all other cases status left unchanged.
+
+=head1
+
 =head2 Commit
 
-Set the state according to the status.
+Applies rules described above in L</DESCRIPTION> section.
 
 =cut
 
@@ -79,7 +100,7 @@ sub Commit {
             $new = 'removed';
         }
     }
-    
+
     if ( !$new && $t->QueueObj->Lifecycle->IsInactive( $current ) ) {
         $new = $t->FirstActiveStatus;
     }
diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index 6fcf624..ed6a138 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -139,6 +139,18 @@ Applies to the Incident Reports queue.
 On Ticket creation, set the HowReported Custom Field to a default
 value of Email if it wasn't otherwise specified.
 
+=item On Correspond Change Status of the Block
+
+On replies changes status of blocks according to a few rules
+that are described in L<RT::Action::RTIR_SetBlockStatus/DESCRIPTION>.
+
+RT's default L<RT::Action::AutoOpen> is disabled for blocks to
+avoid unwanted changes of status from 'pending activation'
+to 'active'.
+
+As well, take a look at C<$RTIR_BlockAproveActionRegexp> option
+in the config.
+
 =item ResolveAllChildren
 
 Applies to the IncidentsQueue.

commit 5aeabb60678b738454e806e379a3ac83342c3a53
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Oct 15 03:43:29 2011 +0400

    describe status field with refs in admin tutorial

diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index ed6a138..c30713b 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -6,6 +6,18 @@ You may disable the Blocks by putting the following into your RTIR config:
 
     Set($RTIR_DisableBlocksQueue, 1);
 
+=head2 Status
+
+The various states an incident, IR, investigation, or block can be in, such as
+'open', 'stalled', 'abandoned', etc.
+
+This field represent custom status of tickets and values are different in
+different queues. Controlled with C<%Lifecycles> option in the config.
+Critical field for functionality.
+
+Read description in the F<RTIR_Config.pm> and description of L</Scrips>
+below.
+
 =head2 Custom Fields
 
 When RTIR is installed several custom fields are created and applied

commit d6c58f8d0c4c860e5d0c0879bcd7bdbc57f75456
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Oct 15 03:44:18 2011 +0400

    describe custom IR's auto open logic in admin tutorial

diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index c30713b..74dc8e7 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -163,6 +163,20 @@ to 'active'.
 As well, take a look at C<$RTIR_BlockAproveActionRegexp> option
 in the config.
 
+=item On Linking To Incident Activate Report
+
+=item On Correspond (not every) Activate Report
+
+IRs are activated (status changed to first possible active,
+by default 'open') only when they are linked to an incident.
+These two scrips take care of that.
+
+RT's default L<RT::Action::AutoOpen> is disabled for IRs to avoid
+unwanted changes of status when IR is not linked. When an IR is
+linked to an Incident, L<RT::Condition::RTIR_RequireReportActivation>
+checks everything what RT's AutoOpen checks and scrip behaves in
+the same way.
+
 =item ResolveAllChildren
 
 Applies to the IncidentsQueue.

commit 4baa05f64fb2cccaace17d8ae58639f95e5e4279
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Oct 15 03:57:57 2011 +0400

    describe "Set Due Date On Incident" scrip

diff --git a/lib/RT/Action/RTIR_SetDueIncident.pm b/lib/RT/Action/RTIR_SetDueIncident.pm
index c044ea8..5567dea 100644
--- a/lib/RT/Action/RTIR_SetDueIncident.pm
+++ b/lib/RT/Action/RTIR_SetDueIncident.pm
@@ -50,10 +50,24 @@ use warnings;
 package RT::Action::RTIR_SetDueIncident;
 use base 'RT::Action::RTIR';
 
+=head1 NAME
+
+RT::Action::RTIR_SetDueIncident - set the Due date based on the most due child
+
+=head1 DESCRIPTION
+
+Set the Due date based on the most due child. Only takes into
+account active children.
+
+Can be applied not only to Incidents queue, but to children's
+as well. In the latter case all incidents the current ticket
+is linked to are updated.
+
+=head1 METHODS
 
 =head2 Commit
 
-Set the Due date based on the most due child.
+Performs update.
 
 =cut
 
diff --git a/lib/RT/Condition/RTIR_RequireDueChange.pm b/lib/RT/Condition/RTIR_RequireDueChange.pm
index 2dbe80e..28d7aee 100644
--- a/lib/RT/Condition/RTIR_RequireDueChange.pm
+++ b/lib/RT/Condition/RTIR_RequireDueChange.pm
@@ -52,7 +52,10 @@ use base 'RT::Condition::RTIR';
 
 =head2 IsApplicable
 
-If a child had a Due Date change or changes parents.
+Fires scrip if this ticket had a Due date change,
+changes parents or was inactivated.
+
+See also L<RT::Action::RTIR_SetDueIncident>.
 
 =cut
 
diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index 74dc8e7..d0766cc 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -177,6 +177,14 @@ linked to an Incident, L<RT::Condition::RTIR_RequireReportActivation>
 checks everything what RT's AutoOpen checks and scrip behaves in
 the same way.
 
+=item Set Due Date On Incident
+
+Keeps Due date of incidents in sync with the most due child.
+
+See L</Service Level Agreements> below for details on automating
+Due dates and L<RT::Action::RTIR_SetDueIncident> for details
+about action of the scrip.
+
 =item ResolveAllChildren
 
 Applies to the IncidentsQueue.

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


More information about the Rt-commit mailing list