[open-ils-commits] r16535 - trunk/Open-ILS/src/support-scripts/test-scripts (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri May 28 17:35:10 EDT 2010


Author: phasefx
Date: 2010-05-28 17:35:04 -0400 (Fri, 28 May 2010)
New Revision: 16535

Added:
   trunk/Open-ILS/src/support-scripts/test-scripts/print_ahr.pl
   trunk/Open-ILS/src/support-scripts/test-scripts/print_circ.pl
Log:
utilities for testing circ and ahr events

Added: trunk/Open-ILS/src/support-scripts/test-scripts/print_ahr.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/test-scripts/print_ahr.pl	                        (rev 0)
+++ trunk/Open-ILS/src/support-scripts/test-scripts/print_ahr.pl	2010-05-28 21:35:04 UTC (rev 16535)
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+#----------------------------------------------------------------
+# Print AHR
+#----------------------------------------------------------------
+
+require '../oils_header.pl';
+use vars qw/$apputils/;
+use strict;
+use Data::Dumper;
+my $config		= shift; 
+my $username	= shift || 'admin';
+my $password	= shift || 'open-ils';
+my $hold_id       = shift;
+my $hook        = shift || 'ahr.format.history.print';
+my $granularity        = shift || 'print-on-demand';
+
+osrf_connect($config);
+oils_login($username, $password);
+my $e = OpenILS::Utils::CStoreEditor->new;
+
+my $hold = $e->retrieve_action_hold_request($hold_id) or oils_event_die($e->event);
+print "hook = $hook, gran = $granularity, hold = $hold, request_lib = " . $hold->request_lib . "\n";
+
+# args = $self, $event_def, $hook, $object, $context_org, $granularity, $user_data
+my $result = $apputils->fire_object_event(
+    undef,
+    $hook,
+    [ $hold ],
+    $hold->request_lib,
+    $granularity,
+    [] 
+);
+
+print Dumper($result) . "\n";
+


Property changes on: trunk/Open-ILS/src/support-scripts/test-scripts/print_ahr.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/Open-ILS/src/support-scripts/test-scripts/print_circ.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/test-scripts/print_circ.pl	                        (rev 0)
+++ trunk/Open-ILS/src/support-scripts/test-scripts/print_circ.pl	2010-05-28 21:35:04 UTC (rev 16535)
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+#----------------------------------------------------------------
+# Print CIRC
+#----------------------------------------------------------------
+
+require '../oils_header.pl';
+use vars qw/$apputils/;
+use strict;
+use Data::Dumper;
+my $config		= shift; 
+my $username	= shift || 'admin';
+my $password	= shift || 'open-ils';
+my $circ_id       = shift;
+my $hook        = shift || 'circ.format.history.print';
+my $granularity        = shift || 'print-on-demand';
+
+osrf_connect($config);
+oils_login($username, $password);
+my $e = OpenILS::Utils::CStoreEditor->new;
+
+my $circ = $e->retrieve_action_circulation($circ_id) or oils_event_die($e->event);
+print "hook = $hook, gran = $granularity, circ = $circ, circ_lib = " . $circ->circ_lib . "\n";
+
+# args = $self, $event_def, $hook, $object, $context_org, $granularity, $user_data
+my $result = $apputils->fire_object_event(
+    undef,
+    $hook,
+    [ $circ ],
+    $circ->circ_lib,
+    $granularity,
+    [] 
+);
+
+print Dumper($result) . "\n";
+


Property changes on: trunk/Open-ILS/src/support-scripts/test-scripts/print_circ.pl
___________________________________________________________________
Name: svn:executable
   + *



More information about the open-ils-commits mailing list