[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.18-61-g4360a4d
Alex Vandiver
alexmv at bestpractical.com
Wed Nov 20 15:06:20 EST 2013
The branch, 4.0-trunk has been updated
via 4360a4dd62adc28f3204935fda17350aeeeec605 (commit)
from 2f9e8f0b703efe5f503753192d48f00395edcd63 (commit)
Summary of changes:
lib/RT/Handle.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 4360a4dd62adc28f3204935fda17350aeeeec605
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Nov 20 14:50:34 2013 -0500
Allow numeric BasedOn values to look up CFs by ID
This alters the code to match the documentation:
=item C<BasedOn>
Name or ID of another Select Custom Field. This makes the named CF
the source of categories for your values.
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index ca6f2e4..9ebe940 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -872,7 +872,9 @@ sub InsertData {
}
if ( $item->{'BasedOn'} ) {
- if ( $item->{'LookupType'} ) {
+ if ( $item->{'BasedOn'} =~ /^\d+$/) {
+ # Already have an ID -- should be fine
+ } elsif ( $item->{'LookupType'} ) {
my $basedon = RT::CustomField->new($RT::SystemUser);
my ($ok, $msg ) = $basedon->LoadByCols( Name => $item->{'BasedOn'},
LookupType => $item->{'LookupType'} );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list