[Rt-commit] rt branch, 4.2/skip-validating-unsubmitted-cfs, created. rt-4.1.5-156-gf199ff8

Thomas Sibley trs at bestpractical.com
Wed Dec 26 14:14:48 EST 2012


The branch, 4.2/skip-validating-unsubmitted-cfs has been created
        at  f199ff83de2ca16967e66aedab16d3db6a479ad0 (commit)

- Log -----------------------------------------------------------------
commit 80b777fb852325e28d5c21dbaaa9206745a71930
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Dec 20 13:01:20 2012 -0800

    Skip CF validation for empty fields which aren't submitted with "Magic"
    
    If a CF value is not submitted and the "Magic" marker is also missing,
    skip validation.  The most likely trigger for this is a link containing
    only core field query parameters submitted to a page which processes
    both core fields and CFs.  By skipping validation in this case, we avoid
    nonsensical errors.

diff --git a/share/html/Elements/ValidateCustomFields b/share/html/Elements/ValidateCustomFields
index ca2be2a..757611e 100644
--- a/share/html/Elements/ValidateCustomFields
+++ b/share/html/Elements/ValidateCustomFields
@@ -56,6 +56,12 @@ while ( my $CF = $CustomFields->Next ) {
     # Pick the first grouping
     $submitted = $submitted ? $submitted->{(keys %$submitted)[0]} : {};
 
+    # If we don't have a value and we don't see the Magic, then we're not
+    # submitting a field.
+    next if not exists $submitted->{"Value"}
+        and not exists $submitted->{"Values"}
+        and not $submitted->{"Values-Magic"};
+
     # We only validate Single Combos -- multis can never be user input
     next if $submitted->{"Values-Magic"} and exists $submitted->{"Values"}
         and ref $submitted->{"Values"};

commit eeb10ae030b1fa125331dc7af96f6f0a08673ca3
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 18:14:48 2012 -0800

    Failing tests demonstrating the disappearance of CF validation hints
    
    Validating only submitted CFs (80b777f) broke pages which relied on
    pre-validating to populate the CF "hints".

diff --git a/t/web/cf_pattern.t b/t/web/cf_pattern.t
new file mode 100644
index 0000000..6c73a93
--- /dev/null
+++ b/t/web/cf_pattern.t
@@ -0,0 +1,59 @@
+use strict;
+use warnings;
+
+use RT::Test tests => 'no_declare';
+
+my ($base, $m) = RT::Test->started_ok;
+
+my $cf = RT::Test->load_or_create_custom_field(
+    Name        => 'Yaks',
+    Type        => 'FreeformSingle',
+    Pattern     => '(?#Digits)^\d+$',
+    Queue       => 0,
+    LookupType  => 'RT::Queue-RT::Ticket',
+);
+ok $cf && $cf->id, "Created CF with Pattern";
+
+my $ticket = RT::Test->create_ticket(
+    Queue   => 1,
+    Subject => 'a test ticket',
+);
+ok $ticket && $ticket->id, "Created ticket";
+
+$m->login;
+
+for my $page ("/Ticket/Create.html?Queue=1", "/Ticket/Modify.html?id=".$ticket->id) {
+    $m->get_ok($page, "Fetched $page");
+    $m->content_contains("Yaks");
+    $m->content_contains("Input must match [Digits]");
+    $m->content_lacks("cfinvalidfield");
+
+    my $cfinput = join "-", "Object", "RT::Ticket", ($page =~ /Create/ ? "" : $ticket->id),
+                            "CustomField", $cf->id, "Value";
+    $m->submit_form_ok({
+        with_fields => {
+            $cfinput            => "too many",
+            "${cfinput}s-Magic" => "1",
+        },
+    });
+    $m->content_contains("Input must match [Digits]");
+    $m->content_contains("cfinvalidfield");
+
+    $m->submit_form_ok({
+        with_fields => {
+            $cfinput            => "42",
+            "${cfinput}s-Magic" => "1",
+        },
+    });
+
+    if ($page =~ /Create/) {
+        $m->content_like(qr/Ticket \d+ created/, "Created ticket");
+    } else {
+        $m->content_contains("Yaks 42 added", "Updated ticket");
+        $m->content_contains("Input must match [Digits]");
+        $m->content_lacks("cfinvalidfield");
+    }
+}
+
+undef $m;
+done_testing;

commit 739ff3f6a2e9ab28e8e9b04eeba8131900a5aaf2
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 18:17:54 2012 -0800

    Show custom field input hints (FriendlyPattern) when editing
    
    Defaults on for usability: it's nicer to note what format to use before
    submitting, rather than rejecting after submission.  The hint message is
    the same as the validation message at the moment (but could change in
    the future), except it renders in black instead of red.  If invalid
    input is nevertheless submitted, the error (in red) is shown instead of
    the hint.
    
    This makes t/web/cf_pattern.t pass for ticket creation, but the modify
    pages still need further fixing.
    
    Adjusts t/web/cf_groupings.t to ensure it matches the result messages
    and not the newly added CF hints.

diff --git a/share/html/Elements/EditCustomFields b/share/html/Elements/EditCustomFields
index 8964315..8d97b40 100644
--- a/share/html/Elements/EditCustomFields
+++ b/share/html/Elements/EditCustomFields
@@ -69,6 +69,11 @@
 %  if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
         <br />
         <span class="cfinvalidfield"><% $msg %></span>
+%  } elsif ($ShowHints and $CustomField->FriendlyPattern) {
+        <br>
+        <span class="cfhints">
+          <&|/l, $CustomField->FriendlyPattern &>Input must match [_1]</&>
+        </span>
 %  }
     </<% $CELL %>>
   </<% $FIELD %>>
