[Rt-commit] [svn] r1343 - in rt/branches/3.2-RELEASE: html/Search lib/RT

huberth at pallas.eruditorum.org huberth at pallas.eruditorum.org
Tue Aug 17 22:23:43 EDT 2004


Author: huberth
Date: Tue Aug 17 22:23:42 2004
New Revision: 1343

Modified:
   rt/branches/3.2-RELEASE/html/Search/Bulk.html
   rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm
Log:
 * Made bulk editing of custom fields slightly more efficient and 
   simultaneously cleaned up some of its code.
 * Also added a little bit of docs for RT::Ticket::Create() - Priority
   is a valid arg also.


Modified: rt/branches/3.2-RELEASE/html/Search/Bulk.html
==============================================================================
--- rt/branches/3.2-RELEASE/html/Search/Bulk.html	(original)
+++ rt/branches/3.2-RELEASE/html/Search/Bulk.html	Tue Aug 17 22:23:42 2004
@@ -167,9 +167,7 @@
 %     if ($cf->Queue == 0) {
 %         $pref = "[Global]";
 %     } else {
-%         my $queue = RT::Queue->new($session{'CurrentUser'});
-%         $queue->Load($cf->Queue);
-%         $pref = "[Queue: " . $queue->Name . "]";
+%         $pref = "[Queue: " . $cfqnames{$_} . "]";
 %     }
 <%$pref%> <b><% $cf->Name %></b><br>
 <% $cf->FriendlyType %>
@@ -215,17 +213,20 @@
 Abort(loc("No search to operate on.")) unless ($Tickets);
 
 my %allcfs;
+my %cfqnames;
 my %cfqs;
 my $count = 0;
 while (my $Ticket = $Tickets->Next) {
     my $cfq = $Ticket->QueueObj;
+    my $cfqid = $cfq->Id;
     my $cfqn = $cfq->Name;
-    if (!$cfqs{$cfqn}) {
-	$cfqs{$cfqn} = 1;
+    unless ( exists $cfqs{$cfqid} ) {
+	$cfqs{$cfqid} = 1;
 	$count++;
 	my $cfs = $cfq->CustomFields;
 	while (my $cf = $cfs->Next) {
 	    $allcfs{$cf->Id} = $cf;
+	    $cfqnames{$cf->Id} = $cfqn;
 	}
     }
 }

Modified: rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm	Tue Aug 17 22:23:42 2004
@@ -305,6 +305,7 @@
   Type -- The ticket\'s type. ignore this for now
   Owner -- This ticket\'s owner. either an RT::User object or this user\'s id
   Subject -- A string describing the subject of the ticket
+  Priority -- an integer from 0 to 99
   InitialPriority -- an integer from 0 to 99
   FinalPriority -- an integer from 0 to 99
   Status -- any valid status (Defined in RT::Queue)


More information about the Rt-commit mailing list