Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Commit

rt branch, create-action, updated. efc48f761a76977cddd6c96a707af873576afb7c

 

 

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded


sartak at bestpractical

Nov 17, 2009, 12:28 PM

Post #1 of 1 (296 views)
Permalink
rt branch, create-action, updated. efc48f761a76977cddd6c96a707af873576afb7c

The branch, create-action has been updated
via efc48f761a76977cddd6c96a707af873576afb7c (commit)
via 0a66991d71d03734c7afa9723d0934a577446ee9 (commit)
from 11cc35ab8ae5201e3835415fa127382d0e7ee6e2 (commit)

Summary of changes:
lib/RT/Action/CreateTicket.pm | 3 ++-
t/web/ticket_owner.t | 19 ++++++++++---------
2 files changed, 12 insertions(+), 10 deletions(-)

- Log -----------------------------------------------------------------
commit 0a66991d71d03734c7afa9723d0934a577446ee9
Author: Shawn M Moore <sartak [at] bestpractical>
Date: Tue Nov 17 15:27:30 2009 -0500

Include queue in the create message

diff --git a/lib/RT/Action/CreateTicket.pm b/lib/RT/Action/CreateTicket.pm
index b733a15..a36d94f 100644
--- a/lib/RT/Action/CreateTicket.pm
+++ b/lib/RT/Action/CreateTicket.pm
@@ -192,7 +192,8 @@ sub set_final_priority {
sub report_success {
my $self = shift;
my $id = $self->record->id;
- $self->result->message(_("Created ticket #%1", $id));
+ my $queue = $self->record->queue->name;
+ $self->result->message(_("Created ticket #%1 in queue %2", $id, $queue));
}

sub add_ticket_custom_fields {

commit efc48f761a76977cddd6c96a707af873576afb7c
Author: Shawn M Moore <sartak [at] bestpractical>
Date: Tue Nov 17 15:27:40 2009 -0500

Another Jiftyfied test

diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index 67521d2..97800db 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -45,9 +45,8 @@ diag "current user has no right to own, nobody selected as owner on create" if $
ok !grep($_ == $user_a->id, $owner_field->possible_values),
'user A can not own tickets';
$agent_a->submit;
-
- $agent_a->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
- my ($id) = ($agent_a->content =~ /Ticket (\d+) created in queue/);
+ $agent_a->content_like(qr/Created ticket #\d+ in queue/i, 'created ticket');
+ my ($id) = ($agent_a->content =~ /Created ticket #(\d+) in queue/);
ok $id, 'found id of the ticket';
my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
$ticket->load( $id );
@@ -63,16 +62,18 @@ diag "user can chose owner of a new ticket" if $ENV{TEST_VERBOSE};
$agent_a->submit;

$agent_a->content_like(qr/Create a new ticket/i, 'opened create ticket page');
- my $form = $agent_a->form_name('ticket_create');
- is $form->value('owner'), RT->nobody->id, 'correct owner selected';
+ my $moniker = $agent_a->moniker_for('RT::Action::CreateTicket');
+ my $owner_field = $agent_a->action_field_input($moniker, 'owner');
+
+ is $owner_field->value, RT->nobody->id, 'correct owner selected';

- ok grep($_ == $user_b->id, $form->find_input('owner')->possible_values),
+ ok grep($_ == $user_b->id, $owner_field->possible_values),
'user B is listed as potential owner';
- $agent_a->select('owner', $user_b->id);
+ $owner_field->value($user_b->id);
$agent_a->submit;

- $agent_a->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
- my ($id) = ($agent_a->content =~ /Ticket (\d+) created in queue/);
+ $agent_a->content_like(qr/Created ticket #\d+ in queue/i, 'created ticket');
+ my ($id) = ($agent_a->content =~ /Created ticket #(\d+) in queue/);
ok $id, 'found id of the ticket';

my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );

-----------------------------------------------------------------------
_______________________________________________
Rt-commit mailing list
Rt-commit [at] lists
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.