[Rt-commit] r19486 - in rt/3.999/branches/config-in-db: . lib/RT lib/RT/Interface lib/RT/Model lib/RT/Test lib/RT/View lib/RT/View/Admin share/html/Admin/Elements share/html/Admin/Users share/html/Elements share/html/Ticket/Elements share/web/static/css t t/api t/approval t/lorzy t/mail t/ticket

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed May 6 22:23:46 EDT 2009


Author: sunnavy
Date: Wed May  6 22:23:46 2009
New Revision: 19486

Added:
   rt/3.999/branches/config-in-db/lib/RT/View/Admin/Rules.pm
   rt/3.999/branches/config-in-db/share/html/Admin/Elements/RuleTabs
Removed:
   rt/3.999/branches/config-in-db/share/html/Elements/Login
Modified:
   rt/3.999/branches/config-in-db/   (props changed)
   rt/3.999/branches/config-in-db/lib/RT/Collection.pm
   rt/3.999/branches/config-in-db/lib/RT/DateTime.pm
   rt/3.999/branches/config-in-db/lib/RT/Interface/Web.pm
   rt/3.999/branches/config-in-db/lib/RT/Model/Rule.pm
   rt/3.999/branches/config-in-db/lib/RT/Model/Ticket.pm
   rt/3.999/branches/config-in-db/lib/RT/Rule.pm
   rt/3.999/branches/config-in-db/lib/RT/Test.pm
   rt/3.999/branches/config-in-db/lib/RT/Test/Shredder.pm
   rt/3.999/branches/config-in-db/lib/RT/View.pm
   rt/3.999/branches/config-in-db/lib/RT/View/Admin.pm
   rt/3.999/branches/config-in-db/lib/RT/View/CRUD.pm
   rt/3.999/branches/config-in-db/share/html/Admin/Elements/Tabs
   rt/3.999/branches/config-in-db/share/html/Admin/Users/Modify.html
   rt/3.999/branches/config-in-db/share/html/Elements/Header
   rt/3.999/branches/config-in-db/share/html/Elements/PageLayout
   rt/3.999/branches/config-in-db/share/html/SelfService/Display.html
   rt/3.999/branches/config-in-db/share/html/Ticket/Elements/ShowTransaction
   rt/3.999/branches/config-in-db/share/web/static/css/layout.css
   rt/3.999/branches/config-in-db/share/web/static/css/nav.css
   rt/3.999/branches/config-in-db/share/web/static/css/ticket-search.css
   rt/3.999/branches/config-in-db/share/web/static/css/ticket.css
   rt/3.999/branches/config-in-db/t/api/cf_pattern.t
   rt/3.999/branches/config-in-db/t/api/reminders.t
   rt/3.999/branches/config-in-db/t/approval/basic.t
   rt/3.999/branches/config-in-db/t/lorzy/action.t
   rt/3.999/branches/config-in-db/t/mail/crypt-gnupg.t
   rt/3.999/branches/config-in-db/t/mail/gnupg-incoming.t
   rt/3.999/branches/config-in-db/t/mail/sendmail.t
   rt/3.999/branches/config-in-db/t/savedsearch.t
   rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-multiple.t
   rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-single.t
   rt/3.999/branches/config-in-db/t/ticket/search_by_links.t
   rt/3.999/branches/config-in-db/t/ticket/search_by_watcher.t
   rt/3.999/branches/config-in-db/t/ticket/sort-by-queue.t
   rt/3.999/branches/config-in-db/t/ticket/sort-by-user.t
   rt/3.999/branches/config-in-db/t/ticket/sort_by_cf.t