@@ -106,4 +111,5 @@ $CustomFields => undef
 $Grouping     => undef
 $AsTable => 1
 $InTable => 0
+$ShowHints => 1
 </%ARGS>
diff --git a/t/web/cf_groupings.t b/t/web/cf_groupings.t
index 73a07e5..f841d62 100644
--- a/t/web/cf_groupings.t
+++ b/t/web/cf_groupings.t
@@ -90,7 +90,7 @@ my $id = $m->get_ticket_id;
                 with_fields => { $input_name => "bad value" },
                 button      => 'SubmitTicket',
             });
-            $m->content_like(qr{Input must match});
+            $m->content_like(qr{Could not add new custom field value: Input must match});
         }
     }
 
@@ -110,7 +110,7 @@ my $id = $m->get_ticket_id;
             with_fields => { $input_name => "bad value" },
             button      => 'SubmitTicket',
         });
-        $m->content_like(qr{Input must match});
+        $m->content_like(qr{Could not add new custom field value: Input must match});
     }
 }
 

commit 2ae9a2873bd336f93029f5cc84ebe936498448a7
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 18:22:56 2012 -0800

    Validate submitted CFs on the ticket modify pages
    
    Previously ValidateCustomFields was run with an empty argument set and
    an unloaded ticket object (the default).  This provided only field
    hints, without actually validating submitted values.
    
    Since hints are now handled via EditCustomFields itself, switch to
    validating submitted CFs.  This switch has the advantage of only marking
    invalid the fields which actually contain invalid values, the upshot of
    which is less glaring red text on initial page load.
    
    Since %ARGS is now used, the callsites moved to place them after
    callbacks which may modify %ARGS.  This ensures that CF validation will
    match any validation errors ProcessObjectCustomFieldUpdates() returns.

diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
index bc42f7e..6ed5eaa 100644
--- a/share/html/Ticket/Modify.html
+++ b/share/html/Ticket/Modify.html
@@ -70,16 +70,16 @@
 my $TicketObj = LoadTicket($id);
 my $CustomFields = $TicketObj->CustomFields;
 
-# call this to show up hints of valid cf values.
+# Now let callbacks have a chance at editing %ARGS
+$m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS );
+
 $m->comp(
     '/Elements/ValidateCustomFields',
+    Object       => $TicketObj,
     CustomFields => $CustomFields,
-    ARGSRef => {},
+    ARGSRef      => \%ARGS,
 );
 
-# Now let callbacks have a chance at editing %ARGS
-$m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS );
-
 my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
 push @results, ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
 
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index 5143925..3e204bb 100644
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -136,13 +136,6 @@
 my $Ticket = LoadTicket($id);
 my $CustomFields = $Ticket->CustomFields;
 
-# call this to show up hints of valid cf values.
-$m->comp(
-    '/Elements/ValidateCustomFields',
-    CustomFields => $CustomFields,
-    ARGSRef => {},
-);
-
 my $CanRespond = 0;
 my $CanComment = 0;
 
@@ -181,6 +174,14 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
 
 
 $m->callback( TicketObj => $Ticket, ARGSRef => \%ARGS );
