From: Josh Stompro Date: Tue, 21 Sep 2021 13:42:33 +0000 (-0500) Subject: LP#1705332 - Patron barcode creator and create date X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fstompro%2Flp1705332_patron_barcode_date_creator_master;p=working%2FEvergreen.git LP#1705332 - Patron barcode creator and create date Release notes entry Signed-off-by: Josh Stompro --- diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/patron_barcode_creator_date.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/patron_barcode_creator_date.adoc new file mode 100644 index 0000000000..3f9c71d165 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Circulation/patron_barcode_creator_date.adoc @@ -0,0 +1,41 @@ +== Patron Barcode Creator and Create Date == + +Barcodes will now include the date they were assigned/created and the staff account that was +used to create the new barcode. + +This may be useful for statistical purposes such as tracking how many library cards +are given out over time. Or for situations where staff want to know how long it has +been since a card was last given out. + +=== Upgade Notes === + +Existing barcodes will have their creator set to the system account ID of 1, and their +create date set to the timestamp of when the upgrade script was run. + +You may want to set your pre-existing actor.card create_date values to a different date, further +in the past to make it clearer that those were from before the feature existed. + +BEGIN; +update actor.card +set create_date = '1970 Jan 1, 00:00:00 UTC'::TIMESTAMPTZ +where +create_date = 'UpgradeTimestamp'::timestamptz +; +COMMIT; + +Maybe you want to use the patrons account creation date and staff user to set the inital +values. Patron accounts with multiple cards will have their card creation date set to the +same value. + +BEGIN; +update actor.card acd +set create_date = au.create_date +from actor.usr au +where acd.usr=au.id +and acd.create_date = 'UpradeTimestamp'::timestamptz +; +COMMIT; + +You could also attempt to use your auditor.actor_usr data to set the initial values. + +BEGIN;