[Rt-commit] rt branch 5.0/call-validatecustomfields-in-ticket-display updated. rt-5.0.2-222-gabb230327d
BPS Git Server
git at git.bestpractical.com
Fri May 6 19:03:37 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 updated
via abb230327d96b4ea4571a4a899dd3bdf480baa32 (commit)
from fb327920c519827080c3d6ed746085d9449c0bd1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit abb230327d96b4ea4571a4a899dd3bdf480baa32
Author: Brad Embree <brad at bestpractical.com>
Date: Fri May 6 12:03:24 2022 -0700
Only call ValidateCustomFields for inline edit of custom fields
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index bd96cbd2aa..bb914d9caa 100644
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -155,16 +155,21 @@ 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;
+ # we only want to validate custom fields if this was an inline edit
+ if ( grep { $_ =~ /CustomField-\d+-Values/ } keys %ARGS ) {
+ RT->Logger->debug( "\n\n\n\n\n" . Data::Dumper::Dumper(\%ARGS) );
+
+ 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{
-----------------------------------------------------------------------
Summary of changes:
share/html/Ticket/Display.html | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
hooks/post-receive
--
rt
More information about the rt-commit
mailing list