[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.6-227-gd937941

? sunnavy sunnavy at bestpractical.com
Tue Nov 30 02:05:47 EST 2010


The branch, 3.9-trunk has been updated
       via  d9379418fe0feb08f8446d89fac789ea9bebab3f (commit)
      from  2d4853fe15cc1ebd554440b1935899bc6c967a83 (commit)

Summary of changes:
 share/html/Ticket/ModifyAll.html |    2 +-
 t/web/ticket_modify_all.t        |   29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 t/web/ticket_modify_all.t

- Log -----------------------------------------------------------------
commit d9379418fe0feb08f8446d89fac789ea9bebab3f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 30 15:04:30 2010 +0800

    should clear the message box if the message is recorded already

diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index 17b1e94..2822072 100755
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -110,7 +110,7 @@
   <tr>
     <td class="labeltop"><&|/l&>Content</&>:</td>
     <td class="entry">
-% if (defined $ARGS{UpdateContent} && length($ARGS{UpdateContent})) {
+% if (defined $ARGS{UpdateContent} && length($ARGS{UpdateContent} && !grep { /Message recorded/ } @results )) {
     <& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0 &>
 % } else {
     <& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
diff --git a/t/web/ticket_modify_all.t b/t/web/ticket_modify_all.t
new file mode 100644
index 0000000..2330021
--- /dev/null
+++ b/t/web/ticket_modify_all.t
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+
+use RT::Test tests => 9;
+
+my $ticket = RT::Test->create_ticket(
+    Subject => 'test bulk update',
+    Queue   => 'General',
+);
+
+my ( $url, $m ) = RT::Test->started_ok;
+ok( $m->login, 'logged in' );
+
+$m->get_ok( $url . "/Ticket/ModifyAll.html?id=" . $ticket->id );
+
+$m->submit_form(
+    form_number => 3,
+    fields      => { 'UpdateContent' => 'this is update content' },
+    button      => 'SubmitTicket',
+);
+
+$m->content_contains("Message recorded", 'updated ticket');
+$m->content_lacks("this is update content", 'textarea is clear');
+
+$m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id );
+$m->content_contains("this is update content", 'updated content in display page');
+
+# XXX TODO test other parts, i.e. basic, dates, people and links
+

-----------------------------------------------------------------------


More information about the Rt-commit mailing list