[Rt-commit] rt branch 5.0/call-validatecustomfields-in-ticket-display created. rt-5.0.2-221-gfb327920c5

BPS Git Server git at git.bestpractical.com
Thu May 5 16:02:30 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/call-validatecustomfields-in-ticket-display has been created
        at  fb327920c519827080c3d6ed746085d9449c0bd1 (commit)

- Log -----------------------------------------------------------------
commit fb327920c519827080c3d6ed746085d9449c0bd1
Author: Brad Embree <brad at bestpractical.com>
Date:   Thu May 5 09:00:44 2022 -0700

    Call ValidateCustomFields in Ticket/Display.html
    
    To validate custom field changes in inline edits on Ticket/Display.html call ValidateCustomFields.
    
    See ticket 247402.

diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index a878a56c3e..bd96cbd2aa 100644
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -155,6 +155,18 @@ if ($ARGS{'id'} eq 'new') {
 
     my $SkipProcessing;
 
+    my $CustomFields = $TicketObj->CustomFields;
+    my ($status, @msg) = $m->comp(
+        '/Elements/ValidateCustomFields',
+        Object       => $TicketObj,
+        CustomFields => $CustomFields,
+        ARGSRef      => \%ARGS,
+    );
+    unless ($status) {
+        push @Actions, @msg;
+        $SkipProcessing = 1;
+    }
+
     $TicketObj->Atomic(sub{
         $m->callback( CallbackName => 'BeforeProcessArguments',
             TicketObj => $TicketObj,

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list