[open-ils-commits] r12549 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 16 17:20:02 EDT 2009
Author: erickson
Date: 2009-03-16 17:19:57 -0400 (Mon, 16 Mar 2009)
New Revision: 12549
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
fleshing new creator/editor tracking fiels in PO, picklist, and lineitem
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm 2009-03-16 20:04:16 UTC (rev 12548)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm 2009-03-16 21:19:57 UTC (rev 12549)
@@ -547,7 +547,10 @@
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
+ $p_order->creator($e->requestor->id);
+ $p_order->editor($e->requestor->id);
$p_order->owner($e->requestor->id);
+ $p_order->edit_time('now');
$p_order->ordering_agency($e->requestor->ws_ou);
return $e->die_event unless
$e->allowed('CREATE_PURCHASE_ORDER', $p_order->ordering_agency);
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2009-03-16 20:04:16 UTC (rev 12548)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2009-03-16 21:19:57 UTC (rev 12549)
@@ -42,6 +42,7 @@
# indicate the picklist was updated
$picklist->edit_time('now');
+ $picklist->editor($e->requestor->id);
$e->update_acq_picklist($picklist) or return $e->die_event;
}
@@ -155,6 +156,8 @@
return $record;
}
+ $li->editor($e->requestor->id);
+ $li->edit_time('now');
$li->eg_bib_id($record->id);
$e->update_acq_lineitem($li) or return $e->die_event;
}
@@ -361,6 +364,8 @@
$li->marc($e->retrieve_acq_lineitem($li->id)->marc)
unless $li->marc;
+ $li->editor($e->requestor->id);
+ $li->edit_time('now');
$e->update_acq_lineitem($li) or return $e->die_event;
$e->commit;
return 1;
@@ -597,6 +602,7 @@
# return OpenILS::Event->new('ACQ_LINEITEM_APPROVED', payload => $li->id)
# if $li->state eq 'approved';
$li->edit_time('now');
+ $li->editor($e->requestor->id);
$e->update_acq_lineitem($li) or return $e->die_event;
return undef;
}
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2009-03-16 20:04:16 UTC (rev 12548)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2009-03-16 21:19:57 UTC (rev 12549)
@@ -66,6 +66,8 @@
}
return OpenILS::Event->new('BAD_PARAMS') unless $o_picklist->org_unit == $picklist->org_unit;
+ $picklist->edit_time('now');
+ $picklist->editor($e->requestor->id);
$e->update_acq_picklist($picklist) or return $e->die_event;
$e->commit;
return 1;
@@ -428,9 +430,17 @@
unless($picklist) {
$picklist = Fieldmapper::acq::picklist->new;
$picklist->owner($e->requestor->id);
+ $picklist->creator($e->requestor->id);
+ $picklist->editor($e->requestor->id);
+ $picklist->edit_time('now');
$picklist->name($name);
$picklist->org_unit($e->requestor->ws_ou);
$e->create_acq_picklist($picklist) or return $e->die_event;
+
+ } else {
+ $picklist->editor($e->requestor->id);
+ $picklist->edit_time('now');
+ $e->update_acq_picklist($picklist) or return $e->die_event;
}
my $ses = OpenSRF::AppSession->create('open-ils.search');
@@ -439,8 +449,6 @@
while(my $resp = $req->recv(timeout=>60)) {
my $result = $resp->content;
- #use Data::Dumper;
- #$logger->info("results = ".Dumper($resp));
my $count = $result->{count};
my $total = (($count < $search->{limit}) ? $count : $search->{limit})+1;
my $ctr = 0;
@@ -451,6 +459,10 @@
$li->picklist($picklist->id);
$li->source_label($result->{service});
$li->selector($e->requestor->id);
+ $li->creator($e->requestor->id);
+ $li->editor($e->requestor->id);
+ $li->edit_time('now');
+ $li->create_time('now');
$li->marc($rec->{marcxml});
$li->eg_bib_id($rec->{bibid}) if $rec->{bibid};
$e->create_acq_lineitem($li) or return $e->die_event;
More information about the open-ils-commits
mailing list