[Rt-commit] r7655 - rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Tue Apr 24 00:46:21 EDT 2007
Author: ruz
Date: Tue Apr 24 00:46:21 2007
New Revision: 7655
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm
Log:
* fix merge problem
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Handle.pm Tue Apr 24 00:46:21 2007
@@ -578,10 +578,10 @@
my $values = delete $item->{'Values'};
my @queues;
- if ( $item->{'Queue'} ) {
- my $queue_ref = delete $item->{'Queue'};
- @queues = ref $queue_ref ? @{$queue_ref} : ($queue_ref);
+ # if ref then it's list of queues, so we do things ourself
+ if ( exists $item->{'Queue'} && ref $item->{'Queue'} ) {
$item->{'LookupType'} = 'RT::Queue-RT::Ticket';
+ @queues = @{ delete $item->{'Queue'} };
}
my ( $return, $msg ) = $new_entry->Create(%$item);
@@ -592,11 +592,12 @@
print "(Error: $msg)\n" unless $return;
}
- if ($item->{LookupType}) { # enable by default
+ # apply by default
+ if ( !@queues && !exists $item->{'Queue'} && $item->{LookupType} ) {
my $ocf = RT::ObjectCustomField->new($RT::SystemUser);
$ocf->Create( CustomField => $new_entry->Id );
}
-
+
for my $q (@queues) {
my $q_obj = RT::Queue->new($RT::SystemUser);
$q_obj->Load($q);
More information about the Rt-commit
mailing list