+
+$m->comp(
+    '/Elements/ValidateCustomFields',
+    Object       => $Ticket,
+    CustomFields => $CustomFields,
+    ARGSRef      => \%ARGS,
+);
+
 my @results;
 
 unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} ) {

commit 16ddc81c786690c5534074c08ca455ec8cea9a4b
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 19:08:58 2012 -0800

    Skip all updates and provide better messages if CF validation fails
    
    The ticket Basics and Jumbo pages now skip all updates if CFs don't
    validate instead of partially updating and partially failing.  This
    requires preserving submitted values across requests for the basic core
    ticket fields (which previously were not preserved on error).  Both of
    these historically different pages now match the standard update page
    behaviour.
    
    These two pages were skipped over by bc25369 and 4c4e118.
    
    Adjusts t/web/cf_groupings.t to reload the Basics page to avoid leftover
    values since form values now persist.

diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
index 6ed5eaa..52bf096 100644
--- a/share/html/Ticket/Modify.html
+++ b/share/html/Ticket/Modify.html
@@ -56,7 +56,7 @@
 <input type="hidden" class="hidden" name="id" value="<% $TicketObj->Id %>" />
 
 <&| /Widgets/TitleBox, title => loc('Modify ticket #[_1]',$TicketObj->Id), class=>'ticket-info-basics' &>
-<& Elements/EditBasics, TicketObj => $TicketObj &>
+<& Elements/EditBasics, TicketObj => $TicketObj, defaults => \%ARGS &>
 <& /Elements/EditCustomFields, Object => $TicketObj, DefaultsFromTopArguments => 0, Grouping => 'Basics' &>
 </&>
 % $m->callback( CallbackName => 'AfterBasics', Ticket => $TicketObj );
@@ -70,20 +70,31 @@
 my $TicketObj = LoadTicket($id);
 my $CustomFields = $TicketObj->CustomFields;
 
+my @results;
+my $skip_update = 0;
+
 # Now let callbacks have a chance at editing %ARGS
-$m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS );
+$m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS, skip_update => \$skip_update );
 
-$m->comp(
-    '/Elements/ValidateCustomFields',
-    Object       => $TicketObj,
-    CustomFields => $CustomFields,
-    ARGSRef      => \%ARGS,
-);
+{
+    my ($status, @msg) = $m->comp(
+        '/Elements/ValidateCustomFields',
+        Object       => $TicketObj,
+        CustomFields => $CustomFields,
+        ARGSRef      => \%ARGS,
+    );
+    unless ($status) {
+        push @results, @msg;
+        $skip_update = 1;
+    }
+}
 
-my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
-push @results, ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
+unless ($skip_update) {
+    push @results, ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
+    push @results, ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
 
-$TicketObj->ApplyTransactionBatch;
+    $TicketObj->ApplyTransactionBatch;
+}
 
 unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
     if (@results) {
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index 3e204bb..2d26ec7 100644
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -56,7 +56,7 @@
 <input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
 
 <&| /Widgets/TitleBox, title => loc('Modify ticket # [_1]', $Ticket->Id), class=>'ticket-info-basics' &>
-<& Elements/EditBasics, TicketObj => $Ticket &>
+<& Elements/EditBasics, TicketObj => $Ticket, defaults => \%ARGS &>
 <& /Elements/EditCustomFields, Object => $Ticket, Grouping => 'Basics' &>
 </&>
 
@@ -173,33 +173,38 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
 }
 
 
-$m->callback( TicketObj => $Ticket, ARGSRef => \%ARGS );
-
-$m->comp(
-    '/Elements/ValidateCustomFields',
-    Object       => $Ticket,
-    CustomFields => $CustomFields,
-    ARGSRef      => \%ARGS,
-);
-
 my @results;
+my $skip_update = 0;
+$m->callback( TicketObj => $Ticket, ARGSRef => \%ARGS, skip_update => \$skip_update );
+
+{
+    my ($status, @msg) = $m->comp(
+        '/Elements/ValidateCustomFields',
+        Object       => $Ticket,
+        CustomFields => $CustomFields,
+        ARGSRef      => \%ARGS,
+    );
+    unless ($status) {
+        push @results, @msg;
+        $skip_update = 1;
+    }
+}
 
-unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} ) {
-    # There might be two owners. 
-    if ( ref ($ARGS{'Owner'} )) {
-        my @owners =@{$ARGS{'Owner'}};
-        delete $ARGS{'Owner'};
-        foreach my $owner(@owners){
-            if (defined($owner) && $owner =~ /\D/) {
-                $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->Name eq $owner);
-            }
-            elsif (length $owner) {
-                $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->id == $owner);
-            }
+# There might be two owners.
+if ( ref ($ARGS{'Owner'} )) {
+    my @owners =@{$ARGS{'Owner'}};
+    delete $ARGS{'Owner'};
+    foreach my $owner(@owners){
+        if (defined($owner) && $owner =~ /\D/) {
+            $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->Name eq $owner);
+        }
+        elsif (length $owner) {
+            $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->id == $owner);
         }
-
     }
