[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-141-ga72ae44

Kevin Falcone falcone at bestpractical.com
Fri Aug 27 10:40:21 EDT 2010


The branch, 3.8-trunk has been updated
       via  a72ae4420483352a08d0ecb7ea656b86e979f7f5 (commit)
       via  d9942645b83239801c85a0b5a8ae5ad91539dd20 (commit)
      from  16002dcc842fb7042f83a9c72dc5cbba94183e57 (commit)

Summary of changes:
 share/html/Ticket/Update.html |    5 ++++-
 share/html/index.html         |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit d9942645b83239801c85a0b5a8ae5ad91539dd20
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Aug 26 16:10:53 2010 -0400

    Create a BeforeUpdate callback
    
    Allow a developer to stop ticket updates based on unmet ticket conditions

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 694d9ef..beca4c1 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -277,8 +277,11 @@ if ( $ARGS{'SubmitTicket'} ) {
         $ARGS{ $field } = join ', ', map $_->format, grep defined, @emails;
     }
 }
+my $skip_update = 0;
+$m->callback( CallbackName => 'BeforeUpdate', ARGSRef => \%ARGS, skip_update => \$skip_update,
+              checks_failure => $checks_failure, results => \@results, TicketObj => $TicketObj );
 
-if ( !$checks_failure && exists $ARGS{SubmitTicket} ) {
+if ( !$checks_failure && !$skip_update && exists $ARGS{SubmitTicket} ) {
     $m->callback( Ticket => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'BeforeDisplay' );
     return $m->comp('Display.html', TicketObj => $TicketObj, %ARGS);
 }

commit a72ae4420483352a08d0ecb7ea656b86e979f7f5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Aug 26 16:37:16 2010 -0400

    Respect the passed in value before deciding the ticket should be new

diff --git a/share/html/index.html b/share/html/index.html
index 4765b7c..4b29078 100755
--- a/share/html/index.html
+++ b/share/html/index.html
@@ -109,7 +109,7 @@ if ( $ARGS{'QuickCreate'} ) {
         my ($t, $msg) = CreateTicket( 
                         Queue => $ARGS{'Queue'},
                         Owner => $ARGS{'Owner'},
-                        Status => 'new',
+                        Status => $ARGS{'Status'}||'new',
                         # yes! it's Requestors, not Requestor
                         Requestors => $ARGS{'Requestors'},
                         From => $session{'CurrentUser'}->EmailAddress,

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


More information about the Rt-commit mailing list