[Rt-commit] rt branch, 4.0/apply-scrips-to-multiple-queues, updated. rt-4.0.4-150-g30b9062

Ruslan Zakirov ruz at bestpractical.com
Thu Dec 22 19:12:07 EST 2011


The branch, 4.0/apply-scrips-to-multiple-queues has been updated
       via  30b9062ee0adf9c8eccc23a83b02a3f2e5283df4 (commit)
       via  8749967cfdf7265b5452d130dbcf87211dd0de74 (commit)
       via  b5ac73c4541b40866dd26e720406162023a66d4e (commit)
       via  f61188c6d44e6c41d5535a92b3d31bc3000c3bc8 (commit)
       via  7532d9e39a8962549dc7086d23e0367cb800bfa4 (commit)
       via  adf5ccbfa41e17d27094e22e11808f876bbaaaf3 (commit)
       via  9e56dbdf5ac2384fe852763f70e72e7a9152ed1c (commit)
       via  92b67a05eb400abc82d4ba901d85f7d4b4c794b7 (commit)
       via  07e541ea9e033ee0e865146870c7212ced607bae (commit)
       via  c0a66942c9136eb028305bcf04fa4197688bbdda (commit)
       via  925681fb357214c6c25adcc60455af5aa41727d8 (commit)
       via  5f2cb4e648ab82166883e767528ad93aac098e26 (commit)
       via  b2a31ef5f7d49b067e547d9063dcfbcd5e52c649 (commit)
       via  b54a04fda04c9dcce8c29341e0c48fedd02f9ac9 (commit)
       via  d8a40c63c0a781eafbec7b4be0cc129a937f7dd5 (commit)
       via  09a3122dbd65fbac09048b44bcbe630c40a5ddde (commit)
       via  21785d41755ed2284d3cc283fd3e610917207c35 (commit)
       via  21c5bdb68ad37afa15ffd2b722394b85659ab78c (commit)
       via  512bec24c148eaa767fb5178312ae47b75811ad7 (commit)
       via  024a69c56a437cc3f4ff579afdcd176c15dfed6e (commit)
       via  c2694ab96ac86b64710fb7a2a2e505633749ed27 (commit)
      from  32612e65189baeac7f9d1ae5c3a9424d0cbe5176 (commit)

Summary of changes:
 etc/RT_Config.pm.in                        |    2 +-
 etc/schema.Oracle                          |    7 ++-
 etc/schema.Pg                              |    7 ++-
 etc/schema.SQLite                          |    5 +-
 etc/schema.mysql                           |    5 +-
 lib/RT.pm                                  |    2 +-
 lib/RT/CustomField.pm                      |   47 +++++++++---------
 lib/RT/CustomFields.pm                     |    1 -
 lib/RT/ObjectCustomField.pm                |   15 ++++++
 lib/RT/ObjectCustomFields.pm               |   11 ----
 lib/RT/ObjectScrip.pm                      |   26 ++++++++++-
 lib/RT/Record/ApplyAndSort.pm              |   26 +++++++++--
 lib/RT/Scrip.pm                            |   71 +++++++++++++++++-----------
 lib/RT/Scrips.pm                           |   55 ++++++++++++++++-----
 share/html/Admin/Elements/EditScrips       |    5 +-
 share/html/Admin/Elements/ListGlobalScrips |    2 +-
 share/html/Admin/Elements/SelectStage      |    2 -
 share/html/Admin/Queues/Scrips.html        |   15 +-----
 share/html/Elements/RT__Scrip/ColumnMap    |    5 --
 19 files changed, 192 insertions(+), 117 deletions(-)

- Log -----------------------------------------------------------------
commit c2694ab96ac86b64710fb7a2a2e505633749ed27
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Mon Dec 19 20:46:46 2011 +0400

    pass everything in Create
    
    so table can have additional columns except those expected
    by ApplyAndSort

diff --git a/lib/RT/Record/ApplyAndSort.pm b/lib/RT/Record/ApplyAndSort.pm
index 82e5f30..2866103 100644
--- a/lib/RT/Record/ApplyAndSort.pm
+++ b/lib/RT/Record/ApplyAndSort.pm
@@ -48,9 +48,8 @@ sub Create {
     }
 
     return $self->SUPER::Create(
+        %args,
         $tfield   => $target->id,
-        ObjectId  => $args{'ObjectId'},
-        SortOrder => $args{'SortOrder'},
     );
 }
 
@@ -209,6 +208,24 @@ sub DeleteAll {
     $_->Delete foreach @{ $list->ItemsArrayRef };
 }
 
+sub SetDisabledOnAll {
+    my $self = shift;
+    my %args = (@_);
+
+    my $field = $self->TargetField;
+
+    my $id = $args{ $field };
+    $id = $id->id if ref $id;
+    $id ||= $self->TargetObj->id;
+
+    my $list = $self->CollectionClass->new( $self->CurrentUser );
+    $list->Limit( FIELD => $field, VALUE => $id );
+    foreach ( @{ $list->ItemsArrayRef } ) {
+        my ($status, $msg) = $_->SetDisabled( $args{Value} || 0 );
+        return ($status, $msg) unless $status;
+    }
+}
+
 =head2 Sorting scrips applications
 
 scrips sorted on multiple layers. First of all custom

commit 024a69c56a437cc3f4ff579afdcd176c15dfed6e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 01:17:08 2011 +0400

    forgot to change name of the table on c&p

