[Rt-commit] rtir branch, 2.5-trunk, updated. 912cdf8935cb6b24270dbcd8468401e95df873c4

Ruslan Zakirov ruz at bestpractical.com
Fri Nov 13 16:13:53 EST 2009


The branch, 2.5-trunk has been updated
       via  912cdf8935cb6b24270dbcd8468401e95df873c4 (commit)
       via  fbe8a0d96ff161c7ed942ddacf1e8783664db376 (commit)
       via  0b264cbfd413b97fd8fd00c317b53d0d8778ac4f (commit)
       via  eb776cbec4fe9f838160a943527655e4a9398701 (commit)
       via  6227cc1f287568e6608960132e0b9237eff18669 (commit)
      from  5028f663f07ec58479d75ee8ba853b1c9dff536e (commit)

Summary of changes:
 CHANGES                                    |   40 ++++++++++++++++++++++++
 UPGRADING                                  |   45 +++++++++++++++++++++++----
 etc/upgrade/2.5.1/update_saved_searches.pl |   16 ++++++++-
 lib/RT/IR/AdministrationTutorial.pod       |   37 +++++++++++++++++++----
 4 files changed, 123 insertions(+), 15 deletions(-)

- Log -----------------------------------------------------------------
commit 6227cc1f287568e6608960132e0b9237eff18669
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Nov 13 17:58:01 2009 +0300

    * update changelog

diff --git a/CHANGES b/CHANGES
index 3bf4409..640eb75 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,15 @@
+CHANGES IN 2.6.0 SINCE RTIR 2.4.x
+---------------------------------
+
+FEATURES
+========
+
+* INCOMPATIBLE CHANGE: prefix '_RTIR_' has been deleted from
+  all custom fields in RTIR. See UPGRADING for upgrade
+  instructions.
+* almost all default Custom Fields of RTIR now can be
+  disabled or un-applied, except State CF.
+
 CHANGES IN 2.4.2
 ----------------
 

commit eb776cbec4fe9f838160a943527655e4a9398701
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Nov 13 17:58:28 2009 +0300

    cover more custom field changes in upgrade script

diff --git a/etc/upgrade/2.5.1/update_saved_searches.pl b/etc/upgrade/2.5.1/update_saved_searches.pl
index 7cec4a5..19a1635 100644
--- a/etc/upgrade/2.5.1/update_saved_searches.pl
+++ b/etc/upgrade/2.5.1/update_saved_searches.pl
@@ -6,14 +6,26 @@ use RT;
 RT->LoadConfig;
 RT->Init;
 