Log:
 r20904 at sunnavys-mb (orig r19351):  jesse | 2009-04-28 01:23:34 +0800
 Moved page body wrapper around so we get styled errors
 r20922 at sunnavys-mb (orig r19369):  clkao | 2009-04-29 21:13:25 +0800
 add admin/rules crud page.
 r20971 at sunnavys-mb (orig r19418):  sartak | 2009-05-05 03:14:11 +0800
 Fix transaction action styling
 
 r20972 at sunnavys-mb (orig r19419):  sartak | 2009-05-05 03:30:58 +0800
 More transaction header style fixes
 
 r20974 at sunnavys-mb (orig r19421):  sartak | 2009-05-05 04:03:17 +0800
 Ticket subjects have a display length of 50, not 200
 
 r20975 at sunnavys-mb (orig r19422):  sartak | 2009-05-05 04:07:35 +0800
 Use hints for time fields' "in minutes"
 
 r20977 at sunnavys-mb (orig r19424):  sartak | 2009-05-05 04:35:17 +0800
 Tidy ticket columns
 r20978 at sunnavys-mb (orig r19425):  sartak | 2009-05-05 04:40:19 +0800
 Fix ShowEmailRecord URL parameters
 r20981 at sunnavys-mb (orig r19428):  sartak | 2009-05-05 04:56:26 +0800
 Tidy Admin/Users/Modify
 r20982 at sunnavys-mb (orig r19429):  sartak | 2009-05-05 05:01:39 +0800
 Fix admin/users/modify for modifying (not creating) users
 r20984 at sunnavys-mb (orig r19431):  sartak | 2009-05-05 07:09:42 +0800
 Compare owner_id instead of owner object for avoiding spurious update
 warnings
 r20985 at sunnavys-mb (orig r19432):  sartak | 2009-05-05 07:29:23 +0800
 Remove inline editing from admin CRUD
 r20986 at sunnavys-mb (orig r19433):  sartak | 2009-05-05 07:32:37 +0800
 Actually, it's unlikely that we'll need inline edit for any RT CRUD
 r20995 at sunnavys-mb (orig r19442):  sunnavy | 2009-05-06 00:16:27 +0800
 do not outs <div id="body"> if we are in login page
 r20996 at sunnavys-mb (orig r19443):  sunnavy | 2009-05-06 00:18:50 +0800
 remove a redundant </div>
 r20997 at sunnavys-mb (orig r19444):  sunnavy | 2009-05-06 00:24:06 +0800
 we do not need /Elements/Login, do we?
 r20998 at sunnavys-mb (orig r19445):  sartak | 2009-05-06 01:43:40 +0800
 Remove debug warning
 r20999 at sunnavys-mb (orig r19446):  sartak | 2009-05-06 01:47:50 +0800
 Remove some debugging stuff from t/approval/basic
 r21000 at sunnavys-mb (orig r19447):  sartak | 2009-05-06 02:04:18 +0800
 Remove debugging warning
 r21001 at sunnavys-mb (orig r19448):  sartak | 2009-05-06 02:17:20 +0800
 When a ticket is destroyed, don't let its rules run
 r21002 at sunnavys-mb (orig r19449):  sartak | 2009-05-06 02:27:05 +0800
 order_by uses column not Order
 r21003 at sunnavys-mb (orig r19450):  sartak | 2009-05-06 02:43:06 +0800
 Warn if the ticket being DESTROYed cannot be loaded
 r21004 at sunnavys-mb (orig r19451):  sartak | 2009-05-06 02:56:53 +0800
 Lie less :)
 r21005 at sunnavys-mb (orig r19452):  sartak | 2009-05-06 03:17:25 +0800
 Don't "use RT", it loads config which changes LogLevel to debug
 r21006 at sunnavys-mb (orig r19453):  sartak | 2009-05-06 03:46:00 +0800
 Add RT::DateTime->is_set
 r21007 at sunnavys-mb (orig r19454):  sartak | 2009-05-06 03:46:05 +0800
 Avoid global destruction issues by freeing tickets sooner
 r21008 at sunnavys-mb (orig r19455):  sartak | 2009-05-06 03:47:18 +0800
 Typo fix
 r21009 at sunnavys-mb (orig r19456):  sartak | 2009-05-06 04:13:20 +0800
 We run everything in its own database, we no longer need to revoke rights :)
 r21010 at sunnavys-mb (orig r19457):  sartak | 2009-05-06 04:13:24 +0800
 Avoid more global destruction warnings spewage
 r21011 at sunnavys-mb (orig r19458):  sartak | 2009-05-06 04:26:37 +0800
 Remove debug messages
 r21012 at sunnavys-mb (orig r19459):  sartak | 2009-05-06 05:07:29 +0800
 More global destruction issues
 r21013 at sunnavys-mb (orig r19460):  sartak | 2009-05-06 05:07:33 +0800
 Remove debug statement
 r21014 at sunnavys-mb (orig r19461):  sartak | 2009-05-06 05:35:56 +0800
 Variable name fix
 r21025 at sunnavys-mb (orig r19472):  sartak | 2009-05-07 02:30:16 +0800
 Fix %negate heheheh
 r21027 at sunnavys-mb (orig r19474):  sartak | 2009-05-07 02:38:41 +0800
 Remove unused and fairly insane limit_attribute
 r21028 at sunnavys-mb (orig r19475):  sartak | 2009-05-07 02:47:15 +0800
 Use $RT::VarPath instead of /home/jesse/svk/3.999-DANGEROUS/var
 r21029 at sunnavys-mb (orig r19476):  sartak | 2009-05-07 04:26:23 +0800
 LogDir is gone
 r21030 at sunnavys-mb (orig r19477):  sartak | 2009-05-07 04:27:57 +0800
 LogToSyslog is also ignored and removed
 r21031 at sunnavys-mb (orig r19478):  sartak | 2009-05-07 04:34:45 +0800
 StatementLog also gone
 r21032 at sunnavys-mb (orig r19479):  sartak | 2009-05-07 04:35:11 +0800
 Remove LogToFileNamed
 r21033 at sunnavys-mb (orig r19480):  sartak | 2009-05-07 04:36:47 +0800
 LogToFile also gone
 r21035 at sunnavys-mb (orig r19482):  sartak | 2009-05-07 06:22:07 +0800
 Remove munging of LogToScreen, Jifty's testing handles this
 r21036 at sunnavys-mb (orig r19483):  sartak | 2009-05-07 06:22:43 +0800
 Remove logging from config entirely :)


Modified: rt/3.999/branches/config-in-db/lib/RT/Collection.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Collection.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Collection.pm	Wed May  6 22:23:46 2009
@@ -91,95 +91,6 @@
     );
 }
 
-=head2 limit_attribute PARAMHASH
-
-Takes name, operator and value to find records that has the
-matching Attribute.
-
-If EMPTY is set, also select rows with an empty string as
-Attribute's Content.
-
-If NULL is set, also select rows without the named Attribute.
-
-=cut
-
-my %Negate = qw(
-    =		!=
-    !=		=
-    >		<=
-    <		>=
-    >=		<
-    <=		>
-    LIKE	NOT LIKE
-    NOT LIKE	LIKE
-    IS		IS NOT
-    IS NOT	IS
-);
-
-sub limit_attribute {
-    my ( $self, %args ) = @_;
-    my $clause = 'alias';
-    my $operator = ( $args{operator} || '=' );
-
-    if ( $args{NULL} and exists $args{value} ) {
-        $clause   = 'leftjoin';
-        $operator = $Negate{$operator};
-    } elsif ( $args{NEGATE} ) {
-        $operator = $Negate{$operator};
-    }
-
-    my $alias = $self->join(
-        type    => 'left',
-        alias1  => $args{alias} || 'main',
-        column1 => 'id',
-        table2  => 'Attributes',
-        column2 => 'object_id'
-    );
-
-    my $type = ref($self);
-    $type =~ s/(?:s|Collection)$//;    # XXX - Hack!
-
-    $self->limit(
-        $clause  => $alias,
-        column   => 'object_type',
-        operator => '=',
-        value    => $type,
-    );
-    $self->limit(
-        $clause  => $alias,
-        column   => 'name',
-        operator => '=',
-        value    => $args{name},
-    ) if exists $args{name};
-
-    return unless exists $args{value};
-
-    $self->limit(
-        $clause  => $alias,
-        column   => 'content',
-        operator => $operator,
-        value    => $args{value},
-    );
-
-    # Capture rows with the attribute defined as an empty string.
-    $self->limit(
-        $clause  => $alias,
-        column   => 'content',
-        operator => '=',
-        value    => '',
-        entry_aggregator => $args{NULL} ? 'AND' : 'OR',
-    ) if $args{EMPTY};
-
-    # Capture rows without the attribute defined
-    $self->limit(
-        %args,
-        alias    => $alias,
-        column   => 'id',
-        operator => ( $args{NEGATE} ? 'IS NOT' : 'IS' ),
-        value    => 'NULL',
-    ) if $args{NULL};
-}
-
 =head2 limit_custom_field
 
 Takes a paramhash of key/value pairs with the following keys:

