[Rt-commit] r11767 - in rtir/branches/2.3-EXPERIMENTAL: html/RTIR/Elements

ruz at bestpractical.com ruz at bestpractical.com
Thu Apr 17 15:06:21 EDT 2008


Author: ruz
Date: Thu Apr 17 15:06:19 2008
New Revision: 11767

Modified:
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
   rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t
   rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t

Log:
* add Comment box on activation

Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs	Thu Apr 17 15:06:19 2008
@@ -200,7 +200,7 @@
             } elsif ( $Type eq 'Block' ) {
                 if ( ($Ticket->FirstCustomFieldValue('_RTIR_State')||'') ne 'active' ) {
                     $actions->{'Ab'} = {
-                        path  => "RTIR/Display.html?Status=open&id=$id",
+                        path  => "RTIR/Update.html?Action=Comment&DefaultStatus=open&id=$id",
                         title => loc('Activate')
                     };
                 }
@@ -223,7 +223,7 @@
         } else {
             if ( $Type eq 'Block' ) {
                 $actions->{'C'} = {
-                    path  => "RTIR/Display.html?Status=open&id=$id",
+                    path  => "RTIR/Update.html?Action=Comment&DefaultStatus=open&id=$id",
                     title => loc('Activate')
                 };
             } else {

Modified: rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/008-workflow-blocks.t	Thu Apr 17 15:06:19 2008
@@ -44,28 +44,40 @@
     ticket_state_is($agent, $block_id, $state);
 }
 
+diag "remove using edit";
+{
+    $agent->follow_link_ok({ text => "Edit" }, "Goto edit page");
+
+    # Tests to make sure the unwanted option 'Use system default()' does not appear as an
+    # option in the State field (a reported M3 bug)
+    $agent->content_unlike(qr{<option (?:value=.*)?>Use system default\(\)</option>}, "The option 'Use system default()' does not exist.");
 
-$agent->follow_link_ok({ text => "Edit" }, "Goto edit page");
+    $agent->form_number(3);
 
-# Tests to make sure the unwanted option 'Use system default()' does not appear as an
-# option in the State field (a reported M3 bug)
-$agent->content_unlike(qr{<option (?:value=.*)?>Use system default\(\)</option>}, "The option 'Use system default()' does not exist.");
-
-$agent->form_number(3);
-
-$agent->field(Status => 'resolved');
-$agent->click('SaveChanges');
-ticket_state_is($agent, $block_id, 'removed');
-$agent->has_tag('a', 'Activate', 'we have Activate action');
-
-$agent->follow_link_ok({ text => 'Activate' }, "Reactivate block");
-ticket_state_is($agent, $block_id, 'active');
-$agent->has_tag('a', 'Pending Removal', 'we have Pending Removal action tab');
-
-$agent->follow_link_ok({ text => 'Pending Removal' }, "Prepare block for remove");
-$agent->form_number(3);
-$agent->click('SubmitTicket');
-ticket_state_is($agent, $block_id, 'pending removal');
+    $agent->field(Status => 'resolved');
+    $agent->click('SaveChanges');
+    ticket_state_is($agent, $block_id, 'removed');
+}
+
+diag "reactivate the block using the link";
+{
+    $agent->has_tag('a', 'Activate', 'we have Activate action');
+    $agent->follow_link_ok({ text => 'Activate' }, "Reactivate block");
+
+    $agent->form_number(3);
+    $agent->field( UpdateContent => 'activating block' );
+    $agent->click('SubmitTicket');
+    ticket_state_is($agent, $block_id, 'active');
+}
+
+diag "prepare for removing using the link";
+{
+    $agent->has_tag('a', 'Pending Removal', 'we have Pending Removal action tab');
+    $agent->follow_link_ok({ text => 'Pending Removal' }, "Prepare block for remove");
+    $agent->form_number(3);
+    $agent->click('SubmitTicket');
+    ticket_state_is($agent, $block_id, 'pending removal');
+}
 
 diag "test activation after reply using 'Activate' link";
 {
@@ -81,6 +93,10 @@
 
     $agent->follow_link_ok({ text => 'Activate' }, "activate it");
 
+    $agent->form_number(3);
+    $agent->field( UpdateContent => 'activating block' );
+    $agent->click('SubmitTicket');
+
     ticket_state_is($agent, $block_id, 'active');
 }
 

Modified: rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/016-date-started.t	Thu Apr 17 15:06:19 2008
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 68;
+use Test::More tests => 69;
 
 require "t/rtir-test.pl";
 
@@ -99,6 +99,12 @@
     display_ticket($agent, $block_id);
     $agent->follow_link_ok({text => 'Activate'}, "activate it");
     is($agent->status, 200, "request successful");
+
+    $agent->form_number(3);
+    $agent->field( UpdateContent => 'activating block' );
+    $agent->click('SubmitTicket');
+    is($agent->status, 200, "request successful");
+
     DBIx::SearchBuilder::Record::Cachable::FlushCache();
 
     $block = RT::Ticket->new( $RT::SystemUser );


More information about the Rt-commit mailing list