[Rt-commit] rt branch, 4.0/transaction-cf-limit-on-bulk-update, created. rt-4.0.6-253-g3a4ce59

Alex Vandiver alexmv at bestpractical.com
Thu Aug 9 18:31:38 EDT 2012


The branch, 4.0/transaction-cf-limit-on-bulk-update has been created
        at  3a4ce59eabbd89f77f6d48efa38bfbe968b28dc5 (commit)

- Log -----------------------------------------------------------------
commit 3a4ce59eabbd89f77f6d48efa38bfbe968b28dc5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Aug 9 18:26:30 2012 -0400

    Make transaction CFs correctly limited to the correct queues
    
    In 74e6f62, the $queues{...}++ line was moved from above the "next
    unless ..." line to below it.  This changes the meaning of %queues, from
    "the set of queues of the tickets listed" to "the set of queues of
    tickets _changed_."  This causes the transaction CF list to be broader
    than expected in most cases.
    
    Make the transaction CFs limited based on $seen_queues, which is
    computed based on all tickets listed, and remove the no-longer-used
    %queues.

diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index d39c24c..533c191 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -297,7 +297,6 @@ while ( my $ticket = $Tickets->Next ) {
 
 #Iterate through each ticket we've been handed
 my @linkresults;
-my %queues;
 
 $Tickets->RedoSearch();
 
@@ -317,7 +316,6 @@ unless ( $ARGS{'AddMoreAttach'} ) {
 
         #Update the links
         $ARGS{'id'} = $Ticket->id;
-        $queues{ $Ticket->QueueObj->Id }++;
 
         my @updateresults = ProcessUpdateMessage(
                 TicketObj => $Ticket,
@@ -421,7 +419,7 @@ unless ( $ARGS{'AddMoreAttach'} ) {
 
 my $TxnCFs = RT::CustomFields->new( $session{CurrentUser} );
 $TxnCFs->LimitToLookupType( RT::Transaction->CustomFieldLookupType );
-$TxnCFs->LimitToGlobalOrObjectId( sort keys %queues );
+$TxnCFs->LimitToGlobalOrObjectId( keys %$seen_queues );
 
 </%INIT>
 <%args>

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


More information about the Rt-commit mailing list