Modified: rt/3.999/branches/config-in-db/lib/RT/DateTime.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/DateTime.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/DateTime.pm	Wed May  6 22:23:46 2009
@@ -146,6 +146,7 @@
 }
 
 sub is_unset { shift->epoch == 0 }
+sub is_set { not (shift->is_unset(@_)) }
 
 sub new_unset { RT::DateTime->from_epoch(epoch => 0) }
 

Modified: rt/3.999/branches/config-in-db/lib/RT/Interface/Web.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Interface/Web.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Interface/Web.pm	Wed May  6 22:23:46 2009
@@ -941,7 +941,7 @@
 
     # We special case owner changing, so we can use force_owner_change
     if ( $args_ref->{'owner'}
-        && ( $ticket_obj->owner != $args_ref->{'owner'} ) )
+        && ( $ticket_obj->owner_id != $args_ref->{'owner'} ) )
     {
         my ($ChownType);
         if ( $args_ref->{'force_owner_change'} ) {

Modified: rt/3.999/branches/config-in-db/lib/RT/Model/Rule.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Model/Rule.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Model/Rule.pm	Wed May  6 22:23:46 2009
@@ -65,9 +65,9 @@
 sub table {'Rules'}
 use Jifty::DBI::Schema;
 use Jifty::DBI::Record schema {
-    column action_code    => type is 'text';
-    column condition_code => type is 'text';
-    column prepare_code   => type is 'text';
+    column action_code    => type is 'text', render as 'textarea';
+    column condition_code => type is 'text', render as 'textarea';
+    column prepare_code   => type is 'text', render as 'textarea';
     column description               => type is 'text';
 };
 use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata map => {

Modified: rt/3.999/branches/config-in-db/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Model/Ticket.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Model/Ticket.pm	Wed May  6 22:23:46 2009
@@ -86,50 +86,116 @@
 use Jifty::DBI::Schema;
 use Jifty::DBI::Record schema {
 
-    column effective_id     => max_length is 11,  type is 'int',          default is '0';
-    column queue            => references RT::Model::Queue;
-    column type             => max_length is 16,  type is 'varchar(16)',  default is '';
-    column issue_statement  => max_length is 11,  type is 'int',          default is '0';
-    column resolution       => max_length is 11,  type is 'int',          default is '0';
-    column owner            => references RT::Model::User;
-    column subject          => max_length is 200, type is 'varchar(200)', default is '';
-
-    column initial_priority => max_length is 11,  type is 'int',          default is '0';
-    column final_priority   => max_length is 11,  type is 'int',          default is '0';
-    column priority         => max_length is 11,  type is 'int',          default is '0';
-
-    column time_estimated   => max_length is 11,  type is 'int',
-           default is '0', label is _( 'time estimated( in minutes )' );
-    column time_worked      => max_length is 11,  type is 'int',
-           default is '0', label is _( 'time worked( in minutes )' );
-    column time_left        => max_length is 11,  type is 'int',
-           default is '0', label is _('time left( in minutes )');
+    column effective_id =>
+        max_length is 11,
+        type is 'int',
+        default is '0';
+
+    column queue =>
+        references RT::Model::Queue;
+
+    column type =>
+        max_length is 16,
+        type is 'varchar(16)',
+        default is '';
+
+    column issue_statement =>
+        max_length is 11,
+        type is 'int',
+        default is '0';
+
+    column resolution =>
+        max_length is 11,
+        type is 'int',
+        default is '0';
+
+    column owner =>
+        references RT::Model::User;
+
+    column subject =>
+        display_length is 50,
+        max_length is 200,
+        type is 'varchar(200)',
+        default is '';
+
+    column initial_priority =>
+        max_length is 11,
+        type is 'int',
+        default is '0';
+
+    column final_priority =>
+        max_length is 11,
+        type is 'int',
+        default is '0';
+
+    column priority      =>
+        max_length is 11,
+        type is 'int',
+        default is '0';
+
+    column time_estimated =>
+        max_length is 11,
+        type is 'int',
+        default is '0',
+        label is _( 'time estimated' ),
+        hints are _('in minutes');
+
+    column time_worked   =>
+        max_length is 11,
+        type is 'int',
+        default is '0',
+        label is _( 'time worked' ),
+        hints are _('in minutes');
+
+    column time_left     =>
+        max_length is 11,
+        type is 'int',
+        default is '0',
+        label is _('time left'),
+        hints are _('in minutes');
+
+    column status        =>
+        max_length is 10,
+        type is 'varchar(10)',
+        default is '',
+        render_as 'Select';
 
-    column status           => max_length is 10,  type is 'varchar(10)',
-           default is '', render_as 'Select';
-
-    column told             => type is 'timestamp',
+    column told          =>
+        type is 'timestamp',
         filters are qw( Jifty::Filter::DateTime Jifty::DBI::Filter::DateTime),
         render_as 'DateTime',
         label is _('Last Contact');
-    column starts           => type is 'timestamp',
+
+    column starts        =>
+        type is 'timestamp',
         filters are qw( Jifty::Filter::DateTime Jifty::DBI::Filter::DateTime),
         render_as 'DateTime',
         label is _('Starts');
-    column started          => type is 'timestamp',
+
+    column started       =>
+        type is 'timestamp',
         filters are qw( Jifty::Filter::DateTime Jifty::DBI::Filter::DateTime),
         render_as 'DateTime',
         label is _('Started');
-    column due              => type is 'timestamp',
+
+    column due           =>
+        type is 'timestamp',
         filters are qw( Jifty::Filter::DateTime Jifty::DBI::Filter::DateTime),
         render_as 'DateTime',
         label is _('Due');
-    column resolved         => type is 'timestamp',
+
+    column resolved      =>
+        type is 'timestamp',
         filters are qw( Jifty::Filter::DateTime Jifty::DBI::Filter::DateTime),
         render_as 'DateTime',
         label is _('Resolved');
-    column disabled         => max_length is 6,   type is 'smallint',     default is '0';
+
+    column disabled      =>
+        max_length is 6,
+        type is 'smallint',
+        default is '0';
 };
+
 use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata map => {
     created_by => 'creator',
     created_on => 'created',
@@ -2135,7 +2201,8 @@
     return unless @$batch;
 
     my $ticket = RT::Model::Ticket->new( current_user => RT::CurrentUser->superuser );
-    $ticket->load( $self->id );
+    my ($ok, $msg) = $ticket->load( $self->id );
+    warn "Unable to load ticket #" . $self->id . " for batch processing: " . $msg if !$ok;
 
     # Entry point of the rule system
     my $rules = RT::Ruleset->find_all_rules(

Modified: rt/3.999/branches/config-in-db/lib/RT/Rule.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Rule.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Rule.pm	Wed May  6 22:23:46 2009
@@ -61,6 +61,13 @@
 
 sub prepare {
     my $self = shift;
+
+    # When a ticket is deleted with shredder, its id can be undef
+    if (!defined($self->ticket_obj->id)) {
+        Jifty->log->debug("Prepare aborted because the ticket was not available.");
+        return (0);
+    }
+
     return (0) if $self->_queue && $self->ticket_obj->queue->name ne $self->_queue;
     return 1;
 }

Modified: rt/3.999/branches/config-in-db/lib/RT/Test.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Test.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Test.pm	Wed May  6 22:23:46 2009
@@ -120,10 +120,7 @@
 
     require RT;
     my $port  = 999;
-    RT->config->set( log_to_screen => 'debug' );
-    RT->config->set( log_stack_traces => 'warning' );
     RT->config->set( mail_command => 'testfile' );
-
     RT->config->set( full_text_search => { enable => 1 } );
 
     Jifty->config->{'framework'}{'DevelMode'} = 0 if $INC{'Devel/Cover.pm'};

Modified: rt/3.999/branches/config-in-db/lib/RT/Test/Shredder.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/Test/Shredder.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/Test/Shredder.pm	Wed May  6 22:23:46 2009
@@ -87,14 +87,7 @@
 
 
     # generic logging
-    config_set( 'LogToSyslog',    undef );
-    config_set( 'LogToScreen',    'error' );
-    config_set( 'LogStackTraces', 'crit' );
-
-    # logging to standalone file
-    config_set( 'LogToFile', 'debug' );
-    my $fname = File::Spec->catfile( create_tmpdir(), test_name() . ".log" );
-    config_set( 'LogToFilenamed', $fname );
+    config_set( '$LogStackTraces', 'crit' );
 }
 
 =head3 config_set

Modified: rt/3.999/branches/config-in-db/lib/RT/View.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/View.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/View.pm	Wed May  6 22:23:46 2009
@@ -62,7 +62,6 @@
 
 template login_widget => sub {
 
-    outs_raw('</div>'); # End of div#quickbar from /Elements/Header
     my ( $action, $next ) = get( 'action', 'next' );
     $action ||= new_action( class => 'Login' );
     $next ||= Jifty::Continuation->new(

Modified: rt/3.999/branches/config-in-db/lib/RT/View/Admin.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/View/Admin.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/View/Admin.pm	Wed May  6 22:23:46 2009
@@ -63,5 +63,8 @@
 require RT::View::Admin::CustomFields;
 alias RT::View::Admin::CustomFields under 'custom_fields/';
 
+require RT::View::Admin::Rules;
+alias RT::View::Admin::Rules under 'rules/';
+
 1;
 

Added: rt/3.999/branches/config-in-db/lib/RT/View/Admin/Rules.pm
==============================================================================
--- (empty file)
+++ rt/3.999/branches/config-in-db/lib/RT/View/Admin/Rules.pm	Wed May  6 22:23:46 2009
@@ -0,0 +1,90 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+#                                          <jesse at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/copyleft/gpl.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+use warnings;
+use strict;
+
+package RT::View::Admin::Rules;
+use Jifty::View::Declare -base;
+use base 'RT::View::CRUD';
+
+use constant page_title     => 'Rule Management';
+use constant object_type    => 'Rule';
+use constant tab_url        => '/Admin/Elements/RuleTabs';
+use constant current_tab    => 'admin/rules/'; # this is not working
+
+use constant display_columns => qw(id description condition_code prepare_code action_code);
+
+sub _current_collection {
+    my $self = shift;
+    my $c    = $self->SUPER::_current_collection();
+    $c->unlimit;
+#    $c->limit_to_user_defined_groups();
+    return $c;
+}
+
+=head2 view_field_name
+
+Display each group's name as a hyperlink to the modify page
+
+=cut
+
+sub view_field_name {
+    my $self = shift;
+    my %args = @_;
+
+    $self->view_via_callback(%args, callback => sub {
+        my %args = @_;
+        hyperlink(
+            label => $args{current_value},
+            url   => "/Admin/Rules/Modify.html?id=$args{id}",
+        );
+    });
+}
+
+1;
+

Modified: rt/3.999/branches/config-in-db/lib/RT/View/CRUD.pm
==============================================================================
--- rt/3.999/branches/config-in-db/lib/RT/View/CRUD.pm	(original)
+++ rt/3.999/branches/config-in-db/lib/RT/View/CRUD.pm	Wed May  6 22:23:46 2009
@@ -79,6 +79,9 @@
     }
 };
 
+# no inline edit
+private template view_item_controls  => sub { };
+
 sub view_via_callback {
     my $self = shift;
     my %args = @_;

Added: rt/3.999/branches/config-in-db/share/html/Admin/Elements/RuleTabs
==============================================================================
--- (empty file)
+++ rt/3.999/branches/config-in-db/share/html/Admin/Elements/RuleTabs	Wed May  6 22:23:46 2009
@@ -0,0 +1,81 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/Tabs,
+    title          => $title,
+    current_tab    => 'Admin/Rules/',
+    subtabs        => $tabs,
+    current_subtab => $current_tab,
+&>
+
+<%INIT>
+    my $tabs = {
+        A => { title => _('Select'),
+               path  => "Admin/Rules/", },
+        E => { title => _('Create'),
+               path  => 'Admin/Rules/Modify.html?create=1',
+        },
+    };
+
+    # Now let callbacks add their extra tabs
+    $m->callback( %ARGS, tabs => $tabs );
+
+    foreach my $tab ( values %{$tabs} ) {
+        next unless $tab->{'path'} eq $current_tab;
+
+        $tab->{"subtabs"} = $subtabs;
+        $tab->{"current_subtab"} = $current_subtab;
+    }
+</%INIT>
+
+<%ARGS>
+$id => undef
+$current_tab => undef
+$subtabs => undef
+$current_subtab => undef
+$title => undef
+</%ARGS>

Modified: rt/3.999/branches/config-in-db/share/html/Admin/Elements/Tabs
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Admin/Elements/Tabs	(original)
+++ rt/3.999/branches/config-in-db/share/html/Admin/Elements/Tabs	Wed May  6 22:23:46 2009
@@ -64,10 +64,13 @@
 	       D => { 'title' => _('Custom Fields'),
 			   path => 'Admin/CustomFields/',
 			 },
-	       E => { 'title' => _('Global'),
+	       E => { 'title' => _('Rules'),
+			   path => 'admin/rules/',
+			 },
+	       F => { 'title' => _('Global'),
 			   path => 'Admin/Global/',
 			 },
-	       F => { 'title' => _('Tools'),
+	       G => { 'title' => _('Tools'),
 			   path => 'Admin/Tools/',
 			 },
 	     };

Modified: rt/3.999/branches/config-in-db/share/html/Admin/Users/Modify.html
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Admin/Users/Modify.html	(original)
+++ rt/3.999/branches/config-in-db/share/html/Admin/Users/Modify.html	Wed May  6 22:23:46 2009
@@ -257,74 +257,68 @@
     $title = _("Create a new user");
 } 
 else {
-
-    if ($id =~ /^\d+$/) { 
-        $current_tab = 'Admin/Users/Modify.html?id='.$id;
-    } elsif ($id eq 'new') {
-	( $val, $msg ) = $user_object->create(
-	    name                  => $name,
-	    email          => $ARGS{'email'},
-	    name                  => $ARGS{'name'},
-	    comments              => $ARGS{'comments'},
-	    Signature             => $ARGS{'signature'},
-	    email          => $ARGS{'email'},
-	    freeform_contact_info   => $ARGS{'freeform_contact_info'},
-	    organization          => $ARGS{'organization'},
-	    real_name              => $ARGS{'real_name'},
-	    nickname              => $ARGS{'nickname'},
-	    lang                  => $ARGS{'lang'},
-	    email_encoding         => $ARGS{'email_encoding'},
-	    web_encoding           => $ARGS{'web_encoding'},
-	    ExternalContactInfoId => $ARGS{'external_contact_info_id'},
-	    ContactInfoSystem     => $ARGS{'contact_info_system'},
-	    gecos                 => $ARGS{'gecos'},
-	    ExternalAuthId        => $ARGS{'external_auth_id'},
-	    auth_system            => $ARGS{'auth_system'},
-	    HomePhone             => $ARGS{'home_phone'},
-	    WorkPhone             => $ARGS{'work_phone'},
-	    MobilePhone           => $ARGS{'mobile_phone'},
-	    PagerPhone            => $ARGS{'pager_phone'},
-	    Address1              => $ARGS{'address1'},
-	    Address2              => $ARGS{'address2'},
-	    City                  => $ARGS{'city'},
-	    State                 => $ARGS{'state'},
-	    Zip                   => $ARGS{'zip'},
-	    Country               => $ARGS{'country'},
-	    privileged           => $ARGS{'privileged'},
-	    disabled            => ($ARGS{'enabled'} ? 0 : 1)
-	);
-
-	if ($val) {
-		push @results, $msg;
-        foreach my $key ( keys %ARGS) {
-            # Convert custom fields on the "new" object to custom fields on the one we've just Created
-            if ($key =~ /^object-RT::Model::User-new-CustomField-(.*)$/) {
-            $ARGS{'object-RT::Model::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key};
+    if ($id eq 'new') {
+        ( $val, $msg ) = $user_object->create(
+            name                  => $name,
+            email                 => $ARGS{'email'},
+            name                  => $ARGS{'name'},
+            comments              => $ARGS{'comments'},
+            Signature             => $ARGS{'signature'},
+            email                 => $ARGS{'email'},
+            freeform_contact_info => $ARGS{'freeform_contact_info'},
+            organization          => $ARGS{'organization'},
+            real_name             => $ARGS{'real_name'},
+            nickname              => $ARGS{'nickname'},
+            lang                  => $ARGS{'lang'},
+            email_encoding        => $ARGS{'email_encoding'},
+            web_encoding          => $ARGS{'web_encoding'},
+            ExternalContactInfoId => $ARGS{'external_contact_info_id'},
+            ContactInfoSystem     => $ARGS{'contact_info_system'},
+            gecos                 => $ARGS{'gecos'},
+            ExternalAuthId        => $ARGS{'external_auth_id'},
+            auth_system           => $ARGS{'auth_system'},
+            HomePhone             => $ARGS{'home_phone'},
+            WorkPhone             => $ARGS{'work_phone'},
+            MobilePhone           => $ARGS{'mobile_phone'},
+            PagerPhone            => $ARGS{'pager_phone'},
+            Address1              => $ARGS{'address1'},
+            Address2              => $ARGS{'address2'},
+            City                  => $ARGS{'city'},
+            State                 => $ARGS{'state'},
+            Zip                   => $ARGS{'zip'},
+            Country               => $ARGS{'country'},
+            privileged            => $ARGS{'privileged'},
+            disabled              => ($ARGS{'enabled'} ? 0 : 1)
+        );
+
+        if ($val) {
+            push @results, $msg;
+            foreach my $key ( keys %ARGS) {
+                # Convert custom fields on the "new" object to custom fields on the one we've just Created
+                if ($key =~ /^object-RT::Model::User-new-CustomField-(.*)$/) {
+                    $ARGS{'object-RT::Model::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key};
+                }
             }
+            push @results, process_object_custom_field_updates( args_ref => \%ARGS, object => $user_object );
+        } else {
+            push @results, _('User could not be Created: %1', $msg);
         }
-        push @results, process_object_custom_field_updates( args_ref => \%ARGS, object => $user_object );
-	} else {
-		push @results, _('User could not be Created: %1', $msg);
-	}
     } else {
+        $current_tab = 'Admin/Users/Modify.html?id='.$id;
 	    $user_object->load($id) || $user_object->load($name) || abort("Couldn't load user '$name'");
         $val = $user_object->id();
     }
 
     if ($val) {
-	$title = _("Modify the user %1", $user_object->name);
+        $title = _("Modify the user %1", $user_object->name);
     }
-
-    # If the create failed
-    else {
-	$title = _("Create a new user");
-	$create = 1;
+    else { # If the create failed
+        $title = _("Create a new user");
+        $create = 1;
     }
 }
 
 
-
-
 # If we have a user to modify, lets try. 
 if ($user_object->id && $id ne 'new') {
 

Modified: rt/3.999/branches/config-in-db/share/html/Elements/Header
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Elements/Header	(original)
+++ rt/3.999/branches/config-in-db/share/html/Elements/Header	Wed May  6 22:23:46 2009
@@ -102,6 +102,14 @@
 % }
   </div>
 % }
+</div>
+
+%# template login already has div with id "body"
+% unless ( Jifty->web->request->path =~ m{^/login} ) {
+<div id="body">
+% }
+% $m->callback( %ARGS, callback_name => 'BeforeBody' );
+% $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
 
 <%INIT>
 $r->content_type('text/html; charset=utf-8');

Modified: rt/3.999/branches/config-in-db/share/html/Elements/PageLayout
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Elements/PageLayout	(original)
+++ rt/3.999/branches/config-in-db/share/html/Elements/PageLayout	Wed May  6 22:23:46 2009
@@ -51,8 +51,6 @@
 % }
 </div>
 
-%# End of div#quickbar from /Elements/Header
-</div>
 
 % if ( $show_menu ) {
 <div id="nav">
@@ -159,10 +157,6 @@
 % }
 </div>
 </div>
-<div id="body">
-% $m->callback( %ARGS, callback_name => 'BeforeBody' );
-% $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
-
 <%INIT>
 if ( defined $current_toptab ) {
     foreach my $tab ( values %{$toptabs} ) {

Modified: rt/3.999/branches/config-in-db/share/html/SelfService/Display.html
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/SelfService/Display.html	(original)
+++ rt/3.999/branches/config-in-db/share/html/SelfService/Display.html	Wed May  6 22:23:46 2009
@@ -211,7 +211,7 @@
         # resubmission on refresh.
         # But we need to store Actions somewhere too, so we don't lose them.
         my $key = Digest::MD5::md5_hex(rand(1024));
-        Jifty->web->session->set( "actions_$key" => \@Actions );
+        Jifty->web->session->set( "actions_$key" => \@results );
         RT::Interface::Web::redirect( Jifty->web->url ."SelfService/Display.html?id=". $Ticket->id."&results=".$key);
     }
 

Modified: rt/3.999/branches/config-in-db/share/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Ticket/Elements/ShowTransaction	(original)
+++ rt/3.999/branches/config-in-db/share/html/Ticket/Elements/ShowTransaction	Wed May  6 22:23:46 2009
@@ -165,9 +165,9 @@
     $titlebar_commands .=
         "[<a target=\"_blank\" href=\"$email_record_path?id="
       . $transaction->object_id
-      . "&Transaction="
+      . "&transaction="
       . $transaction->id
-      . "&Attachment="
+      . "&attachment="
       . ( $attachments->[0] && $attachments->[0]->id )
       . '">' . _('Show') . "</a>]&nbsp;";
     $show_body = 0;

Modified: rt/3.999/branches/config-in-db/share/web/static/css/layout.css
==============================================================================
--- rt/3.999/branches/config-in-db/share/web/static/css/layout.css	(original)
+++ rt/3.999/branches/config-in-db/share/web/static/css/layout.css	Wed May  6 22:23:46 2009
@@ -12,7 +12,6 @@
 }
 
 div#body {
-    position: relative;
     padding: 1em;
     padding-top: 1.5em;
     -moz-border-radius: 0.5em;
@@ -33,7 +32,7 @@
 #topactions {
  position: absolute;
  background: transparent;
- top: 3.8em; 
+ top: 3.5em; 
  right: 1em;
  width: auto;
  min-width: 42em;
@@ -158,6 +157,7 @@
 
 div#header h1 {
  position: absolute;
+ top: 1.5em;
  left: 7.25em;
  right: 20em;
  overflow: hidden;

Modified: rt/3.999/branches/config-in-db/share/web/static/css/nav.css
==============================================================================
--- rt/3.999/branches/config-in-db/share/web/static/css/nav.css	(original)
+++ rt/3.999/branches/config-in-db/share/web/static/css/nav.css	Wed May  6 22:23:46 2009
@@ -81,14 +81,14 @@
 }
 
 
-div#nav a.selected:after {
-/* content: " > " */
-}
-
 div#page-navigation {
+ position: absolute;
+ top: 5em;
+ height: 1em;
+ left: 9em;
+ right: 0em;
+ padding-top: 1em;
  background: white;
- position: relative;
- width:100%;
  z-index: 10;
 
 }
@@ -101,30 +101,22 @@
 div#page-navigation ul#page-menu {
  display: block;
  position: absolute;
- left: 8em;
+ left: 0em;
  font-size: 0.9em;
- top: 2.3em;
+ top: -1em;
  height: 1em;
  background-color: white;
  right: 0em;
- padding-top:0.3em;
+ padding-top:0.5em;
  padding-bottom:0.5em;
  border-top: 1px solid #aaa;
 
 }
 
-/* ie hack */
-* html div#page-navigation ul#page-menu {
-    left: 6.5em;
-    top: 3.2em;
-    padding-left: 2em;
-}
-
-
 div#page-navigation ul#actions-menu {
  position: absolute;
  right: 1em;
- top: 5.2em;
+ top: 3.2em;
  margin-top: 0em;
  padding: 0.25em;
  padding-left: 0.5em;

Modified: rt/3.999/branches/config-in-db/share/web/static/css/ticket-search.css
==============================================================================
--- rt/3.999/branches/config-in-db/share/web/static/css/ticket-search.css	(original)
+++ rt/3.999/branches/config-in-db/share/web/static/css/ticket-search.css	Wed May  6 22:23:46 2009
@@ -1,5 +1,4 @@
 #comp-Search-Build #body {
-    position: relative;
 }
 
 #comp-Search-Build #pick-criteria select {
@@ -61,21 +60,21 @@
 }
 
 #comp-Search-Build #editquery, #comp-Search-Build #editsearches{
-  position: absolute;
-  margin-top: 0.2em;
-  right: 1em;
-  left: 60%;
-  top: 1em;
+   position: absolute;
+   width: 35%;
+    right: 2em;
 /*  margin-top: -1em; */
 }
 
 #comp-Search-Build #editquery {
-   top: 1.3em;
+   width: 35%;
+    right: 2em;
+   top: 8.8em;
 }    
 
 
 #comp-Search-Build #editsearches {
