[Rt-commit] rt branch, 4.0/create-ticket-memberof, created. rt-4.0.21-4-g11d5c73
Alex Vandiver
alexmv at bestpractical.com
Wed Jul 16 16:06:00 EDT 2014
The branch, 4.0/create-ticket-memberof has been created
at 11d5c735f4e7c1ba9ab00613a1f16f16ed51b46f (commit)
- Log -----------------------------------------------------------------
commit 11d5c735f4e7c1ba9ab00613a1f16f16ed51b46f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 16 15:27:19 2014 -0400
Allow use of the Parents/Children aliases
The documented forms for "Parents"/"Children", "Members" and "MemberOf",
did not actually work because the deferred link code only checked
"Parents" and "Children". Allow for any of the aliases that the link
type map supports.
diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
index fcaeed3..458b548 100644
--- a/lib/RT/Action/CreateTickets.pm
+++ b/lib/RT/Action/CreateTickets.pm
@@ -963,6 +963,13 @@ sub GetDeferred {
my $links = shift;
my $postponed = shift;
+ # Unify the aliases for child/parent
+ $args->{$_} = [$args->{$_}]
+ for grep {$args->{$_} and not ref $args->{$_}} qw/members hasmember memberof/;
+ push @{$args->{'children'}}, @{delete $args->{'members'}} if $args->{'members'};
+ push @{$args->{'children'}}, @{delete $args->{'hasmember'}} if $args->{'hasmember'};
+ push @{$args->{'parents'}}, @{delete $args->{'memberof'}} if $args->{'memberof'};
+
# Deferred processing
push @$links,
(
-----------------------------------------------------------------------
More information about the rt-commit
mailing list