From 72c1a499b730f3794e6309d6ea1659355865c571 Mon Sep 17 00:00:00 2001 From: Bill Ott Date: Mon, 20 Sep 2021 17:34:00 -0500 Subject: [PATCH] LP#1705332 - Add creation date and creator(staff user account) to patron barcodes. Code from Bill Ott for local change that they have been using for a number of years. Signed-off-by: Josh Stompro Signed-off-by: Chris Sharp --- Open-ILS/examples/fm_IDL.xml | 3 +++ Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm | 1 + .../src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm | 2 +- Open-ILS/src/templates/actor/user/register.tt2 | 4 ++++ .../src/templates/staff/circ/patron/t_patron_cards_dialog.tt2 | 8 ++++++++ Open-ILS/src/templates/staff/css/circ.css.tt2 | 2 ++ 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index a4fb45b078..41b82278d9 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -7416,9 +7416,12 @@ SELECT usr, + + + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index 56df630e79..a3f85b4407 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -1039,6 +1039,7 @@ sub _add_update_cards { sub _add_card { my( $e, $card ) = @_; $card->clear_id(); + $card->creator($e->requestor->id); $logger->info("Adding new patron card ".$card->barcode); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm index 6bf0481662..8772a0ad35 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm @@ -150,7 +150,7 @@ use base qw/actor/; __PACKAGE__->table( 'actor_card' ); __PACKAGE__->columns( Primary => qw/id/ ); -__PACKAGE__->columns( Essential => qw/usr barcode active/ ); +__PACKAGE__->columns( Essential => qw/usr barcode active creator create_date/ ); #------------------------------------------------------------------------------- package actor::user_access_entry; diff --git a/Open-ILS/src/templates/actor/user/register.tt2 b/Open-ILS/src/templates/actor/user/register.tt2 index 7a02e9f8ad..7fcc04a62e 100644 --- a/Open-ILS/src/templates/actor/user/register.tt2 +++ b/Open-ILS/src/templates/actor/user/register.tt2 @@ -62,6 +62,8 @@ [% l('Barcode') %] [% l('Active') %] [% l('Primary') %] + [% l('Created') %] + [% l('Creator') %] @@ -69,6 +71,8 @@
+
+
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_patron_cards_dialog.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_patron_cards_dialog.tt2 index b171d71c77..10c59701f6 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_patron_cards_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_patron_cards_dialog.tt2 @@ -15,6 +15,12 @@
+
+ +
+
+ +
{{card.barcode}}
@@ -28,6 +34,8 @@ ng-value='card.id' ng-disabled="!perms.UPDATE_PATRON_PRIMARY_CARD"/>
+
{{card.create_date | limitTo:10}}
+
{{card.creator}}