LP#1705332 - Patron barcode creator and create date user/csharp/lp1705332_patron_barcode_date_creator_master
authorJosh Stompro <stompro@stompro.org>
Tue, 21 Sep 2021 13:42:33 +0000 (08:42 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 16 Nov 2022 15:32:21 +0000 (15:32 +0000)
Release notes entry

Signed-off-by: Josh Stompro <stompro@stompro.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
docs/RELEASE_NOTES_NEXT/Circulation/patron_barcode_creator_date.adoc [new file with mode: 0644]

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 (file)
index 0000000..3f9c71d
--- /dev/null
@@ -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;