diff --git a/etc/schema.Pg b/etc/schema.Pg
index eb335e6..b57e0bf 100755
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -243,7 +243,7 @@ CREATE TABLE Scrips (
 
 CREATE SEQUENCE objectscrips_id_seq;
 
-CREATE TABLE ObjectCustomFields (
+CREATE TABLE ObjectScrips (
   id INTEGER DEFAULT nextval('objectscrips_id_seq'),
   Scrip integer NOT NULL,
   ObjectId integer NOT NULL,

commit 512bec24c148eaa767fb5178312ae47b75811ad7
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 01:49:50 2011 +0400

    delete mention of a subclass in ApplyAndSort.pm

diff --git a/lib/RT/Record/ApplyAndSort.pm b/lib/RT/Record/ApplyAndSort.pm
index 2866103..8c3d409 100644
--- a/lib/RT/Record/ApplyAndSort.pm
+++ b/lib/RT/Record/ApplyAndSort.pm
@@ -19,7 +19,6 @@ sub TargetField {
 sub Create {
     my $self = shift;
     my %args = (
-        Scrip       => 0,
         ObjectId    => 0,
         SortOrder   => undef,
         @_

commit 21c5bdb68ad37afa15ffd2b722394b85659ab78c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 17:00:52 2011 +0400

    default Disabled to zero
    
    explicit NULL value doesn't trigger DB side default

diff --git a/lib/RT/Record/ApplyAndSort.pm b/lib/RT/Record/ApplyAndSort.pm
index 8c3d409..e8aef93 100644
--- a/lib/RT/Record/ApplyAndSort.pm
+++ b/lib/RT/Record/ApplyAndSort.pm
@@ -45,6 +45,7 @@ sub Create {
             ObjectId => $args{'ObjectId'},
         );
     }
+    $args{'Disabled'} ||= 0;
 
     return $self->SUPER::Create(
         %args,

commit 21785d41755ed2284d3cc283fd3e610917207c35
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 17:02:43 2011 +0400

    report success from SetDisabledOnAll

diff --git a/lib/RT/Record/ApplyAndSort.pm b/lib/RT/Record/ApplyAndSort.pm
index e8aef93..f1f58bc 100644
--- a/lib/RT/Record/ApplyAndSort.pm
+++ b/lib/RT/Record/ApplyAndSort.pm
@@ -224,6 +224,7 @@ sub SetDisabledOnAll {
         my ($status, $msg) = $_->SetDisabled( $args{Value} || 0 );
         return ($status, $msg) unless $status;
     }
+    return (1, $self->loc("Disabled all applications") );
 }
 
 =head2 Sorting scrips applications

commit 09a3122dbd65fbac09048b44bcbe630c40a5ddde
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 17:03:52 2011 +0400

    drop handling of disabled column
    
    we move column into OCFs table and will handle it
    differently

diff --git a/lib/RT/ObjectCustomFields.pm b/lib/RT/ObjectCustomFields.pm
index bdb6511..2466313 100644
--- a/lib/RT/ObjectCustomFields.pm
+++ b/lib/RT/ObjectCustomFields.pm
@@ -103,17 +103,6 @@ sub CustomFields {
     map { $_->CustomFieldObj } @{$self->ItemsArrayRef};
 }
 
-sub _DoSearch {
-    my $self = shift;
-    if ($self->{'_cfs_alias'}) {
-    $self->Limit( ALIAS           => $self->{'_cfs_alias'},
-                 FIELD           => 'Disabled',
-                 OPERATOR        => '!=',
-                 VALUE           =>  1);
-    }
-    $self->SUPER::_DoSearch()
-}
-
 RT::Base->_ImportOverlays();
 
 1;

commit d8a40c63c0a781eafbec7b4be0cc129a937f7dd5
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 17:07:36 2011 +0400

    move Disabled column from things we apply
    
    We move it into Object{CustomField,Scrip}s table, so
    particular application can be disabled in theory and
    disabling doesn't change order when we re-enable.
    
    In first implementation we disable/enable all records
    at once through applied object.

diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index 1f82447..e570a4f 100755
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -156,6 +156,7 @@ CREATE TABLE ObjectScrips (
         Scrip       NUMBER(11,0)  NOT NULL,
         ObjectId              NUMBER(11,0)  NOT NULL,
 	SortOrder	NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Disabled	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Creator		NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Created		DATE,
 	LastUpdatedBy	NUMBER(11,0) DEFAULT 0 NOT NULL,
@@ -331,6 +332,7 @@ CREATE TABLE ObjectCustomFields (
         CustomField       NUMBER(11,0)  NOT NULL,
         ObjectId              NUMBER(11,0)  NOT NULL,
 	SortOrder	NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Disabled	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Creator		NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Created		DATE,
 	LastUpdatedBy	NUMBER(11,0) DEFAULT 0 NOT NULL,
@@ -378,8 +380,7 @@ CREATE TABLE CustomFields (
 	Creator		NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Created		DATE,
 	LastUpdatedBy	NUMBER(11,0) DEFAULT 0 NOT NULL,
-	LastUpdated	DATE,
-	Disabled	NUMBER(11,0) DEFAULT 0 NOT NULL
+	LastUpdated	DATE
 );
 
 
diff --git a/etc/schema.Pg b/etc/schema.Pg
index b57e0bf..79a0158 100755
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -248,6 +248,7 @@ CREATE TABLE ObjectScrips (
   Scrip integer NOT NULL,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
+  Disabled integer NOT NULL DEFAULT 0 ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created TIMESTAMP NULL  ,
@@ -568,7 +569,6 @@ CREATE TABLE CustomFields (
   Created TIMESTAMP NULL  ,
   LastUpdatedBy integer NOT NULL DEFAULT 0  ,
   LastUpdated TIMESTAMP NULL  ,
-  Disabled integer NOT NULL DEFAULT 0 ,
   PRIMARY KEY (id)
 
 );
@@ -584,6 +584,7 @@ CREATE TABLE ObjectCustomFields (
   CustomField integer NOT NULL,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
+  Disabled integer NOT NULL DEFAULT 0 ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created TIMESTAMP NULL  ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index bfb25c3..77b99af 100755
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -166,6 +166,7 @@ CREATE TABLE ObjectScrips (
   Scrip int NOT NULL  ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
+  Disabled int2 NOT NULL DEFAULT 0 ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
@@ -402,7 +403,6 @@ CREATE TABLE CustomFields (
   Created DATETIME NULL  ,
   LastUpdatedBy integer NOT NULL DEFAULT 0  ,
   LastUpdated DATETIME NULL  ,
-  Disabled int2 NOT NULL DEFAULT 0 ,
   PRIMARY KEY (id)
 ) ;
 
@@ -413,6 +413,7 @@ CREATE TABLE ObjectCustomFields (
   CustomField int NOT NULL  ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
+  Disabled int2 NOT NULL DEFAULT 0 ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index db09c23..8465a71 100755
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -156,6 +156,7 @@ CREATE TABLE ObjectScrips (
   Scrip integer NOT NULL  ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
+  Disabled int2 NOT NULL DEFAULT 0 ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
@@ -380,7 +381,6 @@ CREATE TABLE CustomFields (
   Created DATETIME NULL  ,
   LastUpdatedBy integer NOT NULL DEFAULT 0  ,
   LastUpdated DATETIME NULL  ,
-  Disabled int2 NOT NULL DEFAULT 0 ,
   PRIMARY KEY (id)
 ) ENGINE=InnoDB CHARACTER SET utf8;
 
@@ -391,6 +391,7 @@ CREATE TABLE ObjectCustomFields (
   CustomField integer NOT NULL  ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
+  Disabled int2 NOT NULL DEFAULT 0 ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
diff --git a/lib/RT/CustomField.pm b/lib/RT/CustomField.pm
index cad108c..2770f42 100644
--- a/lib/RT/CustomField.pm
+++ b/lib/RT/CustomField.pm
@@ -383,7 +383,6 @@ sub Create {
         BasedOn     => $args{'BasedOn'},
         ValuesClass => $args{'ValuesClass'},
         Description => $args{'Description'},
-        Disabled    => $args{'Disabled'},
         LookupType  => $args{'LookupType'},
         Repeated    => $args{'Repeated'},
     );
@@ -404,6 +403,7 @@ sub Create {
         $OCF->Create(
             CustomField => $self->Id,
             ObjectId => $args{'Queue'},
+            Disabled => $args{'Disabled'},
         );
     }
 
@@ -486,8 +486,10 @@ sub LoadByName {
     # When loading by name, we _can_ load disabled fields, but prefer
     # non-disabled fields.
     $CFs->FindAllRows;
+    my $alias = RT::ObjectCustomFields->new( $self->CurrentUser )
+        ->JoinTargetToThis( $CFs, Left => 1, New => 1 );
     $CFs->OrderByCols(
-        { FIELD => "Disabled", ORDER => 'ASC' },
+        { ALIAS => $alias, FIELD => "Disabled", ORDER => 'ASC' },
     );
 
     # We only want one entry.
@@ -917,6 +919,19 @@ sub _Value {
     return $self->__Value( @_ );
 }
 
+=head2 Disabled
+
+Returns the current value of Disabled. 
+(In the database, Disabled is stored as smallint(6).)
+
+=cut
+
+sub Disabled {
+    my $self = shift;
+    my $record = RT::ObjectCustomField->new( $self->CurrentUser );
+    $record->LoadByCols( CustomField => $self->id );
+    return $record->Disabled;
+}
 
 =head2 SetDisabled
 
@@ -926,6 +941,12 @@ Takes a boolean.
 
 =cut
 
+sub SetDisabled {
+    my $self = shift;
+    return RT::ObjectCustomField->new( $self->CurrentUser )
+        ->SetDisabledOnAll( CustomField => $self->id, Value => shift );
+}
+
 
 =head2 SetTypeComposite
 
@@ -1872,29 +1893,9 @@ Returns the current value of LastUpdatedBy.
 Returns the current value of LastUpdated. 
 (In the database, LastUpdated is stored as datetime.)
 
-
 =cut
 
 
-=head2 Disabled
-
-Returns the current value of Disabled. 
-(In the database, Disabled is stored as smallint(6).)
-
-
-
-=head2 SetDisabled VALUE
-
-
-Set Disabled to VALUE. 
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Disabled will be stored as a smallint(6).)
-
-
-=cut
-
-
-
 sub _CoreAccessible {
     {
      
@@ -1928,8 +1929,6 @@ sub _CoreAccessible {
         {read => 1, auto => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
         LastUpdated => 
         {read => 1, auto => 1, sql_type => 11, length => 0,  is_blob => 0,  is_numeric => 0,  type => 'datetime', default => ''},
-        Disabled => 
-        {read => 1, write => 1, sql_type => 5, length => 6,  is_blob => 0,  is_numeric => 1,  type => 'smallint(6)', default => '0'},
 
  }
 };
diff --git a/lib/RT/CustomFields.pm b/lib/RT/CustomFields.pm
index 665a3f9..185cf8b 100644
--- a/lib/RT/CustomFields.pm
+++ b/lib/RT/CustomFields.pm
@@ -91,7 +91,6 @@ sub _Init {
 	   FIELD => 'id',
 	   ORDER => 'ASC' },
      );
-    $self->{'with_disabled_column'} = 1;
 
     return ( $self->SUPER::_Init(@_) );
 }
diff --git a/lib/RT/ObjectCustomField.pm b/lib/RT/ObjectCustomField.pm
index 55c7a6d..b1f70de 100644
--- a/lib/RT/ObjectCustomField.pm
+++ b/lib/RT/ObjectCustomField.pm
@@ -200,6 +200,8 @@ sub _CoreAccessible {
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
         SortOrder =>
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
+        Disabled => 
+        {read => 1, write => 1, sql_type => 5, length => 6,  is_blob => 0,  is_numeric => 1,  type => 'smallint(6)', default => '0'},
         Creator =>
 		{read => 1, auto => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
         Created =>
diff --git a/lib/RT/ObjectScrip.pm b/lib/RT/ObjectScrip.pm
index 8773f30..32ea544 100644
--- a/lib/RT/ObjectScrip.pm
+++ b/lib/RT/ObjectScrip.pm
@@ -143,6 +143,8 @@ sub _CoreAccessible {
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
         SortOrder =>
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
+        Disabled => 
+        {read => 1, write => 1, sql_type => 5, length => 6,  is_blob => 0,  is_numeric => 1,  type => 'smallint(6)', default => '0'},
         Creator =>
 		{read => 1, auto => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
         Created =>

commit b54a04fda04c9dcce8c29341e0c48fedd02f9ac9
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Dec 20 18:48:12 2011 +0400

    dummy Create methods to pass only things we need

diff --git a/lib/RT/ObjectCustomField.pm b/lib/RT/ObjectCustomField.pm
index b1f70de..47a444c 100644
--- a/lib/RT/ObjectCustomField.pm
+++ b/lib/RT/ObjectCustomField.pm
@@ -64,6 +64,19 @@ sub ObjectCollectionClass {
 
 # XXX: Where is ACL check when we create a record?
 
+sub Create {
+    my $self = shift;
+    my %args = (@_);
+    return $self->SUPER::Create(
+        map { $_ => $args{ $_ } } qw(
+            CustomField ObjectId
+            SortOrder Disabled
+            Created Creator
+            LastUpdated LastUpdatedBy
+        )
+    );
+}
+
 =head2 CustomFieldObj
 
 Returns the CustomField Object which has the id returned by CustomField
diff --git a/lib/RT/ObjectScrip.pm b/lib/RT/ObjectScrip.pm
index 32ea544..ab0cd0d 100644
--- a/lib/RT/ObjectScrip.pm
+++ b/lib/RT/ObjectScrip.pm
@@ -10,6 +10,19 @@ use RT::ObjectScrips;
 sub Table {'ObjectScrips'}
 sub ObjectCollectionClass {'RT::Queues'}
 
+sub Create {
+    my $self = shift;
+    my %args = (@_);
+    return $self->SUPER::Create(
+        map { $_ => $args{ $_ } } qw(
+            Scrip ObjectId
+            SortOrder Disabled
+            Created Creator
+            LastUpdated LastUpdatedBy
+        )
+    );
+}
+
 =head2 ScripObj
 
 Returns the Scrip Object which has the id returned by Scrip

commit b2a31ef5f7d49b067e547d9063dcfbcd5e52c649
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 22 16:04:26 2011 +0400

    sort scrips by sort order, not description

diff --git a/lib/RT/Scrips.pm b/lib/RT/Scrips.pm
index b69e7dc..0ddd1cb 100644
--- a/lib/RT/Scrips.pm
+++ b/lib/RT/Scrips.pm
@@ -439,8 +439,7 @@ sub _FindScrips {
         ENTRYAGGREGATOR => 'OR',
     );
 
-    # Promise some kind of ordering
-    $self->OrderBy( FIELD => 'Description' );
+    $self->ApplySortOrder;
 
     # we call Count below, but later we always do search
     # so just do search and get count from results

commit 5f2cb4e648ab82166883e767528ad93aac098e26
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 22 16:05:14 2011 +0400

    allow to control join via LimitToQueue

diff --git a/lib/RT/Scrips.pm b/lib/RT/Scrips.pm
index 0ddd1cb..18688a2 100644
--- a/lib/RT/Scrips.pm
+++ b/lib/RT/Scrips.pm
@@ -87,15 +87,15 @@ another call to this method
 
 sub LimitToQueue  {
     my $self = shift;
-    my $queue = shift;
-    return unless defined $queue;
+    my %args = @_%2? (Queue => @_) : @_;
+    return unless defined $args{'Queue'};
 
     my $alias = RT::ObjectScrips->new( $self->CurrentUser )
-        ->JoinTargetToThis( $self );
+        ->JoinTargetToThis( $self, %args );
     $self->Limit(
         ALIAS => $alias,
         FIELD => 'ObjectId',
-        VALUE => int $queue,
+        VALUE => int $args{'Queue'},
     );
 }
 

commit 925681fb357214c6c25adcc60455af5aa41727d8
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 22 16:05:43 2011 +0400

    pass through arguments in LimitToGlobal

diff --git a/lib/RT/Scrips.pm b/lib/RT/Scrips.pm
index 18688a2..fad6698 100644
--- a/lib/RT/Scrips.pm
+++ b/lib/RT/Scrips.pm
@@ -111,7 +111,7 @@ another call to this method or LimitToQueue
 
 sub LimitToGlobal  {
     my $self = shift;
-    return $self->LimitToQueue(0);
+    return $self->LimitToQueue(0, @_);
 }
 
 sub LimitToAdded {

commit c0a66942c9136eb028305bcf04fa4197688bbdda
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 22 16:06:28 2011 +0400

    move Stage column into ObjectScrips table

diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index e570a4f..33787a9 100755
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -141,7 +141,6 @@ CREATE TABLE Scrips (
 	CustomIsApplicableCode	CLOB,
 	CustomPrepareCode	CLOB,
 	CustomCommitCode	CLOB,
-	Stage		VARCHAR2(32),
 	Template	NUMBER(11,0) DEFAULT 0 NOT NULL,
   	Creator 	NUMBER(11,0) DEFAULT 0 NOT NULL,
   	Created 	DATE,
@@ -154,6 +153,7 @@ CREATE TABLE ObjectScrips (
 	id		NUMBER(11,0)
                  CONSTRAINT ObjectScrips_Key PRIMARY KEY,
         Scrip       NUMBER(11,0)  NOT NULL,
+	Stage		VARCHAR2(32) DEFAULT 'TransactionCreate' NOT NULL,
         ObjectId              NUMBER(11,0)  NOT NULL,
 	SortOrder	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Disabled	NUMBER(11,0) DEFAULT 0 NOT NULL,
diff --git a/etc/schema.Pg b/etc/schema.Pg
index 79a0158..94d89b2 100755
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -230,7 +230,6 @@ CREATE TABLE Scrips (
   CustomIsApplicableCode text NULL  ,
   CustomPrepareCode text NULL  ,
   CustomCommitCode text NULL  ,
-  Stage varchar(32) NULL  ,
   Template integer NOT NULL DEFAULT 0  ,
   Creator integer NOT NULL DEFAULT 0  ,
   Created TIMESTAMP NULL  ,
@@ -246,6 +245,7 @@ CREATE SEQUENCE objectscrips_id_seq;
 CREATE TABLE ObjectScrips (
   id INTEGER DEFAULT nextval('objectscrips_id_seq'),
   Scrip integer NOT NULL,
+  Stage varchar(32) NOT NULL DEFAULT 'TrasactionCreate' ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
   Disabled integer NOT NULL DEFAULT 0 ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 77b99af..c09d718 100755
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -150,7 +150,6 @@ CREATE TABLE Scrips (
   CustomIsApplicableCode text NULL  ,
   CustomPrepareCode text NULL  ,
   CustomCommitCode text NULL  ,
-  Stage varchar(32) NULL  ,
   Template integer NULL  ,
   Creator integer NULL  ,
   Created DATETIME NULL  ,
@@ -164,6 +163,7 @@ CREATE TABLE Scrips (
 CREATE TABLE ObjectScrips (
   id INTEGER NOT NULL  ,
   Scrip int NOT NULL  ,
+  Stage varchar(32) NOT NULL DEFAULT 'TranslationCreate' ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
   Disabled int2 NOT NULL DEFAULT 0 ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 8465a71..3afef8d 100755
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -142,7 +142,6 @@ CREATE TABLE Scrips (
   CustomIsApplicableCode text NULL  ,
   CustomPrepareCode text NULL  ,
   CustomCommitCode text NULL  ,
-  Stage varchar(32) CHARACTER SET ascii NULL  ,
   Template integer NOT NULL DEFAULT 0  ,
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
@@ -154,6 +153,7 @@ CREATE TABLE Scrips (
 CREATE TABLE ObjectScrips (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   Scrip integer NOT NULL  ,
+  Stage varchar(32) CHARACTER SET ascii NOT NULL DEFAULT 'TranslationCreate',
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
   Disabled int2 NOT NULL DEFAULT 0 ,
diff --git a/lib/RT.pm b/lib/RT.pm
index 5e63a00..f9a9d43 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -463,7 +463,7 @@ sub InitClasses {
     if ( $args{'Heavy'} ) {
         # load scrips' modules
         my $scrips = RT::Scrips->new(RT->SystemUser);
-        $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
+        $scrips->LimitToEnabled;
         while ( my $scrip = $scrips->Next ) {
             local $@;
             eval { $scrip->LoadModules } or
diff --git a/lib/RT/ObjectScrip.pm b/lib/RT/ObjectScrip.pm
index ab0cd0d..58bdb35 100644
--- a/lib/RT/ObjectScrip.pm
+++ b/lib/RT/ObjectScrip.pm
@@ -68,9 +68,16 @@ Set Scrip to VALUE.
 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
 (In the database, Scrip will be stored as a int(11).)
 
+=head2 Stage
 
-=cut
+Returns the current value of Stage.
+(In the database, Stage is stored as varchar(32).)
+
+=head2 SetStage VALUE
 
+Set Stage to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Stage will be stored as a varchar(32).)
 
 =head2 ObjectId
 
@@ -152,6 +159,8 @@ sub _CoreAccessible {
 		{read => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
         Scrip =>
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
+        Stage =>
+		{read => 1, write => 1, sql_type => 12, length => 32,  is_blob => 0,  is_numeric => 0,  type => 'varchar(32)', default => 'TransactionCreate'},
         ObjectId =>
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => ''},
         SortOrder =>
diff --git a/lib/RT/Scrip.pm b/lib/RT/Scrip.pm
index fbca34a..ceda18d 100644
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@ -175,7 +175,6 @@ sub Create {
     my ( $id, $msg ) = $self->SUPER::Create(
         Template               => $template->Id,
         ScripCondition         => $condition->id,
-        Stage                  => $args{'Stage'},
         ScripAction            => $action->Id,
         Description            => $args{'Description'},
         CustomPrepareCode      => $args{'CustomPrepareCode'},
@@ -184,12 +183,20 @@ sub Create {
     );
     return ( $id, $msg ) unless $id;
 
-    unless ( $args{'Stage'} eq 'Disabled' ) {
-        my ($status, $msg) = RT::ObjectScrip->new( $self->CurrentUser )
-            ->Apply( Scrip => $self, ObjectId => $args{'Queue'} );
-        $RT::Logger->error( "Couldn't apply scrip: $msg" ) unless $status;
+    if ( $args{'Stage'} eq 'Disabled' ) {
+        $RT::Logger->warning("Disabled Stage is deprecated");
+        $args{'Stage'} = 'TransactionCreate';
+        $args{'Disabled'} = 1;
     }
 
+    (my $status, $msg) = RT::ObjectScrip->new( $self->CurrentUser )->Apply(
+        Scrip    => $self,
+        Stage    => $args{'Stage'},
+        ObjectId => $args{'Queue'},
+        Disabled => $args{'Disabled'},
+    );
+    $RT::Logger->error( "Couldn't apply scrip: $msg" ) unless $status;
+
     return ( $id, $self->loc('Scrip Created') );
 }
 
@@ -317,7 +324,27 @@ sub TemplateObj {
     return ( $self->{'TemplateObj'} );
 }
 
+=head2 Stage
+
+Takes TicketObj named argument and returns scrip's stage when
+applied to ticket's queue.
+
+=cut
+
+sub Stage {
+    my $self = shift;
+    my %args = ( TicketObj => undef, @_ );
+
+    my $queue = $args{'TicketObj'}->Queue;
+    my $rec = RT::ObjectScrip->new( $self->CurrentUser );
+    $rec->LoadByCols( Scrip => $self->id, ObjectId => $queue );
+    return $rec->Stage if $rec->id;
 
+    $rec->LoadByCols( Scrip => $self->id, ObjectId => 0 );
+    return $rec->Stage if $rec->id;
+
+    return undef;
+}
 
 
 =head2 Apply { TicketObj => undef, TransactionObj => undef}
@@ -404,16 +431,24 @@ sub IsApplicable {
 
 	my @Transactions;
 
-        if ( $self->Stage eq 'TransactionCreate') {
+        my $stage = $self->Stage( TicketObj => $args{'TicketObj'} );
+        unless ( $stage ) {
+	    $RT::Logger->error(
+                "Scrip #". $self->id ." is not applied to"
+                ." queue #". $args{'TicketObj'}->Queue
+            );
+	    return (undef);
+        }
+        elsif ( $stage eq 'TransactionCreate') {
 	    # Only look at our current Transaction
 	    @Transactions = ( $args{'TransactionObj'} );
         }
-        elsif ( $self->Stage eq 'TransactionBatch') {
+        elsif ( $stage eq 'TransactionBatch') {
 	    # Look at all Transactions in this Batch
             @Transactions = @{ $args{'TicketObj'}->TransactionBatch || [] };
         }
 	else {
-	    $RT::Logger->error( "Unknown Scrip stage:" . $self->Stage );
+	    $RT::Logger->error( "Unknown Scrip stage: '$stage'" );
 	    return (undef);
 	}
 	my $ConditionObj = $self->ConditionObj;
@@ -884,24 +919,6 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
 =cut
 
 
-=head2 Stage
-
-Returns the current value of Stage.
-(In the database, Stage is stored as varchar(32).)
-
-
-
-=head2 SetStage VALUE
-
-
-Set Stage to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Stage will be stored as a varchar(32).)
-
-
-=cut
-
-
 =head2 Template
 
 Returns the current value of Template.
@@ -978,8 +995,6 @@ sub _CoreAccessible {
 		{read => 1, write => 1, sql_type => -4, length => 0,  is_blob => 1,  is_numeric => 0,  type => 'text', default => ''},
         CustomCommitCode =>
 		{read => 1, write => 1, sql_type => -4, length => 0,  is_blob => 1,  is_numeric => 0,  type => 'text', default => ''},
-        Stage =>
-		{read => 1, write => 1, sql_type => 12, length => 32,  is_blob => 0,  is_numeric => 0,  type => 'varchar(32)', default => ''},
         Template =>
 		{read => 1, write => 1, sql_type => 4, length => 11,  is_blob => 0,  is_numeric => 1,  type => 'int(11)', default => '0'},
         Creator =>
diff --git a/lib/RT/Scrips.pm b/lib/RT/Scrips.pm
index fad6698..67514f9 100644
--- a/lib/RT/Scrips.pm
+++ b/lib/RT/Scrips.pm
@@ -126,6 +126,39 @@ sub LimitToNotAdded {
         ->LimitTargetToNotApplied( $self => @_ );
 }
 
+sub LimitByStage  {
+    my $self = shift;
+    my %args = @_%2? (Stage => @_) : @_;
+    return unless defined $args{'Stage'};
+
+    my $alias = RT::ObjectScrips->new( $self->CurrentUser )
+        ->JoinTargetToThis( $self, %args );
+    $self->Limit(
+        ALIAS => $alias,
+        FIELD => 'Stage',
+        VALUE => $args{'Stage'},
+    );
+}
+
+=head2 LimitToEnabled
+
+Limits scrips to that are applied to any queue or globally
+and application is not disabled.
+
+=cut
+
+sub LimitToEnabled {
+    my $self = shift;
+
+    my $alias = RT::ObjectScrips->new( $self->CurrentUser )
+        ->JoinTargetToThis( $self );
+    $self->Limit(
+        ALIAS => $alias,
+        FIELD => 'Disabled',
+        VALUE => 0,
+    );
+}
+
 sub ApplySortOrder {
     my $self = shift;
     my $order = shift || 'ASC';
@@ -402,12 +435,9 @@ sub _FindScrips {
                  @_ );
 
 
-    $self->LimitToQueue( $self->{'TicketObj'}->QueueObj->Id )
-      ;    #Limit it to  $Ticket->QueueObj->Id
-    $self->LimitToGlobal();
-      # or to "global"
-
-    $self->Limit( FIELD => "Stage", VALUE => $args{'Stage'} );
+    $self->LimitToQueue( $self->{'TicketObj'}->QueueObj->Id );
+    $self->LimitToGlobal;
+    $self->LimitByStage( $args{'Stage'} );
 
     my $ConditionsAlias = $self->NewAlias('ScripConditions');
 

commit 07e541ea9e033ee0e865146870c7212ced607bae
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 22 16:17:26 2011 +0400

    remove Stage column map

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 83ffaec..edcdadd 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2468,7 +2468,7 @@ Set(%AdminSearchResultFormat,
     Scrips =>
         q{'<a href="__AdminURL__">__id__</a>/TITLE:#'}
         .q{,'<a href="__AdminURL__">__Description__</a>/TITLE:Description'}
-        .q{,__Stage__, __Condition__, __Action__, __Template__},
+        .q{, __Condition__, __Action__, __Template__},
 
     Templates =>
         q{'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__id__</a>/TITLE:#'}
diff --git a/share/html/Elements/RT__Scrip/ColumnMap b/share/html/Elements/RT__Scrip/ColumnMap
index b8d6693..63d23b9 100644
--- a/share/html/Elements/RT__Scrip/ColumnMap
+++ b/share/html/Elements/RT__Scrip/ColumnMap
@@ -93,11 +93,6 @@ my $COLUMN_MAP = {
 	attribute => 'Description',
 	value     => sub { return $_[0]->Description() },
     },
-    Stage => {
-        title     => 'Stage', # loc
-	attribute => 'Stage',
-	value     => sub { return $_[0]->Stage() },
-    },
 
     AdminURL => {
 	value     => sub {

commit 92b67a05eb400abc82d4ba901d85f7d4b4c794b7
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 22 16:19:51 2011 +0400

    no more disabled stage

diff --git a/share/html/Admin/Elements/SelectStage b/share/html/Admin/Elements/SelectStage
index 38a7f18..0d459a0 100644
--- a/share/html/Admin/Elements/SelectStage
+++ b/share/html/Admin/Elements/SelectStage
@@ -66,8 +66,6 @@ my @stages = 'TransactionCreate';
 push @stages, RT->Config->Get('UseTransactionBatch')
             ? 'TransactionBatch'
             : ['TransactionBatch', 'TransactionBatch (DISABLED)'];
-
-push @stages, 'Disabled';
 </%INIT>
 <%ARGS>
 $Default => 'TransactionCreate'

commit 9e56dbdf5ac2384fe852763f70e72e7a9152ed1c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 02:21:13 2011 +0400

    typo, s/TranslationCreate/TransactionCreate/g

diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index c09d718..c9bab8c 100755
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -163,7 +163,7 @@ CREATE TABLE Scrips (
 CREATE TABLE ObjectScrips (
   id INTEGER NOT NULL  ,
   Scrip int NOT NULL  ,
-  Stage varchar(32) NOT NULL DEFAULT 'TranslationCreate' ,
+  Stage varchar(32) NOT NULL DEFAULT 'TransactionCreate' ,
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
   Disabled int2 NOT NULL DEFAULT 0 ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 3afef8d..cf2f96f 100755
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -153,7 +153,7 @@ CREATE TABLE Scrips (
 CREATE TABLE ObjectScrips (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   Scrip integer NOT NULL  ,
-  Stage varchar(32) CHARACTER SET ascii NOT NULL DEFAULT 'TranslationCreate',
+  Stage varchar(32) CHARACTER SET ascii NOT NULL DEFAULT 'TransactionCreate',
   ObjectId integer NOT NULL,
   SortOrder integer NOT NULL DEFAULT 0  ,
   Disabled int2 NOT NULL DEFAULT 0 ,

commit adf5ccbfa41e17d27094e22e11808f876bbaaaf3
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 02:21:58 2011 +0400

    we deleted GlobalScrips search format from the config

diff --git a/share/html/Admin/Elements/ListGlobalScrips b/share/html/Admin/Elements/ListGlobalScrips
index 6545df7..813691c 100755
--- a/share/html/Admin/Elements/ListGlobalScrips
+++ b/share/html/Admin/Elements/ListGlobalScrips
@@ -61,7 +61,7 @@
 % }
 
 <%init>
-my $Format = RT->Config->Get('AdminSearchResultFormat')->{'GlobalScrips'};
+my $Format = RT->Config->Get('AdminSearchResultFormat')->{'Scrips'};
 
 my $Scrips = RT::Scrips->new( $session{'CurrentUser'} );
 $Scrips->LimitToGlobal;

commit 7532d9e39a8962549dc7086d23e0367cb800bfa4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 02:22:45 2011 +0400

    _AppliedTo should check target, not self

diff --git a/lib/RT/Record/ApplyAndSort.pm b/lib/RT/Record/ApplyAndSort.pm
index f1f58bc..367b1b2 100644
--- a/lib/RT/Record/ApplyAndSort.pm
+++ b/lib/RT/Record/ApplyAndSort.pm
@@ -172,7 +172,7 @@ sub _AppliedTo {
         LEFTJOIN => $alias,
         ALIAS    => $alias,
         FIELD    => $field,
-        VALUE    => $self->id,
+        VALUE    => $target->id,
     );
     return ($res, $alias);
 }

commit f61188c6d44e6c41d5535a92b3d31bc3000c3bc8
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 02:23:36 2011 +0400

    use LimitByStage instead of direct Limit
    
    Stage column has been moved to ObjectScrips table

diff --git a/share/html/Admin/Elements/EditScrips b/share/html/Admin/Elements/EditScrips
index 6fdca9b..44e3a72 100755
--- a/share/html/Admin/Elements/EditScrips
+++ b/share/html/Admin/Elements/EditScrips
@@ -106,7 +106,7 @@ if ( $id ) {
 my $find_scrips = sub {
     my %args = (Applied => 1, @_);
     my $scrips = RT::Scrips->new($session{'CurrentUser'});
-    $scrips->Limit( FIELD => 'Stage', VALUE => $args{'Stage'} )
+    $scrips->LimitByStage( $args{'Stage'} )
         if $args{'Stage'};
     my $method = $args{'Applied'}? 'LimitToAdded' : 'LimitToNotAdded';
     $scrips->$method(0, $id);

commit b5ac73c4541b40866dd26e720406162023a66d4e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 02:24:59 2011 +0400

    we don't need separate list of global scrips
    
    global scrips are mixed with global in one list for sorting
    purposes

diff --git a/share/html/Admin/Queues/Scrips.html b/share/html/Admin/Queues/Scrips.html
index d989d3b..31d2675 100755
--- a/share/html/Admin/Queues/Scrips.html
+++ b/share/html/Admin/Queues/Scrips.html
@@ -47,12 +47,6 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
-
-% unless ( $QueueObj->Disabled ) { # Global scrips does not apply to disabled queues
-<h2><&|/l&>Scrips which apply to all queues</&></h2>
-<& /Admin/Elements/ListGlobalScrips &>
-<br />
-% }
 <& /Admin/Elements/EditScrips, title => $title, %ARGS &>
 <%init>
 my $QueueObj = RT::Queue->new($session{'CurrentUser'});

commit 8749967cfdf7265b5452d130dbcf87211dd0de74
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 02:30:35 2011 +0400

    shrink number of lines of code

diff --git a/share/html/Admin/Queues/Scrips.html b/share/html/Admin/Queues/Scrips.html
index 31d2675..71341b1 100755
--- a/share/html/Admin/Queues/Scrips.html
+++ b/share/html/Admin/Queues/Scrips.html
@@ -51,14 +51,9 @@
 <%init>
 my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id);
+Abort(loc("Queue [_1] not found",$id)) unless $QueueObj->id;
 
-my $title;
-
-if ($QueueObj->id) {
-    $title = loc("Modify scrips for queue [_1]", $QueueObj->Name);
-} else {
-    Abort(loc("Queue [_1] not found",$id));
-}
+my $title = loc("Modify scrips for queue [_1]", $QueueObj->Name);
 </%init>
 
 <%ARGS>

commit 30b9062ee0adf9c8eccc23a83b02a3f2e5283df4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Dec 23 04:11:20 2011 +0400

    Move column map needs context

diff --git a/share/html/Admin/Elements/EditScrips b/share/html/Admin/Elements/EditScrips
index 44e3a72..d920dd1 100755
--- a/share/html/Admin/Elements/EditScrips
+++ b/share/html/Admin/Elements/EditScrips
@@ -102,6 +102,7 @@ if ( $id ) {
     $QueueObj->Load( $id );
     Abort(loc("Couldn't load queue #[_1]", $id)) unless $QueueObj->id;
 }
+$id ||= 0;
 
 my $find_scrips = sub {
     my %args = (Applied => 1, @_);
@@ -121,7 +122,7 @@ if ( $id ) {
 } else {
     $DisplayFormat = "__CheckBox.{RemoveScrip}__, $DisplayFormat";
 }
-$DisplayFormat .= ", __Move__";
+$DisplayFormat .= ", __Move.{$id}__";
 
 my %common_applied_args = (
     %ARGS,

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


More information about the Rt-commit mailing list