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

BPS Git Server git at git.bestpractical.com
Mon May 9 16:33:21 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  aed1cf2ebd2c68f566e07215079d71d53724c71b (commit)

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

    Call ValidateCustomFields in Ticket/Display.html
    
    Inline edit submits updates directly to Display.html, so call
    ValidateCustomFields to align with ticket Create, Modify, etc.

diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index a878a56c3e..7d30e350c0 100644
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -162,6 +162,18 @@ if ($ARGS{'id'} eq 'new') {
             SkipProcessing => \$SkipProcessing );
         return if $SkipProcessing;
 
+        my ($status, @msg) = $m->comp(
+            '/Elements/ValidateCustomFields',
+            Object       => $TicketObj,
+            CustomFields => $TicketObj->CustomFields,
+            ARGSRef      => \%ARGS,
+        );
+        unless ($status) {
+            push @Actions, @msg;
+            $SkipProcessing = 1;
+            return;
+        }
+
         if ( defined $ARGS{'Action'} ) {
             if ($ARGS{'Action'} =~ /^(Steal|Delete|Take|Untake|SetTold)$/) {
                 my $action = $1;

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list