[Rt-commit] rt branch, 4.2/scripstage-queue-columnmap-i18n, created. rt-4.2.3-8-g6bb049a

Wallace Reis wreis at bestpractical.com
Fri Feb 28 10:58:02 EST 2014


The branch, 4.2/scripstage-queue-columnmap-i18n has been created
        at  6bb049a7cd0eb7ca1ffe2c519fbcd3c6387b59dc (commit)

- Log -----------------------------------------------------------------
commit 6bb049a7cd0eb7ca1ffe2c519fbcd3c6387b59dc
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Fri Feb 28 12:55:20 2014 -0300

    I#28739: ScripStage leaks internal value
    
    Display Normal and Batch (and with disabled tag) instead of
    TransactionCreate and TransactionBatch in Queue's ColumnMap.

diff --git a/share/html/Elements/RT__Queue/ColumnMap b/share/html/Elements/RT__Queue/ColumnMap
index 7183871..f84b69d 100644
--- a/share/html/Elements/RT__Queue/ColumnMap
+++ b/share/html/Elements/RT__Queue/ColumnMap
@@ -91,7 +91,17 @@ my $COLUMN_MAP = {
             my $sid = $_[-1];
             my $os = RT::ObjectScrip->new( $_[0]->CurrentUser );
             $os->LoadByCols( Scrip => $_[-1], ObjectId => $_[0]->id );
-            return $os->Stage;
+            my $stage_i18n_lookup = {
+	        TransactionCreate => 'Normal',
+	        UseTransactionBatch => 'Batch',
+	        TransactionBatch => 'Batch (disabled by config)',
+	    };
+	    my $stage_prefix = RT->Config->Get('UseTransactionBatch')
+	        ? 'Use'
+		: q{};
+	    my $stage_value = $os->Stage;
+	    return $stage_i18n_lookup->{ $stage_prefix . $stage_value }
+	        || $stage_i18n_lookup->{ $stage_value };
         },
     },
 };

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


More information about the rt-commit mailing list