LP#1714070 Parent/guardian field release notes
authorBill Erickson <berickxx@gmail.com>
Sun, 28 Oct 2018 14:10:12 +0000 (10:10 -0400)
committerJason Etheridge <jason@EquinoxInitiative.org>
Tue, 27 Nov 2018 05:07:27 +0000 (00:07 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
docs/RELEASE_NOTES_NEXT/Circulation/patron-guardian-field.adoc [new file with mode: 0644]

diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/patron-guardian-field.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/patron-guardian-field.adoc
new file mode 100644 (file)
index 0000000..c629214
--- /dev/null
@@ -0,0 +1,52 @@
+Patron Parent/Guardian Field
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Patrons now have a new dedicated parent/guardian field.  This field is 
+editable in the patron edit interface, displays in the patron
+summary side bar on the browser client, and is search-able from the
+patron search interface in the browser client.
+
+Patron Editor
++++++++++++++
+
+In addition to the standard "show" and "suggest" visibility settings, 
+the new guardian field comes with a library setting 
+'ui.patron.edit.guardian_required_for_juv' ("GUI: Juvenile account 
+requires parent/guardian").  When this setting is applied, a value 
+will be required in the patron editor when the juvenile flag is active.
+
+Upgrade Notes
++++++++++++++
+
+Sites who traditionally store parent/guardian information in the
+patron 'Secondary Identification' field can migrate values from this
+field to the new guardian field with the following SQL:
+
+[source,sql]
+-------------------------------------------------------------------------
+BEGIN;
+
+-- 1. Find the local ID of the parent/guardian identification type
+
+SELECT * FROM config.identification_type;
+
+-- 2. On my test system, the id is "101".  It will vary!.
+-- Migrate the value from the ident2 field to the guardian field.
+
+UPDATE actor.usr 
+    SET guardian = ident_value2 
+WHERE 
+    ident_type2 = 101 -- !! CHANGE TO SUIT
+    AND ident_value2 IS NOT NULL 
+    AND ident_value2 <> '';
+
+-- 3. delete the original secondary identification data
+
+UPDATE actor.usr 
+    SET ident_value2 = NULL, ident_type2 = NULL
+WHERE
+    ident_type2 = 101; -- !! CHANGE TO SUIT
+
+COMMIT;
+-------------------------------------------------------------------------
+