[Rt-commit] rt branch, 4.0/context-on-custom-fields, updated. rt-4.0.4-44-g57a2671
Ruslan Zakirov
ruz at bestpractical.com
Mon Nov 28 17:06:44 EST 2011
The branch, 4.0/context-on-custom-fields has been updated
via 57a267130bae9c8d77ce6415598b69444ccbb84c (commit)
from 60b87f3fd27abeeb48d55971d14bf7ca940e566a (commit)
Summary of changes:
lib/RT/CustomField.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 57a267130bae9c8d77ce6415598b69444ccbb84c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Tue Nov 29 02:05:07 2011 +0400
CF->LoadByName with queue id was not setting context
If context is not set and we get queue id then we
should load queue object and set it as context on
this field.
diff --git a/lib/RT/CustomField.pm b/lib/RT/CustomField.pm
index 338cccaa..de47692 100644
--- a/lib/RT/CustomField.pm
+++ b/lib/RT/CustomField.pm
@@ -465,7 +465,7 @@ sub LoadByName {
}
# if we're looking for a queue by name, make it a number
- if ( defined $args{'Queue'} && $args{'Queue'} =~ /\D/ ) {
+ if ( defined $args{'Queue'} && ($args{'Queue'} =~ /\D/ || !$self->ContextObject) ) {
my $QueueObj = RT::Queue->new( $self->CurrentUser );
$QueueObj->Load( $args{'Queue'} );
$args{'Queue'} = $QueueObj->Id;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list