-  top: 24em;
+  top: 30em;
 }
 
 

Modified: rt/3.999/branches/config-in-db/share/web/static/css/ticket.css
==============================================================================
--- rt/3.999/branches/config-in-db/share/web/static/css/ticket.css	(original)
+++ rt/3.999/branches/config-in-db/share/web/static/css/ticket.css	Wed May  6 22:23:46 2009
@@ -18,8 +18,8 @@
 
 }
 
-.ticket-transaction tr.metadata td { padding-top: 0.75em;} 
-.ticket-transaction tr.metadata td.actions {
+.ticket-transaction .metadata * { padding-top: 0.75em;} 
+.ticket-transaction .metadata .actions {
  padding: 0em;
  background: #ccc;
  text-align: right;
@@ -32,7 +32,7 @@
  white-space: nowrap;
 }
 
-.ticket-transaction tr.metadata  td.type {
+.ticket-transaction .metadata  .type {
  text-align: center;
  position: absolute;
  margin: 0.25em;
@@ -45,23 +45,23 @@
  -webkit-border-bottom-right-radius: 0.25em;
 }
 
-div#ticket-history td.type a {
+div#ticket-history .type a {
  color: #fff;
 }
 
 
-div#ticket-history td.date {
+div#ticket-history .date {
  padding-left: 2em;
  width: 10em;
 }
 
 
