[open-ils-commits] r16961 - branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 16 10:53:05 EDT 2010
Author: erickson
Date: 2010-07-16 10:53:02 -0400 (Fri, 16 Jul 2010)
New Revision: 16961
Modified:
branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
Log:
back-porting action trigger fixes 16953
Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm 2010-07-16 14:18:30 UTC (rev 16960)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm 2010-07-16 14:53:02 UTC (rev 16961)
@@ -409,17 +409,17 @@
push @{ $$filter{'-and'} }, $f;
}
- push @{ $filter->{'-and'} }, {
- '-not-exists' => {
- from => 'atev',
- where => {
- event_def => $def->id,
- target => { '=' => { '+' . $hook_hash{$def->hook}->core_type => $class->Identity } },
- ($active ? (state => 'pending') : ())
- }
+ my $join = { 'join' => {
+ atev => {
+ field => 'target',
+ fkey => $class->Identity,
+ type => 'left',
+ filter => { event_def => $def->id }
}
- };
+ }};
+ push @{ $filter->{'-and'} }, { '+atev' => { id => undef } };
+
$class =~ s/^Fieldmapper:://o;
$class =~ s/::/_/go;
my $method = 'search_'. $class;
@@ -430,7 +430,7 @@
$logger->info("trigger: create_batch_events() collecting object IDs for def=$def_id / hook=$hook");
- my $object_ids = $editor->$method( $filter, {idlist => 1, timeout => 10800} );
+ my $object_ids = $editor->$method( [$filter, $join], {idlist => 1, timeout => 10800} );
if($object_ids) {
$logger->info("trigger: create_batch_events() fetched ".scalar(@$object_ids)." object IDs for def=$def_id / hook=$hook");
More information about the open-ils-commits
mailing list