[open-ils-commits] [GIT] Evergreen ILS branch tags/rel_3_1_0 created. 894dbe8d8b500c68d9be0751d6a5167b13b1b4c1

Evergreen Git git at git.evergreen-ils.org
Thu Apr 12 09:39:42 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, tags/rel_3_1_0 has been created
        at  894dbe8d8b500c68d9be0751d6a5167b13b1b4c1 (commit)

- Log -----------------------------------------------------------------
commit 894dbe8d8b500c68d9be0751d6a5167b13b1b4c1
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Thu Apr 12 09:35:15 2018 -0400

    Remove errant repeated upgrade script section
    
    This code ended up in 3.0.6, so repeating it here causes the 3.1.0
    upgrade to fail.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
index 02e8abd..bc5e5c9 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
@@ -8648,273 +8648,6 @@ $$ LANGUAGE PLPGSQL;
 CREATE TRIGGER maintain_billing_ts_tgr BEFORE INSERT OR UPDATE ON money.billing FOR EACH ROW EXECUTE PROCEDURE money.maintain_billing_ts();
 
   
-SELECT evergreen.upgrade_deps_block_check('1107', :eg_version);
-
-CREATE OR REPLACE FUNCTION asset.merge_record_assets( target_record BIGINT, source_record BIGINT ) RETURNS INT AS $func$
-DECLARE
-    moved_objects INT := 0;
-    source_cn     asset.call_number%ROWTYPE;
-    target_cn     asset.call_number%ROWTYPE;
-    metarec       metabib.metarecord%ROWTYPE;
-    hold          action.hold_request%ROWTYPE;
-    ser_rec       serial.record_entry%ROWTYPE;
-    ser_sub       serial.subscription%ROWTYPE;
-    acq_lineitem  acq.lineitem%ROWTYPE;
-    acq_request   acq.user_request%ROWTYPE;
-    booking       booking.resource_type%ROWTYPE;
-    source_part   biblio.monograph_part%ROWTYPE;
-    target_part   biblio.monograph_part%ROWTYPE;
-    multi_home    biblio.peer_bib_copy_map%ROWTYPE;
-    uri_count     INT := 0;
-    counter       INT := 0;
-    uri_datafield TEXT;
-    uri_text      TEXT := '';
-BEGIN
-
-    -- move any 856 entries on records that have at least one MARC-mapped URI entry
-    SELECT  INTO uri_count COUNT(*)
-      FROM  asset.uri_call_number_map m
-            JOIN asset.call_number cn ON (m.call_number = cn.id)
-      WHERE cn.record = source_record;
-
-    IF uri_count > 0 THEN
-        
-        -- This returns more nodes than you might expect:
-        -- 7 instead of 1 for an 856 with $u $y $9
-        SELECT  COUNT(*) INTO counter
-          FROM  oils_xpath_table(
-                    'id',
-                    'marc',
-                    'biblio.record_entry',
-                    '//*[@tag="856"]',
-                    'id=' || source_record
-                ) as t(i int,c text);
-    
-        FOR i IN 1 .. counter LOOP
-            SELECT  '<datafield xmlns="http://www.loc.gov/MARC21/slim"' || 
-			' tag="856"' ||
-			' ind1="' || FIRST(ind1) || '"'  ||
-			' ind2="' || FIRST(ind2) || '">' ||
-                        STRING_AGG(
-                            '<subfield code="' || subfield || '">' ||
-                            regexp_replace(
-                                regexp_replace(
-                                    regexp_replace(data,'&','&','g'),
-                                    '>', '>', 'g'
-                                ),
-                                '<', '<', 'g'
-                            ) || '</subfield>', ''
-                        ) || '</datafield>' INTO uri_datafield
-              FROM  oils_xpath_table(
-                        'id',
-                        'marc',
-                        'biblio.record_entry',
-                        '//*[@tag="856"][position()=' || i || ']/@ind1|' ||
-                        '//*[@tag="856"][position()=' || i || ']/@ind2|' ||
-                        '//*[@tag="856"][position()=' || i || ']/*/@code|' ||
-                        '//*[@tag="856"][position()=' || i || ']/*[@code]',
-                        'id=' || source_record
-                    ) as t(id int,ind1 text, ind2 text,subfield text,data text);
-
-            -- As most of the results will be NULL, protect against NULLifying
-            -- the valid content that we do generate
-            uri_text := uri_text || COALESCE(uri_datafield, '');
-        END LOOP;
-
-        IF uri_text <> '' THEN
-            UPDATE  biblio.record_entry
-              SET   marc = regexp_replace(marc,'(</[^>]*record>)', uri_text || E'\\1')
-              WHERE id = target_record;
-        END IF;
-
-    END IF;
-
-	-- Find and move metarecords to the target record
-	SELECT	INTO metarec *
-	  FROM	metabib.metarecord
-	  WHERE	master_record = source_record;
-
-	IF FOUND THEN
-		UPDATE	metabib.metarecord
-		  SET	master_record = target_record,
-			mods = NULL
-		  WHERE	id = metarec.id;
-
-		moved_objects := moved_objects + 1;
-	END IF;
-
-	-- Find call numbers attached to the source ...
-	FOR source_cn IN SELECT * FROM asset.call_number WHERE record = source_record LOOP
-
-		SELECT	INTO target_cn *
-		  FROM	asset.call_number
-		  WHERE	label = source_cn.label
-            AND prefix = source_cn.prefix
-            AND suffix = source_cn.suffix
-			AND owning_lib = source_cn.owning_lib
-			AND record = target_record
-			AND NOT deleted;
-
-		-- ... and if there's a conflicting one on the target ...
-		IF FOUND THEN
-
-			-- ... move the copies to that, and ...
-			UPDATE	asset.copy
-			  SET	call_number = target_cn.id
-			  WHERE	call_number = source_cn.id;
-
-			-- ... move V holds to the move-target call number
-			FOR hold IN SELECT * FROM action.hold_request WHERE target = source_cn.id AND hold_type = 'V' LOOP
-		
-				UPDATE	action.hold_request
-				  SET	target = target_cn.id
-				  WHERE	id = hold.id;
-		
-				moved_objects := moved_objects + 1;
-			END LOOP;
-        
-            UPDATE asset.call_number SET deleted = TRUE WHERE id = source_cn.id;
-
-		-- ... if not ...
-		ELSE
-			-- ... just move the call number to the target record
-			UPDATE	asset.call_number
-			  SET	record = target_record
-			  WHERE	id = source_cn.id;
-		END IF;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find T holds targeting the source record ...
-	FOR hold IN SELECT * FROM action.hold_request WHERE target = source_record AND hold_type = 'T' LOOP
-
-		-- ... and move them to the target record
-		UPDATE	action.hold_request
-		  SET	target = target_record
-		  WHERE	id = hold.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find serial records targeting the source record ...
-	FOR ser_rec IN SELECT * FROM serial.record_entry WHERE record = source_record LOOP
-		-- ... and move them to the target record
-		UPDATE	serial.record_entry
-		  SET	record = target_record
-		  WHERE	id = ser_rec.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find serial subscriptions targeting the source record ...
-	FOR ser_sub IN SELECT * FROM serial.subscription WHERE record_entry = source_record LOOP
-		-- ... and move them to the target record
-		UPDATE	serial.subscription
-		  SET	record_entry = target_record
-		  WHERE	id = ser_sub.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find booking resource types targeting the source record ...
-	FOR booking IN SELECT * FROM booking.resource_type WHERE record = source_record LOOP
-		-- ... and move them to the target record
-		UPDATE	booking.resource_type
-		  SET	record = target_record
-		  WHERE	id = booking.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find acq lineitems targeting the source record ...
-	FOR acq_lineitem IN SELECT * FROM acq.lineitem WHERE eg_bib_id = source_record LOOP
-		-- ... and move them to the target record
-		UPDATE	acq.lineitem
-		  SET	eg_bib_id = target_record
-		  WHERE	id = acq_lineitem.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find acq user purchase requests targeting the source record ...
-	FOR acq_request IN SELECT * FROM acq.user_request WHERE eg_bib = source_record LOOP
-		-- ... and move them to the target record
-		UPDATE	acq.user_request
-		  SET	eg_bib = target_record
-		  WHERE	id = acq_request.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find parts attached to the source ...
-	FOR source_part IN SELECT * FROM biblio.monograph_part WHERE record = source_record LOOP
-
-		SELECT	INTO target_part *
-		  FROM	biblio.monograph_part
-		  WHERE	label = source_part.label
-			AND record = target_record;
-
-		-- ... and if there's a conflicting one on the target ...
-		IF FOUND THEN
-
-			-- ... move the copy-part maps to that, and ...
-			UPDATE	asset.copy_part_map
-			  SET	part = target_part.id
-			  WHERE	part = source_part.id;
-
-			-- ... move P holds to the move-target part
-			FOR hold IN SELECT * FROM action.hold_request WHERE target = source_part.id AND hold_type = 'P' LOOP
-		
-				UPDATE	action.hold_request
-				  SET	target = target_part.id
-				  WHERE	id = hold.id;
-		
-				moved_objects := moved_objects + 1;
-			END LOOP;
-
-		-- ... if not ...
-		ELSE
-			-- ... just move the part to the target record
-			UPDATE	biblio.monograph_part
-			  SET	record = target_record
-			  WHERE	id = source_part.id;
-		END IF;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- Find multi_home items attached to the source ...
-	FOR multi_home IN SELECT * FROM biblio.peer_bib_copy_map WHERE peer_record = source_record LOOP
-		-- ... and move them to the target record
-		UPDATE	biblio.peer_bib_copy_map
-		  SET	peer_record = target_record
-		  WHERE	id = multi_home.id;
-
-		moved_objects := moved_objects + 1;
-	END LOOP;
-
-	-- And delete mappings where the item's home bib was merged with the peer bib
-	DELETE FROM biblio.peer_bib_copy_map WHERE peer_record = (
-		SELECT (SELECT record FROM asset.call_number WHERE id = call_number)
-		FROM asset.copy WHERE id = target_copy
-	);
-
-    -- replace book bag entries of source_record with target_record
-    UPDATE container.biblio_record_entry_bucket_item
-        SET target_biblio_record_entry = target_record
-        WHERE bucket IN (SELECT id FROM container.biblio_record_entry_bucket WHERE btype = 'bookbag')
-        AND target_biblio_record_entry = source_record;
-
-    -- Finally, "delete" the source record
-    DELETE FROM biblio.record_entry WHERE id = source_record;
-
-	-- That's all, folks!
-	RETURN moved_objects;
-END;
-$func$ LANGUAGE plpgsql;
-
-
 SELECT evergreen.upgrade_deps_block_check('1108', :eg_version);
 
 CREATE OR REPLACE FUNCTION asset.merge_record_assets( target_record BIGINT, source_record BIGINT ) RETURNS INT AS $func$