-div#ticket-history td.description {
+div#ticket-history .description {
  padding-left: 1em;
  font-weight: bold;
 }
 
-div#ticket-history td.content {
+div#ticket-history .content {
  position: relative;
  padding-right: 1em;
  font-size: 1.1em;

Modified: rt/3.999/branches/config-in-db/t/api/cf_pattern.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/api/cf_pattern.t	(original)
+++ rt/3.999/branches/config-in-db/t/api/cf_pattern.t	Wed May  6 22:23:46 2009
@@ -51,4 +51,7 @@
 fails(add(''));
 fails(add('...'));
 
+# Avoid global destruction issues
+undef $t;
+
 1;

Modified: rt/3.999/branches/config-in-db/t/api/reminders.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/api/reminders.t	(original)
+++ rt/3.999/branches/config-in-db/t/api/reminders.t	Wed May  6 22:23:46 2009
@@ -45,7 +45,6 @@
 ok($reminders, 'Loading reminders for this ticket');
 my $found = 0;
 while ( my $reminder = $reminders->next ) {
-    warn $reminder->id,"\n";
     next unless $found == 0;
     $found = 1 if ( $reminder->subject =~ m/TestReminder/ );
 }

Modified: rt/3.999/branches/config-in-db/t/approval/basic.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/approval/basic.t	(original)
+++ rt/3.999/branches/config-in-db/t/approval/basic.t	Wed May  6 22:23:46 2009
@@ -10,11 +10,9 @@
 
 plan tests => 32;
 
