[Rt-commit] [svn] r1947 - in rtir/branches/1.1-TESTING: . html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap html/RTIR html/RTIR/Elements html/RTIR/Incident html/RTIR/Search/Elements html/RTIR/Tools lib/RT/Action

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Sun Nov 28 23:25:17 EST 2004


Author: jesse
Date: Sun Nov 28 23:25:14 2004
New Revision: 1947

Added:
   rtir/branches/1.1-TESTING/Makefile.PL
Removed:
   rtir/branches/1.1-TESTING/Makefile
Modified:
   rtir/branches/1.1-TESTING/README
   rtir/branches/1.1-TESTING/UPGRADING
   rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap
   rtir/branches/1.1-TESTING/html/RTIR/Create.html
   rtir/branches/1.1-TESTING/html/RTIR/Elements/DueIncidents
   rtir/branches/1.1-TESTING/html/RTIR/Elements/EditRTIRField
   rtir/branches/1.1-TESTING/html/RTIR/Incident/Create.html
   rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/PickCFs
   rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults
   rtir/branches/1.1-TESTING/html/RTIR/Tools/ScriptedAction.html
   rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm
Log:
Several bugfixes. And compatibility with RT 3.4, RT 3.2.3

Added: rtir/branches/1.1-TESTING/Makefile.PL
==============================================================================
--- (empty file)
+++ rtir/branches/1.1-TESTING/Makefile.PL	Sun Nov 28 23:25:14 2004
@@ -0,0 +1,8 @@
+use inc::Module::Install;
+
+
+RTx('RT-IR');
+license('GPL Version 2');
+author('Best Practical Solutions <sales at bestpractical.com>');
+version('1.1.4');
+&WriteAll;

Modified: rtir/branches/1.1-TESTING/README
==============================================================================
--- rtir/branches/1.1-TESTING/README	(original)
+++ rtir/branches/1.1-TESTING/README	Sun Nov 28 23:25:14 2004
@@ -84,22 +84,11 @@
    appear to be working properly, cd to the directory into which you
    unpacked RTIR into.
 
-2) Edit RTIR's Makefile to point to the location of perl on your system:
+2) Run "perl Makefile.PL" to generate a makefile for RTIR. 
 
-PERL                    =       /usr/bin/perl
+3) Type "make install".
 
-2) Edit RTIR's Makefile to point to your RT 3.2 instance:
-
-RT_ROOT			=	/opt/rt3
-
-3) Make any other necessary changes to the Makefile (if you used RT's
-default configuration, you shouldn't need to make any).
-
-4) make sure that mysql or pgsql's commandline tool is in your path.
-
-5) Type "make install".
-
-6) Add the following lines to your /opt/rt3/etc/RT_SiteConfig.pm file:
+4) Add the following lines to your /opt/rt3/etc/RT_SiteConfig.pm file:
 
    # The RTIR config file
 
@@ -108,13 +97,13 @@
    require $RTIR_CONFIG_FILE
      || die ("Couldn't load RTIR config file '$RTIR_CONFIG_FILE'\n$@");
 
-7) If you are installing RTIR for the first time, initialize the RTIR
+5) If you are installing RTIR for the first time, initialize the RTIR
    database by typing "make initdb".
 
    WARNING: Do not attempt to re-initialize the database if you are
    upgrading.
 
-8) Stop and start your web server.  
+6) Stop and start your web server.  
 
 
 

Modified: rtir/branches/1.1-TESTING/UPGRADING
==============================================================================
--- rtir/branches/1.1-TESTING/UPGRADING	(original)
+++ rtir/branches/1.1-TESTING/UPGRADING	Sun Nov 28 23:25:14 2004
@@ -1,38 +1,34 @@
+General upgrade instructions
+============================
 
+1) Follow specialized upgrade instructions in the sections below
 
+2) Install the new version of RTIR. (DO NOT RUN "make initdb")
 
+3) Update RTIR's database.
+    
+   Type:
 
-WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
-
-UPGRADE RTIR 1.0.x TO RTIR 1.1.x BETA IS NOT YET SUPPORTED.
-
-We're still working to bullet-proof the RTIR beta process and will release
-a second beta as soon as we're confident that we've got a procedure that
-works well for folks.  We _will_ support upgrade from RTIR 1.0.x to RTIR
-1.2.final. 
-
-WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
-
-
-
-
+        ls etc/upgrade
 