commit c0df0e6c6a2051b670a16cbc2830ff8f7d427da9
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Mar 28 14:57:13 2018 -0400

    Port over 3.0.6 upgrade script
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.0.5-3.0.6-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.0.5-3.0.6-upgrade-db.sql
new file mode 100644
index 0000000..6f456ce
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/3.0.5-3.0.6-upgrade-db.sql
@@ -0,0 +1,272 @@
+--Upgrade Script for 3.0.5 to 3.0.6
+\set eg_version '''3.0.6'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.0.6', :eg_version);
+  
+SELECT evergreen.upgrade_deps_block_check('1107', :eg_version);
+
+CREATE OR REPLACE FUNCTION asset.merge_record_assets( target_record BIGINT, source_record BIGINT ) RETURNS INT AS $func$
+DECLARE
+    moved_objects INT := 0;
+    source_cn     asset.call_number%ROWTYPE;
+    target_cn     asset.call_number%ROWTYPE;
+    metarec       metabib.metarecord%ROWTYPE;
+    hold          action.hold_request%ROWTYPE;
+    ser_rec       serial.record_entry%ROWTYPE;
+    ser_sub       serial.subscription%ROWTYPE;
+    acq_lineitem  acq.lineitem%ROWTYPE;
+    acq_request   acq.user_request%ROWTYPE;
+    booking       booking.resource_type%ROWTYPE;
+    source_part   biblio.monograph_part%ROWTYPE;
+    target_part   biblio.monograph_part%ROWTYPE;
+    multi_home    biblio.peer_bib_copy_map%ROWTYPE;
+    uri_count     INT := 0;
+    counter       INT := 0;
+    uri_datafield TEXT;
+    uri_text      TEXT := '';
+BEGIN
+
+    -- move any 856 entries on records that have at least one MARC-mapped URI entry
+    SELECT  INTO uri_count COUNT(*)
+      FROM  asset.uri_call_number_map m
+            JOIN asset.call_number cn ON (m.call_number = cn.id)
+      WHERE cn.record = source_record;
+
+    IF uri_count > 0 THEN
+        
+        -- This returns more nodes than you might expect:
+        -- 7 instead of 1 for an 856 with $u $y $9
+        SELECT  COUNT(*) INTO counter
+          FROM  oils_xpath_table(
+                    'id',
+                    'marc',
+                    'biblio.record_entry',
+                    '//*[@tag="856"]',
+                    'id=' || source_record
+                ) as t(i int,c text);
+    
+        FOR i IN 1 .. counter LOOP
+            SELECT  '<datafield xmlns="http://www.loc.gov/MARC21/slim"' || 
+			' tag="856"' ||
+			' ind1="' || FIRST(ind1) || '"'  ||
+			' ind2="' || FIRST(ind2) || '">' ||
+                        STRING_AGG(
+                            '<subfield code="' || subfield || '">' ||
+                            regexp_replace(
+                                regexp_replace(
+                                    regexp_replace(data,'&','&','g'),
+                                    '>', '>', 'g'
+                                ),
+                                '<', '<', 'g'
+                            ) || '</subfield>', ''
+                        ) || '</datafield>' INTO uri_datafield
+              FROM  oils_xpath_table(
+                        'id',
+                        'marc',
+                        'biblio.record_entry',
+                        '//*[@tag="856"][position()=' || i || ']/@ind1|' ||
+                        '//*[@tag="856"][position()=' || i || ']/@ind2|' ||
+                        '//*[@tag="856"][position()=' || i || ']/*/@code|' ||
+                        '//*[@tag="856"][position()=' || i || ']/*[@code]',
+                        'id=' || source_record
+                    ) as t(id int,ind1 text, ind2 text,subfield text,data text);
+
+            -- As most of the results will be NULL, protect against NULLifying
+            -- the valid content that we do generate
+            uri_text := uri_text || COALESCE(uri_datafield, '');
+        END LOOP;
+
+        IF uri_text <> '' THEN
+            UPDATE  biblio.record_entry
+              SET   marc = regexp_replace(marc,'(</[^>]*record>)', uri_text || E'\\1')
+              WHERE id = target_record;
+        END IF;
+
+    END IF;
+
+	-- Find and move metarecords to the target record
+	SELECT	INTO metarec *
+	  FROM	metabib.metarecord
+	  WHERE	master_record = source_record;
+
+	IF FOUND THEN
+		UPDATE	metabib.metarecord
+		  SET	master_record = target_record,
+			mods = NULL
+		  WHERE	id = metarec.id;
+
+		moved_objects := moved_objects + 1;
+	END IF;
+
+	-- Find call numbers attached to the source ...
+	FOR source_cn IN SELECT * FROM asset.call_number WHERE record = source_record LOOP
+
+		SELECT	INTO target_cn *
+		  FROM	asset.call_number
+		  WHERE	label = source_cn.label
+            AND prefix = source_cn.prefix
+            AND suffix = source_cn.suffix
+			AND owning_lib = source_cn.owning_lib
+			AND record = target_record
+			AND NOT deleted;
+
+		-- ... and if there's a conflicting one on the target ...
+		IF FOUND THEN
+
+			-- ... move the copies to that, and ...
+			UPDATE	asset.copy
+			  SET	call_number = target_cn.id
+			  WHERE	call_number = source_cn.id;
+
+			-- ... move V holds to the move-target call number
+			FOR hold IN SELECT * FROM action.hold_request WHERE target = source_cn.id AND hold_type = 'V' LOOP
+		
+				UPDATE	action.hold_request
+				  SET	target = target_cn.id
+				  WHERE	id = hold.id;
+		
+				moved_objects := moved_objects + 1;
+			END LOOP;
+        
+            UPDATE asset.call_number SET deleted = TRUE WHERE id = source_cn.id;
+
+		-- ... if not ...
+		ELSE
+			-- ... just move the call number to the target record
+			UPDATE	asset.call_number
+			  SET	record = target_record
+			  WHERE	id = source_cn.id;
+		END IF;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find T holds targeting the source record ...
+	FOR hold IN SELECT * FROM action.hold_request WHERE target = source_record AND hold_type = 'T' LOOP
+
+		-- ... and move them to the target record
+		UPDATE	action.hold_request
+		  SET	target = target_record
+		  WHERE	id = hold.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find serial records targeting the source record ...
+	FOR ser_rec IN SELECT * FROM serial.record_entry WHERE record = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	serial.record_entry
+		  SET	record = target_record
+		  WHERE	id = ser_rec.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find serial subscriptions targeting the source record ...
+	FOR ser_sub IN SELECT * FROM serial.subscription WHERE record_entry = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	serial.subscription
+		  SET	record_entry = target_record
+		  WHERE	id = ser_sub.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find booking resource types targeting the source record ...
+	FOR booking IN SELECT * FROM booking.resource_type WHERE record = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	booking.resource_type
+		  SET	record = target_record
+		  WHERE	id = booking.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find acq lineitems targeting the source record ...
+	FOR acq_lineitem IN SELECT * FROM acq.lineitem WHERE eg_bib_id = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	acq.lineitem
+		  SET	eg_bib_id = target_record
+		  WHERE	id = acq_lineitem.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find acq user purchase requests targeting the source record ...
+	FOR acq_request IN SELECT * FROM acq.user_request WHERE eg_bib = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	acq.user_request
+		  SET	eg_bib = target_record
+		  WHERE	id = acq_request.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find parts attached to the source ...
+	FOR source_part IN SELECT * FROM biblio.monograph_part WHERE record = source_record LOOP
+
+		SELECT	INTO target_part *
+		  FROM	biblio.monograph_part
+		  WHERE	label = source_part.label
+			AND record = target_record;
+
+		-- ... and if there's a conflicting one on the target ...
+		IF FOUND THEN
+
+			-- ... move the copy-part maps to that, and ...
+			UPDATE	asset.copy_part_map
+			  SET	part = target_part.id
+			  WHERE	part = source_part.id;
+
+			-- ... move P holds to the move-target part
+			FOR hold IN SELECT * FROM action.hold_request WHERE target = source_part.id AND hold_type = 'P' LOOP
+		
+				UPDATE	action.hold_request
+				  SET	target = target_part.id
+				  WHERE	id = hold.id;
+		
+				moved_objects := moved_objects + 1;
+			END LOOP;
+
+		-- ... if not ...
+		ELSE
+			-- ... just move the part to the target record
+			UPDATE	biblio.monograph_part
+			  SET	record = target_record
+			  WHERE	id = source_part.id;
+		END IF;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find multi_home items attached to the source ...
+	FOR multi_home IN SELECT * FROM biblio.peer_bib_copy_map WHERE peer_record = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	biblio.peer_bib_copy_map
+		  SET	peer_record = target_record
+		  WHERE	id = multi_home.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- And delete mappings where the item's home bib was merged with the peer bib
+	DELETE FROM biblio.peer_bib_copy_map WHERE peer_record = (
+		SELECT (SELECT record FROM asset.call_number WHERE id = call_number)
+		FROM asset.copy WHERE id = target_copy
+	);
+
+    -- replace book bag entries of source_record with target_record
+    UPDATE container.biblio_record_entry_bucket_item
+        SET target_biblio_record_entry = target_record
+        WHERE bucket IN (SELECT id FROM container.biblio_record_entry_bucket WHERE btype = 'bookbag')
+        AND target_biblio_record_entry = source_record;
+
+    -- Finally, "delete" the source record
+    DELETE FROM biblio.record_entry WHERE id = source_record;
+
+	-- That's all, folks!
+	RETURN moved_objects;
+END;
+$func$ LANGUAGE plpgsql;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
index dee6250..02e8abd 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
@@ -1,4 +1,4 @@
---Upgrade Script for 3.0.5 to 3.1.0
+--Upgrade Script for 3.0.6 to 3.1.0
 \set eg_version '''3.1.0'''
 BEGIN;
 INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.1.0', :eg_version);
diff --git a/docs/installation/server_upgrade.adoc b/docs/installation/server_upgrade.adoc
index 422a10e..5be99d7 100644
--- a/docs/installation/server_upgrade.adoc
+++ b/docs/installation/server_upgrade.adoc
@@ -238,7 +238,7 @@ as a user with the ability to connect to the database server.
 [source, bash]
 ----------------------------------------------------------
 cd /home/opensrf/Evergreen-ILS-3.1.0/Open-ILS/src/sql/Pg
-psql -U evergreen -h localhost -f version-upgrade/3.0.5-3.1.0-upgrade-db.sql evergreen
+psql -U evergreen -h localhost -f version-upgrade/3.0.6-3.1.0-upgrade-db.sql evergreen
 ----------------------------------------------------------
 
 [TIP]

commit d2900a0777f3ff3252b2b7a24458552a15ab0632
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Mar 28 14:55:43 2018 -0400

    Rename 3.1.0 upgrade script
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.0.5-3.1.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql
similarity index 100%
rename from Open-ILS/src/sql/Pg/version-upgrade/3.0.5-3.1.0-upgrade-db.sql
rename to Open-ILS/src/sql/Pg/version-upgrade/3.0.6-3.1.0-upgrade-db.sql

commit 4314ac2c2b7c153dc7aac6d15aaf1336601b15a7
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Mar 28 14:40:17 2018 -0400

    Move from .rc to .0 in upgrade docs
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/docs/installation/server_upgrade.adoc b/docs/installation/server_upgrade.adoc
index ea22f29..422a10e 100644
--- a/docs/installation/server_upgrade.adoc
+++ b/docs/installation/server_upgrade.adoc
@@ -47,8 +47,8 @@ the https://evergreen-ils.org/opensrf-downloads/[OpenSRF download page].
 +
 [source, bash]
 -----------------------------------------------
-wget https://evergreen-ils.org/downloads/Evergreen-ILS-3.1.rc.tar.gz
-tar xzf Evergreen-ILS-3.1.rc.tar.gz
+wget https://evergreen-ils.org/downloads/Evergreen-ILS-3.1.0.tar.gz
+tar xzf Evergreen-ILS-3.1.0.tar.gz
 -----------------------------------------------
 +
 [NOTE]
@@ -58,7 +58,7 @@ For the latest edition of Evergreen, check the https://evergreen-ils.org/egdownl
 +
 [source, bash]
 ---------------------------------------------
-cd /home/opensrf/Evergreen-ILS-3.1.rc
+cd /home/opensrf/Evergreen-ILS-3.1.0
 ---------------------------------------------
 +
 On the next command, replace `[distribution]` with one of these values for your
@@ -82,7 +82,7 @@ make -f Open-ILS/src/extras/Makefile.install [distribution]
 +
 [source, bash]
 ------------------------------------------------------------
-cd /home/opensrf/Evergreen-ILS-3.1.rc
+cd /home/opensrf/Evergreen-ILS-3.1.0
 PATH=/openils/bin:$PATH ./configure --prefix=/openils --sysconfdir=/openils/conf
 make
 ------------------------------------------------------------
@@ -93,7 +93,7 @@ These instructions assume that you have also installed OpenSRF under /openils/.
 +
 [source, bash]
 ------------------------------------------------------------
-cd /home/opensrf/Evergreen-ILS-3.1.rc
+cd /home/opensrf/Evergreen-ILS-3.1.0
 make STAFF_CLIENT_STAMP_ID=rel_3_1_0 install
 ------------------------------------------------------------
 +
@@ -130,7 +130,7 @@ Copying these configuration files will remove any customizations you have made t
 +
 [source, bash]
 -------------------------------------------------------------------------
-cd /home/opensrf/Evergreen-ILS-3.1.rc
+cd /home/opensrf/Evergreen-ILS-3.1.0
 perl Open-ILS/src/support-scripts/eg_db_config --update-config --service all \
 --create-offline --database evergreen --host localhost --user evergreen --password evergreen
 -------------------------------------------------------------------------
@@ -154,21 +154,21 @@ The diff command can be used to show the differences between the distribution ve
 +
 [source, bash]
 ----------------------------------------------------------
-cp /home/opensrf/Evergreen-ILS-3.1.rc/Open-ILS/examples/apache/eg_startup /etc/apache2/eg_startup
+cp /home/opensrf/Evergreen-ILS-3.1.0/Open-ILS/examples/apache/eg_startup /etc/apache2/eg_startup
 ----------------------------------------------------------
 +
 .. Update /etc/apache2/eg_vhost.conf by copying the example from Open-ILS/examples/apache/eg_vhost.conf.
 +
 [source, bash]
 ----------------------------------------------------------
-cp /home/opensrf/Evergreen-ILS-3.1.rc/Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/eg_vhost.conf
+cp /home/opensrf/Evergreen-ILS-3.1.0/Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/eg_vhost.conf
 ----------------------------------------------------------
 +
 .. Update /etc/apache2/sites-available/eg.conf by copying the example from Open-ILS/examples/apache/eg.conf.
 +
 [source, bash]
 ----------------------------------------------------------
-cp /home/opensrf/Evergreen-ILS-3.1.rc/Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/eg.conf
+cp /home/opensrf/Evergreen-ILS-3.1.0/Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/eg.conf
 ----------------------------------------------------------
 
 Upgrade the Evergreen database schema
@@ -237,7 +237,7 @@ as a user with the ability to connect to the database server.
 
 [source, bash]
 ----------------------------------------------------------
-cd /home/opensrf/Evergreen-ILS-3.1.rc/Open-ILS/src/sql/Pg
+cd /home/opensrf/Evergreen-ILS-3.1.0/Open-ILS/src/sql/Pg
 psql -U evergreen -h localhost -f version-upgrade/3.0.5-3.1.0-upgrade-db.sql evergreen
 ----------------------------------------------------------
 

commit 87d47e1d8f6a63ed74485dfc8b6988361a709bd1
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Mar 28 14:18:36 2018 -0400

    Add upgrade note concerning required reingest
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/docs/RELEASE_NOTES_3_1.adoc b/docs/RELEASE_NOTES_3_1.adoc
index c2b9095..efacfa6 100644
--- a/docs/RELEASE_NOTES_3_1.adoc
+++ b/docs/RELEASE_NOTES_3_1.adoc
@@ -5,6 +5,11 @@ Evergreen 3.1 Release Notes
 
 Upgrade notes
 -------------
+Like many major Evergreen upgrades, 3.1 requires a full reingest of your
+bibliographic records before the system is usable again.  While a basic reingest
+is included at the end of the upgrade script, it happens after the main
+COMMIT, so it is safe to cancel that and run the required reingest as you see
+fit (e.g. via pingest.pl).
 
 
 New Features

commit 9498c091e13ec2cffd1683adafdf3eaffc2444d4
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Wed Mar 28 07:08:04 2018 -0700

    Docs: fund tag preservation
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>

diff --git a/docs/admin_initial_setup/ordering_materials.adoc b/docs/admin_initial_setup/ordering_materials.adoc
index 2c4545a..048b099 100644
--- a/docs/admin_initial_setup/ordering_materials.adoc
+++ b/docs/admin_initial_setup/ordering_materials.adoc
@@ -121,6 +121,9 @@ fund.
   *Tags* tab and then click the *Add Tag* button. Select the tag from the
   dropdown menu.
 
+For convenience when propagating or rolling over a fund for a new fiscal year,
+fund tags will be copied from the current fund to the new year's fund.
+
 Ordering
 --------
 

commit c0f874211fecefae4e65a0952cdc23b99d50e3c6
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Wed Mar 28 06:23:28 2018 -0700

    Docs: small readability changes to 3.1 release notes
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>

diff --git a/docs/RELEASE_NOTES_3_1.adoc b/docs/RELEASE_NOTES_3_1.adoc
index e14974d..c2b9095 100644
--- a/docs/RELEASE_NOTES_3_1.adoc
+++ b/docs/RELEASE_NOTES_3_1.adoc
@@ -15,30 +15,30 @@ Administration
 
 New Latency Tester Tool
 ^^^^^^^^^^^^^^^^^^^^^^^
-The Evergreen Web Staff Client now includes a link to a section under
-*Administration -> Workstation* called *Tests*. This page houses a simple tool
+The Evergreen Web Staff Client now includes a section called *Tests* linked from
+*Administration -> Workstation*. The *Tests* page houses a simple tool
 that can be used to test the latency of the websocket connection between the
 client and the server (via the `opensrf.echo` service).
 
 This page displays which Evergreen host server is being queried. Upon hitting
 the blue "Start Test" button for the first time, it will issue 10 sequentially
 fired requests in order to get a solid initial average. Clicking the button a
-second time will just take one more measurement and recalculate the average
+second time will take one more measurement and recalculate the average
 latency. The results can be copied to clipboard for troubleshooting purposes
 and also cleared from display.
 
 marc_export --uris option
 ^^^^^^^^^^^^^^^^^^^^^^^^^
 The marc_export support script now has a `--uris` option (short form:
-`-u`) to export records with located URIs.  When used by itself, it will
-export only records that have located URIs.  When used in conjunction
-with `--items`, it will add records with located URIs but no
-items/copies to the output.  If combined with a `--library` or
+`-u`) to export records with located URIs (i.e. electronic resources).  When
+used by itself, it will export only records that have located URIs.  When
+used in conjunction with `--items`, it will add records with located URIs
+but no items/copies to the output.  If combined with a `--library` or
 `--descendants` option, this option will limit its output to those
 records with URIs at the designated libraries.  The best way to use
 this option is in combination with the `--items` and one of the
 `--library` or `--descendants` options to export *all* of a library's
-holdings both real and electronic.
+holdings both physical and electronic.
 
 
 Architecture
@@ -62,7 +62,7 @@ as a set of one or more Virtual Index Definitions will be simpler search
 configuration management, faster search speed overall, and more practical
 reconfiguration and adjustment as needed.
 
-Previous to this commit, in order to provide field-specific weighting to
+Previously, in order to provide field-specific weighting to
 keyword matches against titles or authors, an administrator must duplicate many
 other index definitions and supply overriding weights to those duplicates. This
 not only complicates configuration, but slows down record ingest as well as
@@ -111,21 +111,6 @@ We also use more Metabib Display Fields in the client. As a result,
 bibliographic fields will display in proper case in more client interfaces and
 in Evergreen reports.
 
-Search Term Highlighting
-++++++++++++++++++++++++
-This commit enables Search Term Highlighting in the OPAC on the main search
-results page, the record detail page, and intermediate pages such as metarecord
-grouped results page. Highlighting search terms will help the user determine why
-a particular record (or set of records) was retrieved.
-
-Highlighting of matched terms uses the same stemming used to accomplish the
-search, as configured per field and class.
-
-This feature will help the user more quickly determine the relevance of a
-particular record by calling their attention to search terms in context. Lastly,
-it will help familiarize the user with how records are searched, including which
-fields are searched as well as exposing concepts like stemming.
-
 Interfaces
 ++++++++++
 A new AngularJS "MARC Search/Facet Fields" interface has been created to replace
@@ -139,25 +124,6 @@ The new Virtual Index Definition data supplier mapping table,
 MARC Search/Facet Fields interface: CREATE_METABIB_FIELD, UPDATE_METABIB_FIELD,
 DELETE_METABIB_FIELD, or ADMIN_METABIB_FIELD for all actions
 
-There is a new template-level global configuration variable in config.tt2 called
-`search.no_highlight` which disables highlighting for users of that config.tt2
-instance.
-
-Public Catalog
-++++++++++++++
-The public and staff catalog will make use of new APIs to identify and display
-highlight-augmented values for those Display Fields used to render the search
-result pages, intermediate metarecord constituent pages, and record detail
-pages.  Highlighting of terms will be performed using the application of
-Template::Toolkit-driven CSS. A generic CSS class identifying a highlighted
-term, along with CSS classes identifying the search class and each search field
-will be available for use for customization of the highlighting. A stock CSS
-template is provided as a baseline upon which sites may expand.
-
-When highlighting is generally enabled, it may be turned on or off on a per-page
-basis through the use of a UI component which will request the page again
-without highlighting.
-
 Backend
 +++++++
 There now exist several new database tables and functions primarily in support
@@ -184,9 +150,9 @@ less weight in default keyword searches.
 Re-ingest or Indexing Dependencies
 ++++++++++++++++++++++++++++++++++
 With the addition and modification of many Index Definitions, a full reingest is
-recommended.  However, search will continue to work as it did before the changes
-in this commit for those records that have not yet been reingested during that
-process.  Therefore a slow, rolling reingest is recommended.
+recommended.  However, search will continue to work as it did previously
+for those records that have not yet been reingested. Therefore a slow, rolling
+reingest is recommended.
 
 Performance Implications or Concerns
 ++++++++++++++++++++++++++++++++++++
@@ -345,8 +311,37 @@ is placing the hold on their behalf.
   library listed, the hold pickup library will default to the
   patron's home library.
 
-OPAC
-~~~~
+Public Catalog
+~~~~~~~~~~~~~~
+
+Search Term Highlighting
+^^^^^^^^^^^^^^^^^^^^^^^^
+Evergreen now highlights search terms on the public catalog's main search
+results page, the record detail page, and intermediate pages such as metarecord
+grouped results page. Highlighting search terms will help the user determine why
+a particular record (or set of records) was retrieved.
+
+Highlighting of matched terms uses the same stemming used to accomplish the
+search, as configured per field and class.
+
+This feature will help the user more quickly determine the relevance of a
+particular record by calling their attention to search terms in context. Lastly,
+it will help familiarize the user with how records are searched, including which
+fields are searched as well as exposing concepts like stemming.
+
+You can turn off search term highlighting by uncommenting the line
+`search.no_highlight = 1;` in `config.tt2`.
+
+When highlighting is generally enabled, it may be turned on or off on a per-page
+basis through the use of a UI component which will request the page again
+without highlighting.
+
+Highlighting of terms uses Template::Toolkit-driven CSS. A generic CSS class
+identifying a highlighted term, along with CSS classes identifying the search
+class and each search field are available for use for customization of the
+highlighting. A stock CSS template is provided as a baseline upon which sites
+may expand.
+
 
 Copy Location Filter Displays for System Searches
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -368,7 +363,7 @@ Multilingual Search
 This change allows us to configure multilingual search, by extracting values
 from both the 008 controlfield and the 041 datafield.  Because the values
 in each can be normalized to the same controlled list (and, in practice, are
-already from the same normalized value set), OPAC searches can now use normal
+already from the same normalized value set), catalog searches can now use normal
 boolean search semantics to find records with various combinations of
 language attributes.
 
@@ -377,10 +372,10 @@ E.g., in the concerto test data:
   * `keyword: piano item_lang(eng) item_lang(ita)`
 
 
-Optional Display of Badges in OPAC
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Optional Display of Badges in Catalog
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 A new setting controls whether badges (popularity, etc.) are displayed
-in the OPAC. If you do not wish badges to be displayed, set the
+in the catalog. If you do not wish badges to be displayed, set the
 `ctx.hide_badge_scores` setting to "true" in `config.tt2`.
 
 

commit 4cb3db329ed820c751150ccaaf6c0c62015a9a21
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Wed Mar 28 06:04:01 2018 -0700

    Docs: adding info about new setting to 3.1 release notes
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>

diff --git a/docs/RELEASE_NOTES_3_1.adoc b/docs/RELEASE_NOTES_3_1.adoc
index 5def9cd..e14974d 100644
--- a/docs/RELEASE_NOTES_3_1.adoc
+++ b/docs/RELEASE_NOTES_3_1.adoc
@@ -331,6 +331,19 @@ Adds a mailto link to the patron's email in their profile so it can
 be clicked to send and email to the patron. No new settings or
 permissions are included in this feature.
 
+Pickup Library for Staff-placed Holds
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Adds a new library setting, _circ.staff_placed_holds_fallback_to_ws_ou_,
+that helps determine the hold pickup library in cases where patrons don't
+have a preferred hold pickup library in their account and a staff member
+is placing the hold on their behalf.
+
+  * When this setting is true and the patron doesn't have a preferred
+  library listed, the hold pickup library will default to the
+  workstation's organizational unit.
+  * When this setting is false and the patron doesn't have a preferred
+  library listed, the hold pickup library will default to the
+  patron's home library.
 
 OPAC
 ~~~~

commit 9d3c5a128a1ad5a31730a44cf07391339beba02e
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Tue Mar 27 16:30:35 2018 -0400

    LP#1757526: escape more catalog data (MFHD edition)
    
    This patch ensures that data derived from MFHDs is escaped
    for in the issues held tab on the public catalog record display
    page.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2 b/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2
index ced0ec6..bd6bb97 100644
--- a/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2
@@ -20,7 +20,7 @@
                 NEXT UNLESS serial.$type.size;
                 IF !printed_mfhd_header; %]
                 <tr>
-                    <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
+                    <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) | html %]</td>
                 </tr>
                 [% printed_mfhd_header = 1;
                 END; %]
@@ -28,7 +28,7 @@
                     <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
                     <td class="rdetail-mfhd-contents">[%
                         FOR thing IN serial.$type;
-                            thing.join(", ");
+                            thing.join(", ") | html;
                         END %]</td>
                 </tr>
             [% END;

commit 50199327a9f6ae0fe0741d4e3b73faa4a3047b91
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Mar 21 22:08:35 2018 +0100

    LP1757526 Escape displayed catalogue data
    
    Content in content fields (5xx) as well as for the names of locations in copy
    count alt text was not being properly escaped, allowing for the possibility of
    executing arbitrary JavaScript in the case of a malicious catalogue record
    (whether edited in the system, or imported)
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/contents.tt2 b/Open-ILS/src/templates/opac/parts/record/contents.tt2
index 87057dc..db80b47 100644
--- a/Open-ILS/src/templates/opac/parts/record/contents.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/contents.tt2
@@ -177,8 +177,7 @@ BLOCK render_contents;
             all_content.push(subfield.textContent);
         END;
         total_contents = all_content.join(" ").replace('\s+$', '');
-        %] [% total_contents;
-        IF total_contents.size; "<br/>"; END;
+        %] [% "<div class='content_field'>"; total_contents | html ; "</div>";
         FOREACH link880 IN graphics;
             '<div class="graphic880"' _ link880.dir _ '>';
             link880.value | html;
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
index eee85e8..e6e783f 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
@@ -23,7 +23,7 @@
     [%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
         IF ou_count > 0 && this_depth != ctx.copy_depth %]
     <a href="[% mkurl('', {copy_depth => this_depth}, ['copy_offset']); %]"
-       title="[% l('Show copies at [_1]', ou_name); %]">
+       title="[% l('Show copies at [_1]', ou_name) | html; %]">
        [%- l('(Show)'); %]</a>
     [%- END; %]
     </li>
@@ -43,7 +43,7 @@
             attrs.plib_copy_counts.$depth.count,
             ou_name) | html
     %] <a href="[% mkurl('', {locg => ou_id}, ['copy_offset']); %]"
-       title="[% l('Show copies at [_1]', ou_name); %]">[%
+       title="[% l('Show copies at [_1]', ou_name) | html; %]">[%
        l('(Show preferred library)');
     %]</a></li>
     [%- END %]

-----------------------------------------------------------------------


hooks/post-receive
-- 
Evergreen ILS




More information about the open-ils-commits mailing list