[Rt-commit] r10708 - in rt/branches/3.999-DANGEROUS: . etc html/Admin/Elements lib/RT lib/RT/Interface lib/RT/Model t
jesse at bestpractical.com
jesse at bestpractical.com
Sun Feb 3 20:28:48 EST 2008
Author: jesse
Date: Sun Feb 3 20:28:47 2008
New Revision: 10708
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/etc/RT_Config.pm
rt/branches/3.999-DANGEROUS/etc/config.yml
rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
rt/branches/3.999-DANGEROUS/t/test_config.yml
rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
Log:
r76166 at pinglin: jesse | 2008-02-03 20:27:32 -0500
* one of two scrips_batch failures fixed
Modified: rt/branches/3.999-DANGEROUS/etc/RT_Config.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/RT_Config.pm (original)
+++ rt/branches/3.999-DANGEROUS/etc/RT_Config.pm Sun Feb 3 20:28:47 2008
@@ -704,7 +704,7 @@
# set $PreviewScripMessages to 1 if the scrips preview on the ticket
# reply page should include the content of the messages to be sent.
-# set $Usetransaction_batch to 1 to execute transactions in batches,
+# set $use_transaction_batch to 1 to execute transactions in batches,
# such that a resolve and comment (for example) would happen
# simultaneously, instead of as two transactions, unaware of each
# others' existence.
Modified: rt/branches/3.999-DANGEROUS/etc/config.yml
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/config.yml (original)
+++ rt/branches/3.999-DANGEROUS/etc/config.yml Sun Feb 3 20:28:47 2008
@@ -11,7 +11,7 @@
Driver: mysql
Host: localhost
password: ''
- RecordbaseClass: Jifty::DBI::Record::Cachable
+ RecordBaseClass: Jifty::DBI::Record::Cachable
User: root
Version: 0.0.1
DevelMode: 1
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip Sun Feb 3 20:28:47 2008
@@ -188,7 +188,7 @@
description custom_prepare_code custom_commit_code custom_is_applicable_code);
my @results = update_record_object(
attributes_ref => \@attribs,
- AttributePrefix => 'Scrip-'.$scrip->id,
+ attribute_prefix => 'Scrip-'.$scrip->id,
object => $scrip,
args_ref => \%ARGS
);
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage Sun Feb 3 20:28:47 2008
@@ -58,7 +58,7 @@
$Default = 'TransactionCreate';
}
my @stages = 'TransactionCreate';
-push @stages, 'transaction_batch' if RT->config->get('Usetransaction_batch');
+push @stages, 'transaction_batch' if RT->config->get('use_transaction_batch');
push @stages, 'disabled';
</%INIT>
<%ARGS>
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm Sun Feb 3 20:28:47 2008
@@ -795,7 +795,7 @@
args_ref => undef,
attributes_ref => undef,
object => undef,
- AttributePrefix => undef,
+ attribute_prefix => undef,
@_
);
@@ -803,7 +803,7 @@
my @results = $object->update(
attributes_ref => $args{'attributes_ref'},
args_ref => $args{'args_ref'},
- AttributePrefix => $args{'AttributePrefix'},
+ attribute_prefix => $args{'attribute_prefix'},
);
return (@results);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm Sun Feb 3 20:28:47 2008
@@ -33,19 +33,11 @@
use Jifty::DBI::Record schema {
column queue => max_length is 11, type is 'int(11)', default is '0';
column name => max_length is 200, type is 'varchar(200)', default is '';
- column
- description => max_length is 255,
- type is 'varchar(255)', default is '';
+ column description => max_length is 255, type is 'varchar(255)', default is '';
column type => max_length is 16, type is 'varchar(16)', default is '';
- column Language => max_length is 16, type is 'varchar(16)', default is '';
- column
- TranslationOf => max_length is 11,
- type is 'int(11)', default is '0';
column content => type is 'blob', default is '';
column last_updated => type is 'datetime', default is '';
- column
- last_updated_by => max_length is 11,
- type is 'int(11)', default is '0';
+ column last_updated_by => max_length is 11, type is 'int(11)', default is '0';
column creator => max_length is 11, type is 'int(11)', default is '0';
column created => type is 'datetime', default is '';
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm Sun Feb 3 20:28:47 2008
@@ -2985,7 +2985,7 @@
Returns an array reference of all transactions created on this ticket during
this ticket object's lifetime, or undef if there were none.
- Only works when the C<Usetransaction_batch> config option is set to true.
+ Only works when the C<use_transaction_batch> config option is set to true.
=cut
@@ -3034,7 +3034,7 @@
record_transaction => 1,
update_ticket => 1,
check_acl => 1,
- transaction_type => 'Set',
+ transaction_type => 'set',
@_
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm Sun Feb 3 20:28:47 2008
@@ -731,7 +731,7 @@
args_ref => a hashref of attributes => value for the update
attributes_ref => an arrayref of keys in args_ref that should be updated
- AttributePrefix => a prefix that should be added to the attributes in attributes_ref
+ attriubte_prefix => a prefix that should be added to the attributes in attributes_ref
when looking up values in args_ref
Bare attributes are tried before prefixed attributes
@@ -1286,7 +1286,7 @@
if ( defined $args{'time_taken'} and $self->can('_update_time_taken') ) {
$self->_update_time_taken( $args{'time_taken'} );
}
- if ( RT->config->get('Usetransaction_batch') and $transaction ) {
+ if ( RT->config->get('use_transaction_batch') and $transaction ) {
push @{ $self->{_transaction_batch} }, $trans
if $args{'commit_scrips'};
}
Modified: rt/branches/3.999-DANGEROUS/t/test_config.yml
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/test_config.yml (original)
+++ rt/branches/3.999-DANGEROUS/t/test_config.yml Sun Feb 3 20:28:47 2008
@@ -1,4 +1,4 @@
---
framework:
- LogLevel: WARN
+ LogLevel: DEBUG
Modified: rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t Sun Feb 3 20:28:47 2008
@@ -12,7 +12,7 @@
my $queue = RT::Test->load_or_create_queue( name => 'Regression' );
ok $queue && $queue->id, 'loaded or created queue';
-RT->config->set( Usetransaction_batch => 1 );
+RT->config->set( use_transaction_batch => 1 );
my ($baseurl, $m) = RT::Test->started_ok;
ok $m->login, 'logged in as root';
@@ -25,7 +25,7 @@
$m->follow_link_ok( text => 'Scrips' );
$m->follow_link_ok( text => 'New scrip' );
$m->form_number(3);
- $m->field('Scrip-new-Description' => 'test');
+ $m->field('Scrip-new-Description' => 'On transaction, record updates');
$m->select('Scrip-new-scrip_condition' => 'On Transaction');
$m->select('Scrip-new-scrip_action' => 'User Defined');
$m->select('Scrip-new-Template' => 'Global template: Blank');
@@ -38,7 +38,7 @@
($sid) = ($m->content =~ /Scrip\s*#(\d+)/);
my $form = $m->form_number(3);
- is $m->value("Scrip-$sid-Description"), 'test', 'correct description';
+ is $m->value("Scrip-$sid-Description"), 'On transaction, record updates', 'correct description';
is value_name($form, "Scrip-$sid-scrip_condition"), 'On Transaction', 'correct condition';
is value_name($form, "Scrip-$sid-scrip_action"), 'User Defined', 'correct action';
is value_name($form, "Scrip-$sid-Template"), 'Global template: Blank', 'correct template';
@@ -46,10 +46,8 @@
use File::Temp qw(tempfile);
my ($tmp_fh, $tmp_fn) = tempfile();
-
my $code = <<END;
open my \$fh, '>', '$tmp_fn' or die "Couldn't open '$tmp_fn':\$!";
-
my \$batch = \$self->ticket_obj->transaction_batch;
unless ( \$batch && \@\$batch ) {
print \$fh "no batch\n";
@@ -63,19 +61,16 @@
$m->field( "Scrip-$sid-custom_commit_code" => $code );
$m->submit;
-
$m->goto_create_ticket( $queue );
$m->form_number(3);
$m->submit;
-
is_deeply parse_handle($tmp_fh), ['Create'], 'Create';
-
$m->follow_link_ok( text => 'Resolve' );
$m->form_number(3);
$m->field( "update_content" => 'resolve it' );
$m->click('SubmitTicket');
-
- is_deeply parse_handle($tmp_fh), ['comment', 'Status'], 'comment + Resolve';
+ $m->content_like(qr/Message recorded/);
+ is_deeply parse_handle($tmp_fh), ['comment', 'status'], 'comment + Resolve';
}
sub value_name {
More information about the Rt-commit
mailing list