[Rt-commit] rt branch, 3.8-trunk, updated. 941165eccb3dc4d3cfd8ccd12b13095697de3117
Emmanuel Lacour
elacour at bestpractical.com
Wed Aug 26 08:04:42 EDT 2009
The branch, 3.8-trunk has been updated
via 941165eccb3dc4d3cfd8ccd12b13095697de3117 (commit)
via 81891062ffc6ed25a56f80351f6fc3294c19688e (commit)
from 06fb91c59e50cdb38af35b7c1f950a0ea46aeef0 (commit)
Summary of changes:
share/html/Ticket/Update.html | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 81891062ffc6ed25a56f80351f6fc3294c19688e
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date: Wed Aug 26 14:03:22 2009 +0200
Validate transaction customfields on comment/respond/resolve (closes: #13799)
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index cd6cfbb..c8020fc 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -233,7 +233,17 @@ $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
self => $gnupg_widget,
TicketObj => $TicketObj,
);
+
+my $CFs = $TicketObj->TransactionCustomFields();
+my $ValidCFs = undef;
+
if ( $ARGS{'SubmitTicket'} ) {
+ $ValidCFs = $m->comp(
+ '/Elements/ValidateCustomFields',
+ CustomFields => $CFs,
+ NamePrefix => "Object-RT::Transaction--CustomField-",
+ ARGSRef => \%ARGS
+ );
my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',
self => $gnupg_widget,
TicketObj => $TicketObj,
@@ -241,9 +251,15 @@ if ( $ARGS{'SubmitTicket'} ) {
$checks_failure = 1 unless $status;
}
-if ( !$checks_failure && exists $ARGS{SubmitTicket} ) {
+if ( $ValidCFs && !$checks_failure && exists $ARGS{SubmitTicket} ) {
$m->callback( Ticket => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'BeforeDisplay' );
return $m->comp('Display.html', TicketObj => $TicketObj, %ARGS);
+} elsif ( !$ValidCFs ) {
+ # Invalid CFs
+ while (my $CF = $CFs->Next) {
+ my $msg = $m->notes('InvalidField-' . $CF->Id) or next;
+ push @results, $CF->Name . ': ' . $msg;
+ }
}
</%INIT>
commit 941165eccb3dc4d3cfd8ccd12b13095697de3117
Merge: 8189106 06fb91c
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date: Wed Aug 26 14:04:31 2009 +0200
Merge branch '3.8-trunk' of elacour at code.bestpractical.com:/git/rt into 3.8-trunk
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list