+    For each item in that directory whose name is greater than
+    your previously installed RT version, run:
+    
+        /opt/rt3/sbin/rt-setup-database --dba <dba> \
+            --prompt-for-dba-password --action insert \
+            --datadir etc/upgrade/<version>
 
 
 
 
+Upgrading from RTIR 1.13
+========================
 
 
 NOTE: Follow instructions from previous "upgrading from" sections at
 the end of this document if they apply to your installation, then
 follow the instructions below.
 
-Then, proceed with the installation instructions in the README.  Do
-not re-initialize the database.
-
-After you have followed the installation instructions in the
-README, you must do the following:
-
 1) Delete the following Scrips (go to Configuration / Queues / <Queue
 Name> / Scrips):
 
@@ -78,13 +74,12 @@
 
 2) Run the etc/upgrade/upgrade.pl script.
 
-3) Then, type "make upgrade" and follow the instructions.
 
 Upgrading from RTIR 1.1.2:
 --------------------------
 
-Delete the "SetDueReopen" scrip from the Incident Reports,
-Investigations, and Blocks queues.
+1) Delete the "SetDueReopen" scrip from the Incident Reports,
+   Investigations, and Blocks queues.
 
 Upgrading from RTIR 1.0.0:
 --------------------------
@@ -99,6 +94,3 @@
 
    rm -r /opt/rt3/local/html/RTIR
 
-3) Install RTIR by following the instructions below.
-
-

Modified: rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap
==============================================================================
--- rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap	(original)
+++ rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap	Sun Nov 28 23:25:14 2004
@@ -5,7 +5,7 @@
 $check = $args{'RTIRCheck'} if $args{'RTIRCheck'};
 
     $COLUMN_MAP->{'_RTIR_Check'} = {
-        title     => '&nbsp;',
+        title     => \'&nbsp;',
 	value => sub {
 	    my $selected = '';
 	    if ($check eq 'All') {
@@ -21,7 +21,7 @@
 		    }
 		}
 	    }
-	    return '<input type="checkbox" name="UpdateTicket' . $_[0]->id . '" ' . $selected . '>' },
+	    return \'<input type="checkbox" name="UpdateTicket' . $_[0]->id . '" ' . $selected . \'>' },
     };
 
     $COLUMN_MAP->{'_RTIR_Radio'} = {
@@ -31,7 +31,7 @@
 	    if ($_[0]->id == $check) {
 		$selected = 'CHECKED';
 	    }
-	    return '<input type="radio" name="SelectedTicket" value="' . $_[0]->id . '" ' . $selected . '>' },
+	    return \'<input type="radio" name="SelectedTicket" value="' . $_[0]->id . '" ' . $selected . \'>' },
     };
 </%INIT>
 

Modified: rtir/branches/1.1-TESTING/html/RTIR/Create.html
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Create.html	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Create.html	Sun Nov 28 23:25:14 2004
@@ -425,7 +425,7 @@
     $m->comp('Display.html', %ARGS);
     $m->abort();
   } else {
-    push @results, "Investigation launch failed: You must enter a correspondent.";
+    push @results, loc( "Investigation launch failed: You must enter a correspondent.");
   }
 }
 

