[open-ils-commits] r17903 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: . Trigger (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 22 22:12:05 EDT 2010
Author: miker
Date: 2010-09-22 22:12:02 -0400 (Wed, 22 Sep 2010)
New Revision: 17903
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
only flesh up to, but not including, the leaf for the group_field
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2010-09-23 00:34:55 UTC (rev 17902)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2010-09-23 02:12:02 UTC (rev 17903)
@@ -397,7 +397,8 @@
if ($self->event->event_def->group_field) {
my @group_path = split(/\./, $self->event->event_def->group_field);
- my $group_object = $self->_object_by_path( $self->target, undef, [], \@group_path );
+ pop(@group_path); # the last part is a field, should not get fleshed
+ my $group_object = $self->_object_by_path( $self->target, undef, [], \@group_path ) if (@group_path);
}
$self->environment->{complete} = 1;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm 2010-09-23 00:34:55 UTC (rev 17902)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm 2010-09-23 02:12:02 UTC (rev 17903)
@@ -656,16 +656,16 @@
# split the grouping link steps
my @steps = split /\./, $group;
+ my $group_field = pop(@steps); # we didn't flesh to this, it's a field not an object
# find the grouping object
my $node = $e->target;
$node = $node->$_() for ( @steps );
- # get the pkey value for the grouping object on this event
- my $node_ident = $node->Identity;
- my $ident_value = $node->$node_ident();
+ # get the grouping value for the grouping object on this event
+ my $ident_value = $node->$group_field();
- # push this event onto the event+grouping_pkey_value stack
+ # push this event onto the event+grouping_value stack
$groups{$e->event->event_def->id}{$ident_value} ||= [];
push @{ $groups{$e->event->event_def->id}{$ident_value} }, $e;
} else {
More information about the open-ils-commits
mailing list