[Rt-commit] r4527 - in rt/branches/QUEBEC-EXPERIMENTAL: .

alexmv at bestpractical.com alexmv at bestpractical.com
Fri Feb 10 19:10:23 EST 2006


Author: alexmv
Date: Fri Feb 10 19:10:22 2006
New Revision: 4527

Modified:
   rt/branches/QUEBEC-EXPERIMENTAL/   (props changed)
   rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/CreateTickets.pm

Log:
 r9038 at zoq-fot-pik:  chmrr | 2006-02-10 19:09:21 -0500
  * Accept either singular or plural forms of requestor, cc, admincc


Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/CreateTickets.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/CreateTickets.pm	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/CreateTickets.pm	Fri Feb 10 19:10:22 2006
@@ -848,7 +848,7 @@
                         $line  = "Queue: $value";
                     }
                 }
-                if ( $line =~ /^Requestor:(.*)/i ) {
+                if ( $line =~ /^Requestors?:(.*)/i ) {
                     $requestor = 1;
                     my $value = $1;
                     $value =~ s/^\s//;
@@ -916,6 +916,7 @@
             my $original_tag = $1;
             my $tag   = lc($original_tag);
             $tag =~ s/-//g;
+            $tag =~ s/^(requestor|cc|admincc)s?$/$1/i;
 
             $original_tags{$tag} = $original_tag;
 
@@ -937,7 +938,6 @@
                     push @{ $args{'content'} }, $l . "\n";
                 }
             } else {
-
                 # if it's not content, strip leading and trailing spaces
                 if ( $args{$tag} ) {
                     $args{$tag} =~ s/^\s+//g;
@@ -1114,7 +1114,8 @@
                     # Note that we found a queue
                     $queue = 1;
                     $value ||= $args{'Queue'};
-                } elsif ( $field =~ /^Requestor$/i ) {
+                } elsif ( $field =~ /^Requestors?$/i ) {
+                    $field = 'Requestor'; # Remove plural
                     # Note that we found a requestor
                     $requestor = 1;
                     $value ||= $args{'Requestor'};


More information about the Rt-commit mailing list