From 2c580532919ee23cb00d95737e7dc3332bd1f2d6 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 26 May 2009 16:42:01 +0000 Subject: [PATCH] if an explicit event-def-id is provided, assume that's what the caller really wants even if it's inactive. this is useful for testing git-svn-id: svn://svn.open-ils.org/ILS/trunk@13232 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index f76c72cd47..a76fe96120 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -1479,10 +1479,14 @@ sub fire_object_event { my $e = OpenILS::Utils::CStoreEditor->new; my $def; + my $auto_method = "open-ils.trigger.event.autocreate.by_definition"; + if($event_def) { $def = $e->retrieve_action_trigger_event_definition($event_def) or return $e->event; + $auto_method .= '.include_inactive'; + } else { # find the most appropriate event def depending on context org my $orgs = $self->get_org_ancestors($context_org); @@ -1501,9 +1505,7 @@ sub fire_object_event { } my $event_id = $self->simplereq( - 'open-ils.trigger', - 'open-ils.trigger.event.autocreate.by_definition', - $def->id, $object, $context_org); + 'open-ils.trigger', $auto_method, $def->id, $object, $context_org); my $fire = 'open-ils.trigger.event.fire'; -- 2.11.0