[Rt-commit] rt branch, 4.2-on-4.0/different-result-msg-for-comment-reply, created. rt-4.0.13-49-ga578599
? sunnavy
sunnavy at bestpractical.com
Mon Jan 6 11:55:11 EST 2014
The branch, 4.2-on-4.0/different-result-msg-for-comment-reply has been created
at a578599fbe2914a57e5eff07fba1dde5c265767a (commit)
- Log -----------------------------------------------------------------
commit a578599fbe2914a57e5eff07fba1dde5c265767a
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu May 30 17:32:57 2013 +0400
return different message for comment and reply
Old "message recorded" is confusing as it doesn't differentiate
between correspond and comment.
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 5acdb31..08c3ef9 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -2318,7 +2318,14 @@ sub _RecordNote {
return ( $Trans, $self->loc("Message could not be recorded"), undef );
}
- return ( $Trans, $self->loc("Message recorded"), $TransObj );
+=for loc
+
+ "Comments added" # loc
+ "Correspondence added" # loc
+
+=cut
+
+ return ( $Trans, $self->loc( $args{'NoteType'} eq 'Comment' ? 'Comments added' : 'Correspondence added' ), $TransObj );
}
diff --git a/t/web/command_line.t b/t/web/command_line.t
index 7c444f4..07df38c 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -111,11 +111,11 @@ ok($val,$msg);
# add a comment to ticket
expect_send("comment -m 'comment-$$' $ticket_id", "Adding a comment...");
- expect_like(qr/Message recorded/, "Added the comment");
+ expect_like(qr/Comments added/, "Added the comment");
### should test to make sure it actually got added
# add correspondance to ticket (?)
expect_send("correspond -m 'correspond-$$' $ticket_id", "Adding correspondence...");
- expect_like(qr/Message recorded/, "Added the correspondence");
+ expect_like(qr/Correspondence added/, "Added the correspondence");
### should test to make sure it actually got added
my $test_email = RT::Test::get_relocatable_file('lorem-ipsum',
@@ -522,7 +522,7 @@ sub check_attachment {
my $attachment_path = shift;
(my $filename = $attachment_path) =~ s/.*\/(.*)$/$1/;
expect_send("comment -m 'attach file' -a $attachment_path $ticket_id", "Adding an attachment ($filename)");
- expect_like(qr/Message recorded/, "Added the attachment");
+ expect_like(qr/Comments added/, "Added the attachment");
expect_send("show ticket/$ticket_id/attachments","Finding Attachment");
my $attachment_regex = qr/(\d+):\s+$filename/;
expect_like($attachment_regex,"Attachment Uploaded");
diff --git a/t/web/ticket_modify_all.t b/t/web/ticket_modify_all.t
index 6d19b28..91c3798 100644
--- a/t/web/ticket_modify_all.t
+++ b/t/web/ticket_modify_all.t
@@ -19,7 +19,7 @@ $m->submit_form(
button => 'SubmitTicket',
);
-$m->content_contains("Message recorded", 'updated ticket');
+$m->content_contains("Comments added", 'updated ticket');
$m->content_lacks("this is update content", 'textarea is clear');
$m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list