-use RT;
 use RT::Test;
 use RT::Test::Email;
 
-RT->config->set( log_to_screen => 'debug' );
 RT->config->set( use_transaction_batch => 1 );
 
 my $q = RT::Model::Queue->new( current_user => RT->system_user );
@@ -210,4 +208,3 @@
 $t->load($t->id);$dependson_ceo->load($dependson_ceo->id);
 is_deeply([ $t->status, $dependson_cfo->status, $dependson_ceo->status ],
           [ 'rejected', 'rejected', 'deleted'], 'ticket state after cfo rejection');
-$SIG{INT} = sub { Carp::cluck };

Modified: rt/3.999/branches/config-in-db/t/lorzy/action.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/lorzy/action.t	(original)
+++ rt/3.999/branches/config-in-db/t/lorzy/action.t	Wed May  6 22:23:46 2009
@@ -76,3 +76,6 @@
     subject => qr'AutoReply: lorzy test',
     body => qr/automatically generated/,
 };
+
+# Global destruction issues
+undef $ticket;

Modified: rt/3.999/branches/config-in-db/t/mail/crypt-gnupg.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/mail/crypt-gnupg.t	(original)
+++ rt/3.999/branches/config-in-db/t/mail/crypt-gnupg.t	Wed May  6 22:23:46 2009
@@ -49,7 +49,6 @@
     my %res = RT::Crypt::GnuPG::sign_encrypt( entity => $entity, encrypt => 0, passphrase => 'test' );
     ok( $entity, 'signed entity');
     ok( !$res{'logger'}, "log is here as well" ) or diag $res{'logger'};