+}
 
+unless ($skip_update or $OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} ) {
     push @results, ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
     push @results, ProcessObjectCustomFieldUpdates( Object => $Ticket, ARGSRef => \%ARGS);
     push @results, ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
@@ -212,15 +217,15 @@ unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} )
 
     push @results, ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS );
     push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
-}
 
-$Ticket->ApplyTransactionBatch;
+    $Ticket->ApplyTransactionBatch;
 
-MaybeRedirectForResults(
-    Actions   => \@results,
-    Path      => "/Ticket/ModifyAll.html",
-    Arguments => { id => $Ticket->id },
-);
+    MaybeRedirectForResults(
+        Actions   => \@results,
+        Path      => "/Ticket/ModifyAll.html",
+        Arguments => { id => $Ticket->id },
+    );
+}
 
 # If they've gone and moved the ticket to somewhere they can't see, etc...
 unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
diff --git a/t/web/cf_groupings.t b/t/web/cf_groupings.t
index f841d62..a59cd99 100644
--- a/t/web/cf_groupings.t
+++ b/t/web/cf_groupings.t
@@ -73,10 +73,11 @@ my $id = $m->get_ticket_id;
     note "testing Basics/People/Dates/Links pages";
     my $prefix = 'Object-RT::Ticket-'. $id .'-CustomField:';
     { # Basics and More both show up on "Basics"
-        $m->follow_link_ok({id => 'page-basics'}, 'Ticket -> Basics');
-        is $m->dom->find(qq{input[name^="$prefix"][name\$="-Value"]})->size, 2,
-            "two CF inputs on the page";
         for my $name (qw/Basics More/) {
+            $m->follow_link_ok({id => 'page-basics'}, 'Ticket -> Basics');
+            is $m->dom->find(qq{input[name^="$prefix"][name\$="-Value"]})->size, 2,
+                "two CF inputs on the page";
+
             my $input_name = "$prefix$name-$CF{$name}-Value";
             ok $m->dom->at(qq{$location{$name} input[name="$input_name"]}),
                 "CF is in the right place";
@@ -90,7 +91,7 @@ my $id = $m->get_ticket_id;
                 with_fields => { $input_name => "bad value" },
                 button      => 'SubmitTicket',
             });
-            $m->content_like(qr{Could not add new custom field value: Input must match});
+            $m->content_like(qr{Test\Q$name\E: Input must match});
         }
     }
 

commit 8bdefd24c49351065d38f78a6ec896eeea129277
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 19:31:22 2012 -0800

    Failing tests demonstrating that required CFs block quick create

diff --git a/t/web/cf_pattern.t b/t/web/cf_pattern.t
index 6c73a93..a6fc199 100644
--- a/t/web/cf_pattern.t
+++ b/t/web/cf_pattern.t
@@ -23,6 +23,7 @@ ok $ticket && $ticket->id, "Created ticket";
 $m->login;
 
 for my $page ("/Ticket/Create.html?Queue=1", "/Ticket/Modify.html?id=".$ticket->id) {
+    diag $page;
     $m->get_ok($page, "Fetched $page");
     $m->content_contains("Yaks");
     $m->content_contains("Input must match [Digits]");
@@ -55,5 +56,19 @@ for my $page ("/Ticket/Create.html?Queue=1", "/Ticket/Modify.html?id=".$ticket->
     }
 }
 
+diag "Quick ticket creation";
+{
+    $m->get_ok("/");
+    $m->submit_form_ok({
+        with_fields => {
+            Subject     => "test quick create",
+            QuickCreate => 1,
+        },
+    });
+    my $tickets = RT::Tickets->new(RT->SystemUser);
+    $tickets->FromSQL("Subject = 'test quick create'");
+    is $tickets->Count, 0, "No ticket created";
+}
+
 undef $m;
 done_testing;

commit d8bc279d0e17a2a600ff117ecfe05689bd0bd5a9
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 19:32:34 2012 -0800

    Validate even unsubmitted CFs when quick creating
    
    Quick ticket creation relies on validating unsubmitted CFs to determine
    if quick create should be allowed or not.