Modified: rtir/branches/1.1-TESTING/html/RTIR/Elements/DueIncidents
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Elements/DueIncidents	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Elements/DueIncidents	Sun Nov 28 23:25:14 2004
@@ -49,10 +49,10 @@
 
 my $title;
 if ($owner) {
-  $title = loc("Most due incidents owned by [_1] (and unowned)...", 
+  $title = loc("Most due incidents owned by [_1] (and unowned)", 
               $owner->Name);
 } else {
-  $title = loc("Most due incidents...");
+  $title = loc("Most due incidents");
 }
 </%INIT>
 

Modified: rtir/branches/1.1-TESTING/html/RTIR/Elements/EditRTIRField
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Elements/EditRTIRField	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Elements/EditRTIRField	Sun Nov 28 23:25:14 2004
@@ -22,11 +22,11 @@
 %# 
 %# 
 %# END LICENSE BLOCK
-% if (defined $cf) {
+% if ($cf->id) {
 % if ($cf->Type eq 'FreeformSingle') {
-<input type=hidden name=<%$Name%> value=<%$NamePrefix%><%$cf->id%>-Value> 
+<input type="hidden" name="<%$Name%>" value="<%$NamePrefix%><%$cf->id%>-Value"> 
 % } else {
-<input type=hidden name=<%$Name%> value=<%$NamePrefix%><%$cf->id%>-Values>
+<input type="hidden" name="<%$Name%>" value="<%$NamePrefix%><%$cf->id%>-Values">
 % }
 <& /Ticket/Elements/EditCustomField, TicketObj => $TicketObj, 
     CustomField => $cf, 

Modified: rtir/branches/1.1-TESTING/html/RTIR/Incident/Create.html
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Incident/Create.html	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Incident/Create.html	Sun Nov 28 23:25:14 2004
@@ -226,12 +226,13 @@
 
 my @results;
 if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket?
-  if ($ARGS{'Function'} and $ARGS{$ARGS{'Function'}}) {
+#  if ($ARGS{'Function'} and $ARGS{$ARGS{'Function'}}) {
+# commented out because the implementation was not forward compatible with 3.4
     $m->comp('Display.html', %ARGS);
-    $m->abort();
-  } else {
-    push @results, "Incident creation failed: Function must be set.";
-  }
+  return();
+#  } else {
+#    push @results, loc("Incident creation failed: Function must be set.");
+#  }
 }
 </%INIT>
 

Modified: rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/PickCFs
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/PickCFs	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/PickCFs	Sun Nov 28 23:25:14 2004
@@ -49,7 +49,7 @@
 <tr><td class=label>
 
 % my $name;
-% if ($CustomField->QueueObj->id) {
+% if ($CustomField->QueueObj && $CustomField->QueueObj->id) {
 %   $name = "'CF." . $CustomField->QueueObj->Name . 
 %	".{" . $CustomField->Name . "}'";
 % } else {

Modified: rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults	Sun Nov 28 23:25:14 2004
@@ -8,17 +8,22 @@
     Page => $Page,
     Format => $Format,
     BaseURL => $BaseURL,
+    ShowNavigation => 0
    &>
 
-<div align=right>
+<div align="right">
 
 % if ($Queue eq 'Incident Reports') {
 %# this would do well as a Callback
 <a href="<%$RT::WebPath%>/RTIR/Report/BulkReject.html?Queue=<%$Queue%><%$QueryString%>"><&|/l&>Bulk Reject</&></a><br>
 % }
+
+%if (0) {
 <a href="<%$BaseURL%>Queue=<%$Queue%><%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br>
 <a href="<%$RT::WebPath%>/Search/Results.tsv?Queue=<%$Queue%><%$QueryString%>"><&|/l&>spreadsheet</&></a> |
 <a href="<%$RT::WebPath%>/Search/Results.rdf?Queue=<%$Queue%><%$QueryString%>"><&|/l&>RSS</&></a> |
+
+% }
 </div>
 
 <%INIT>

Modified: rtir/branches/1.1-TESTING/html/RTIR/Tools/ScriptedAction.html
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Tools/ScriptedAction.html	(original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Tools/ScriptedAction.html	Sun Nov 28 23:25:14 2004
@@ -306,9 +306,10 @@
 
 if ( exists $ARGS{SubmitAction} ) {
 
-if (!$Incident && (!$ARGS{'Function'} || !$ARGS{$ARGS{'Function'}})) {
-    push @finalresults, "Incident creation failed: Function must be set.";
-} else {
+# Commented out. not forward compatible with 3.4
+#if (!$Incident && (!$ARGS{'Function'} || !$ARGS{$ARGS{'Function'}})) {
+#    push @finalresults, "Incident creation failed: Function must be set.";
+#} else {
 
 foreach my $key (keys %$addrhash) {
   my $addr = $addrhash->{$key}->{'Address'};
@@ -456,7 +457,7 @@
   delete $session{'Attachments'};
   }
 }
-}
+# }
 }
 
 sub parse_csv {

Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm	(original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm	Sun Nov 28 23:25:14 2004
@@ -89,7 +89,7 @@
 	my $SLAObj = RT::IR::SLAInit();
 	my $sla = $SLAObj->SLA(time());
 
-	$self->AddCustomFieldValue(Field => $cf->id, 
+	$self->TicketObj->AddCustomFieldValue(Field => $cf->id, 
 				   Value => $sla);
 
     }


More information about the Rt-commit mailing list