[Rt-commit] rt branch, create-action, updated. 452d508d860fe06788862f4cfe69a38803abec80
sartak at bestpractical.com
sartak at bestpractical.com
Tue Nov 17 14:53:43 EST 2009
The branch, create-action has been updated
via 452d508d860fe06788862f4cfe69a38803abec80 (commit)
via fddfea5fc62409b1942638888872c8c49b69bbcc (commit)
from 39a98cd7a90e9dbba6d7139c89cdfdf73974606d (commit)
Summary of changes:
lib/RT/Action/CreateTicket.pm | 3 ++-
t/web/cf_access.t | 8 ++++----
2 files changed, 6 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit fddfea5fc62409b1942638888872c8c49b69bbcc
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Nov 17 14:53:01 2009 -0500
Better ticket creation message
diff --git a/lib/RT/Action/CreateTicket.pm b/lib/RT/Action/CreateTicket.pm
index 85cb432..b733a15 100644
--- a/lib/RT/Action/CreateTicket.pm
+++ b/lib/RT/Action/CreateTicket.pm
@@ -191,7 +191,8 @@ sub set_final_priority {
sub report_success {
my $self = shift;
- $self->result->message(_("Your ticket has been created!"));
+ my $id = $self->record->id;
+ $self->result->message(_("Created ticket #%1", $id));
}
sub add_ticket_custom_fields {
commit 452d508d860fe06788862f4cfe69a38803abec80
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Nov 17 14:53:27 2009 -0500
Expect the new ticket create message in cf_access.t
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index ccaa58f..86da590 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -87,7 +87,7 @@ diag "check that we have no the CF on the create"
form_name => "ticket_create",
fields => { subject => 'test' },
);
- $m->content_like(qr/Ticket \d+ created/, "a ticket is Created succesfully");
+ $m->content_like(qr/Created ticket #\d+/, "a ticket is Created succesfully");
$m->content_unlike(qr/img:/, 'has no img field on the page');
$m->follow_link( text => 'Custom Fields');
@@ -117,7 +117,7 @@ diag "check that we have no the CF on the create"
form_name => "ticket_create",
fields => { subject => 'test' },
);
- $tid = $1 if $m->content =~ /Ticket (\d+) created/i;
+ $tid = $1 if $m->content =~ /Created ticket #(\d+)/;
ok $tid, "a ticket is Created succesfully";
$m->follow_link( text => 'Custom Fields' );
@@ -149,9 +149,9 @@ diag "create a ticket with an image" if $ENV{'TEST_VERBOSE'};
},
);
- $m->content_like(qr/Ticket \d+ created/, "a ticket is Created succesfully");
+ $m->content_like(qr/Created ticket #\d+/, "a ticket is Created succesfully");
- $tid = $1 if $m->content =~ /Ticket (\d+) created/;
+ $tid = $1 if $m->content =~ /Created ticket #(\d+)/;
$m->title_like(qr/testing img cf creation/, "its title is the subject");
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list