-    warn $res{'logger'};
     my @status = RT::Crypt::GnuPG::parse_status( $res{'status'} );
     is( scalar @status, 2, 'two records: passphrase, signing');
     is( $status[0]->{'operation'}, 'passphrase_check', 'operation is correct');

Modified: rt/3.999/branches/config-in-db/t/mail/gnupg-incoming.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/mail/gnupg-incoming.t	(original)
+++ rt/3.999/branches/config-in-db/t/mail/gnupg-incoming.t	Wed May  6 22:23:46 2009
@@ -23,7 +23,6 @@
 RT::Test->set_mail_catcher;
 
 
-RT->config->set( log_to_screen => 'debug' );
 RT->config->set(
     'gnupg',
     {

Modified: rt/3.999/branches/config-in-db/t/mail/sendmail.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/mail/sendmail.t	(original)
+++ rt/3.999/branches/config-in-db/t/mail/sendmail.t	Wed May  6 22:23:46 2009
@@ -534,6 +534,4 @@
 
 
 
-# Don't taint the environment
-$everyone->principal->revoke_right(right =>'SuperUser');
 1;

Modified: rt/3.999/branches/config-in-db/t/savedsearch.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/savedsearch.t	(original)
+++ rt/3.999/branches/config-in-db/t/savedsearch.t	Wed May  6 22:23:46 2009
@@ -67,7 +67,6 @@
 \'<small>__time_left__</small>\'';
 
 my $curruser = RT::CurrentUser->new(id => $searchuser->id);
-warn "My search user = ".$searchuser->id;
 my $mysearch = RT::SavedSearch->new( current_user => $curruser );
 ( $ret, $msg ) = $mysearch->save(
     privacy      => 'RT::Model::User-' . $searchuser->id,
@@ -128,7 +127,6 @@
 # See if it can be used to search for tickets.
 my $tickets = RT::Model::TicketCollection->new(current_user => $curruser);
 $tickets->from_sql($loadedsearch1->get_parameter('query'));
-diag $loadedsearch1->get_parameter('query');
 is($tickets->count, 1, "Found a ticket");
 
 # This should fail -- wrong object.
@@ -191,7 +189,3 @@
 $allsearches->limit_to_privacy('RT::Model::User-'.$curruser->id);
 is($allsearches->count, 1, "Found all searchuser's searches after deletion");
 
-while (my $search = $allsearches->next) {
-    diag($search->id, $search->name);
-}
-

Modified: rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-multiple.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-multiple.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-multiple.t	Wed May  6 22:23:46 2009
@@ -76,7 +76,7 @@
             my $error = 0;
             my $tix = RT::Model::TicketCollection->new(current_user => RT->system_user );
             $tix->from_sql( $query );
-            $tix->order_by( field => $test->{'Order'}, order => $order );
+            $tix->order_by( column => $test->{'column'}, order => $order );
 
             ok($tix->count, "found ticket(s)")
                 or $error = 1;
@@ -119,8 +119,8 @@
 );
 @tickets = add_tix_from_data();
 @test = (
-    { order => "CF.{$cf_name}" },
-    { order => "CF.$queue_name.{$cf_name}" },
+    { column => "CF.{$cf_name}" },
+    { column => "CF.$queue_name.{$cf_name}" },
 );
 run_tests();
 
@@ -131,8 +131,10 @@
 );
 @tickets = add_tix_from_data();
 @test = (
-    { order => "CF.{$cf_name}", query => "CF.{$cf_name} = 'm'" },
-    { order => "CF.$queue_name.{$cf_name}", query => "CF.{$cf_name} = 'm'" },
+    { column => "CF.{$cf_name}", query => "CF.{$cf_name} = 'm'" },
+    { column => "CF.$queue_name.{$cf_name}", query => "CF.{$cf_name} = 'm'" },
 );
 run_tests();
 
+# Global destruction issues
+ at tickets = ();

Modified: rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-single.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-single.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/cfsort-freeform-single.t	Wed May  6 22:23:46 2009
@@ -188,5 +188,5 @@
 );
 run_tests();
 