diff --git a/share/html/Elements/ValidateCustomFields b/share/html/Elements/ValidateCustomFields
index 757611e..a79f643 100644
--- a/share/html/Elements/ValidateCustomFields
+++ b/share/html/Elements/ValidateCustomFields
@@ -58,7 +58,8 @@ while ( my $CF = $CustomFields->Next ) {
 
     # If we don't have a value and we don't see the Magic, then we're not
     # submitting a field.
-    next if not exists $submitted->{"Value"}
+    next if not $ValidateUnsubmitted
+        and not exists $submitted->{"Value"}
         and not exists $submitted->{"Values"}
         and not $submitted->{"Values-Magic"};
 
@@ -115,4 +116,5 @@ return wantarray? ($valid, @res): $valid;
 $Object => RT::Ticket->new( $session{'CurrentUser'})
 $CustomFields
 $ARGSRef
+$ValidateUnsubmitted => 0
 </%ARGS>
diff --git a/share/html/index.html b/share/html/index.html
index 523697b..15c346b 100644
--- a/share/html/index.html
+++ b/share/html/index.html
@@ -97,8 +97,9 @@ if ( $ARGS{'QuickCreate'} ) {
     
     my $ValidCFs = $m->comp(
         '/Elements/ValidateCustomFields',
-        CustomFields => $CFs,
-        ARGSRef => \%ARGS
+        CustomFields        => $CFs,
+        ARGSRef             => \%ARGS,
+        ValidateUnsubmitted => 1,
     );
 
 

commit f199ff83de2ca16967e66aedab16d3db6a479ad0
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Dec 24 19:33:44 2012 -0800

    Redirect to the full ticket create page instead of erroring when CFs are required
    
    It's much more friendly to simply redirect users to the page they need
    to be on, with their already submitted data prefilled.  This lets them
    just fill in the few required CFs and go on their way as quickly as
    possible (which is the whole point of quick create anyway!).

diff --git a/share/html/index.html b/share/html/index.html
index 15c346b..066252b 100644
--- a/share/html/index.html
+++ b/share/html/index.html
@@ -95,7 +95,7 @@ if ( $ARGS{'QuickCreate'} ) {
     
     my $CFs = $QueueObj->TicketCustomFields();
     
-    my $ValidCFs = $m->comp(
+    my ($ValidCFs, @msg) = $m->comp(
         '/Elements/ValidateCustomFields',
         CustomFields        => $CFs,
         ARGSRef             => \%ARGS,
@@ -122,11 +122,25 @@ if ( $ARGS{'QuickCreate'} ) {
                 Arguments => { id => $t->Id },
             );
         }
-
     }
     elsif ( !$ValidCFs ) {
-        push @results, "can't quickly create ticket in queue " .
-            $QueueObj->Name . ' because some custom fields need to be set, please go to normal ticket creation page to do that.';
+        push @results, loc("Can't quickly create ticket in queue [_1] because custom fields are required.  Please finish by using the normal ticket creation page.", $QueueObj->Name);
+        push @results, @msg;
+
+        MaybeRedirectForResults(
+            Actions     => \@results,
+            Path        => "/Ticket/Create.html",
+            Arguments   => {
+                (map { $_ => $ARGS{$_} } qw(Queue Owner Status Content Subject)),
+                Requestors => $ARGS{Requestors},
+                # From is set above when CFs are OK, but not here since we're
+                # not calling CreateTicket() directly.  The proper place to set
+                # a default for From, if desired in the future, is in
+                # CreateTicket() itself, or at least /Ticket/Display.html
+                # (which processes /Ticket/Create.html).  From is rarely used
+                # overall.
+            },
+        );
     }
     MaybeRedirectForResults(
         Actions   => \@results,
diff --git a/t/web/cf_pattern.t b/t/web/cf_pattern.t
index a6fc199..b99df03 100644
--- a/t/web/cf_pattern.t
+++ b/t/web/cf_pattern.t
@@ -68,6 +68,10 @@ diag "Quick ticket creation";
     my $tickets = RT::Tickets->new(RT->SystemUser);
     $tickets->FromSQL("Subject = 'test quick create'");
     is $tickets->Count, 0, "No ticket created";
+
+    like $m->uri, qr/Ticket\/Create\.html/, "Redirected to the ticket create page";
+    $m->content_contains("Yaks: Input must match", "Found CF validation error");
+    $m->content_contains("test quick create", "Found prefilled Subject");
 }
 
 undef $m;

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


More information about the Rt-commit mailing list