+my %special_rename = (
+    howreported => 'How Reported',
+    resportertype => 'Reporter Type',
+    whereblocked => 'Where Blocked',
+);
+
 my $saved_searches = RT::Attributes->new($RT::SystemUser);
 $saved_searches->Limit( FIELD => 'Name', VALUE => 'SavedSearch' );
 while ( my $s = $saved_searches->Next ) {
     my $content    = $s->Content;
     my $old_query  = $content->{Query};
     my $old_format = $content->{Format};
-    $content->{Query}  =~ s/(?<=CF\.{)_RTIR_//ig;
-    $content->{Format} =~ s/(?<=CF\.{)_RTIR_//ig;
+    my $special = join '|', keys %special_rename;
+    foreach ( $content->{Query}, $content->{Format} ) {
+        s/(?<=CF\.{)_RTIR_//ig;
+        s/(?<=CustomField\.{)_RTIR_//ig;
+        s/(?<=CF\.{)_RTIR_//ig;
+        s/(?<=CustomField\.{)_RTIR_//ig;
+        s/\b($special)\b/$special_rename{$1}/ige;
+    }
 
     if ( $old_query ne $content->{Query} || $old_format ne $content->{Format} )
     {

commit 0b264cbfd413b97fd8fd00c317b53d0d8778ac4f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Nov 13 17:59:03 2009 +0300

    update UPGRADING documentation

diff --git a/UPGRADING b/UPGRADING
index 797b31d..e78e83e 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -79,15 +79,46 @@ General upgrade instructions
             --datadir etc/upgrade/<version>
 
 Upgrading from 2.4.x and earlier
--------------------------
+--------------------------------
+
+1) _RTIR_ prefix has been deleted from all RTIR's custom fields. What
+   means that you have to update custom code you have: templates,
+   scrips and other customizations which may have name of a custom
+   field hardcoded.
+
+   Custom Fields with multiple words in the name and no spaces have
+   been renamed, now there is space. These custom fields are:
+
+       HowReported  => How Reported
+       ReporterType => Reporter Type
+       WhereBlocked => Where Blocked
+
+   All these changes are implemented in F<etc/upgrade/2.5.1/content>
+   file.
+
+2) Saved searches affected by above change and you can convert them
+   using a script provided.
+
+       perl -I /opt/rt3/local/lib -I/opt/rt3/lib etc/upgrade/2.5.1/update_saved_searches.pl
+
+3) Some templates RTIR comes with contain code to insert values of
+   CFs into emails. This is impossible to change these templates
+   automatically. You have to do it manually. To identify templates
+   and/or confirm that all has been changed you can use the following
+   SQL query:
+
+       SELECT id, Queue FROM Templates WHERE Content LIKE '%_RTIR_%';
+
+   Usually this change is simple as deleting _RTIR_ prefix and adding
+   a space to three names mentioned above.
+
+   Some of your code may still use old names. Make sure to change
+   that. The following command might help you identify places:
 
-_RTIR_ prefix has been deleted from all RTIR's custom fields. What
-means that you have to update custom code you have: templates,
-scrips and other customizations which may have name of a custom
-field hardcoded.
+        find dir/ | xargs grep '_RTIR_'
 
-_RTIR_*_default options in the config has been merged together
-into RTIR_CustomFieldDefaults hash. Change RTIR's site config.
+2) _RTIR_*_default options in the config has been merged together
+into RTIR_CustomFieldDefaults hash. Change site config accordingly.
 
 Upgrading from 2.3.17 and earlier
 -------------------------

commit fbe8a0d96ff161c7ed942ddacf1e8783664db376
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Nov 13 18:03:39 2009 +0300

    update tutorial for administrators

diff --git a/lib/RT/IR/AdministrationTutorial.pod b/lib/RT/IR/AdministrationTutorial.pod
index 2601fd4..a09c20c 100644
--- a/lib/RT/IR/AdministrationTutorial.pod
+++ b/lib/RT/IR/AdministrationTutorial.pod
@@ -8,6 +8,11 @@ You may disable the Blocks by putting the following into your RTIR config:
 
 =head2 Custom Fields
 
+When RTIR is installed several custom fields are created and applied
+to queues in RTIR. Some of these custom fields are important for
+RTIR functionality and can not be renamed, disabled or un-applied,
+but other fields can be.
+
 =over 4
 
 =item State
@@ -15,9 +20,18 @@ You may disable the Blocks by putting the following into your RTIR config:
 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
+The constituency of an incident, IR, investigation, or block.
+
+Additional quite heavy automation is tied to this field. This
+is described in L<Constituencies> doc. Don't rename this field
+if you want to use this functionality. If you don't need this
+feature then name custom field differently.
 
 =item Description
 
@@ -29,7 +43,8 @@ How an Incident was or wasn't resolved
 
 =item SLA
 
-The SLA of an IR
+The SLA of an IR. Due dates are calculated using this custom
+field.
 
 =item Function
 
@@ -37,7 +52,7 @@ Who is handling the Incident
 
 =item Classification
 
-The type of Incident, such as system comproise or denial of service
+The type of Incident, such as system compromise or denial of service
 
 =item HowReported
 
@@ -49,9 +64,14 @@ Who reported the IR, such as the police or another ISP
 
 =item IP
 
-IP addresses related to the incident, IR, investigation, or block
+IP addresses related to the incident, IR, investigation, or block.
+
+Don't rename this custom field or it will loose all magic. It's
+possible to change this CF from multiple values to single value.
 
-L<Tutorial/'IP'>
+End user documentation is in L<Tutorial/'IP'>.
+
+See also L</SetIPFromContent> below.
 
 =item Netmask
 
@@ -260,7 +280,12 @@ L<Templates/BlockRemoved in Blocks queue> Template
 
 Applies to the Incident Reports, Blocks, Incidents and Investigations queues.
 Updates the Ticket Custom Field IP to have a list of all IP and IP Ranges
-found in the body of the ticket during Create and Correspond
+found in the body of the ticket during Create and Correspond.
+
+If configuration of the CF allows only one value then only first IP
+from the content is used.
+
+It's OK to disable this scrip.
 
 =item SetConstituency
 

commit 912cdf8935cb6b24270dbcd8468401e95df873c4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Nov 14 00:06:16 2009 +0300

    update changelog

diff --git a/CHANGES b/CHANGES
index 640eb75..a7c0119 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,11 +4,39 @@ CHANGES IN 2.6.0 SINCE RTIR 2.4.x
 FEATURES
 ========
 
-* INCOMPATIBLE CHANGE: prefix '_RTIR_' has been deleted from
+* INCOMPATIBLE: prefix '_RTIR_' has been deleted from
   all custom fields in RTIR. See UPGRADING for upgrade
   instructions.
+* INCOMPATIBLE: New option %RTIR_CustomFieldDefaults
+  that replaces several $RTIR_*_default options that
+  were there before, don't forget to update config.
 * almost all default Custom Fields of RTIR now can be
-  disabled or un-applied, except State CF.
+  disabled or un-applied. Read more in Administration
+  Tutorial.
+* IP CF can be changed to single value
+* On create with linking (a new child from an incident or a new
+  incident from a child) use default values for custom fields
+  from linked object
+* allow to use any custom field for lookup, not only IP,
+  no UI at the moment, but can be used via arguments of a URL
+  in clicky actions or linked CFs 
+* RTIR's QuickSearch searches by IP in all queues if
+  query is an IP only
+* we have search in any RTIR's queue, so we need default
+  search format, new entry in $RTIRSearchResultFormats
+  config option
+* switched over RT's style for RTIR's query builder
+* RT::IR->OurQueue(...) method
+* RT::IR->CustomFields(...) method
+* refactored test suite for re-use in RTIR's extensions
+* described better Incident input field on Create pages
+
+CALLBACKS
+=========
+
+* 'Init' callback in Create.html acting like /Ticket/Create.html
+* 'AfterRequestors' in several components
+* 'LeftColumnStart' and 'RightColumnStart' in Display.html
 
 CHANGES IN 2.4.2
 ----------------

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


More information about the Rt-commit mailing list