-
-
+# Global destruction issues
+ at tickets = ();

Modified: rt/3.999/branches/config-in-db/t/ticket/search_by_links.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/search_by_links.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/search_by_links.t	Wed May  6 22:23:46 2009
@@ -131,3 +131,5 @@
 }
 run_tests();
 
+# Global destruction issues
+ at tickets = ();

Modified: rt/3.999/branches/config-in-db/t/ticket/search_by_watcher.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/search_by_watcher.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/search_by_watcher.t	Wed May  6 22:23:46 2009
@@ -281,3 +281,5 @@
     is($tix->count, 2, "found ticket(s)");
 }
 
+# Global destruction fun
+ at tickets = ();

Modified: rt/3.999/branches/config-in-db/t/ticket/sort-by-queue.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/sort-by-queue.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/sort-by-queue.t	Wed May  6 22:23:46 2009
@@ -99,3 +99,7 @@
     { order => "queue" },
 );
 run_tests();
+
+# Global destruction issues
+ at tickets = ();
+

Modified: rt/3.999/branches/config-in-db/t/ticket/sort-by-user.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/sort-by-user.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/sort-by-user.t	Wed May  6 22:23:46 2009
@@ -151,3 +151,5 @@
 );
 run_tests();
 
+# Global destruction fun
+ at tickets = ();

Modified: rt/3.999/branches/config-in-db/t/ticket/sort_by_cf.t
==============================================================================
--- rt/3.999/branches/config-in-db/t/ticket/sort_by_cf.t	(original)
+++ rt/3.999/branches/config-in-db/t/ticket/sort_by_cf.t	Wed May  6 22:23:46 2009
@@ -121,7 +121,6 @@
 $tx = RT::Model::TicketCollection->new( current_user => RT->system_user );
 $tx->from_sql(qq[queue="$queue"] );
 $tx->order_by( {column => "CF.{Charlie}", order => 'ASC' });
-diag $tx->build_select_query;
 is($tx->count,2);
 check_order( $tx, 2, 1);
 


More information about the Rt-commit mailing list