[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 83e923049146ecf41625805d922fcc86336fc8fe

Evergreen Git git at git.evergreen-ils.org
Thu Mar 22 19:44:19 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, rel_3_0 has been updated
       via  83e923049146ecf41625805d922fcc86336fc8fe (commit)
       via  6f7aeaa56d0aa4671ba03dc863ea2a3c650f7171 (commit)
       via  978479d8e6f50465ec4049db60d01c002a09c1b9 (commit)
      from  6ec4c7a9acd6dce77202e637268275b28bda42a1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 83e923049146ecf41625805d922fcc86336fc8fe
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Thu Mar 22 19:36:19 2018 -0400

    LP#1731960: Stamping upgrade script for preserve book bags on bib merge
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    
    Conflicts:
    	Open-ILS/src/sql/Pg/002.schema.config.sql

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 04bc915..d1285ea 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,7 +92,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1088', :eg_version); -- miker/dyrcona
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1107', :eg_version); --rhamby/kmlussier
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preserve_book_bags_on_bib_merge.sql b/Open-ILS/src/sql/Pg/upgrade/1107.schema.preserve_book_bags_on_bib_merge.sql
similarity index 99%
rename from Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preserve_book_bags_on_bib_merge.sql
rename to Open-ILS/src/sql/Pg/upgrade/1107.schema.preserve_book_bags_on_bib_merge.sql
index 4fe99ac..3f83f74 100644
--- a/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preserve_book_bags_on_bib_merge.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1107.schema.preserve_book_bags_on_bib_merge.sql
@@ -1,6 +1,6 @@
 BEGIN;
   
-SELECT evergreen.upgrade_deps_block_check('xxxx', :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

commit 6f7aeaa56d0aa4671ba03dc863ea2a3c650f7171
Author: Rogan Hamby <rogan.hamby at gmail.com>
Date:   Thu Mar 22 13:50:52 2018 -0400

    LP#1731960: adding upgrade script for updating the function
    
    Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preserve_book_bags_on_bib_merge.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preserve_book_bags_on_bib_merge.sql
new file mode 100644
index 0000000..4fe99ac
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preserve_book_bags_on_bib_merge.sql
@@ -0,0 +1,269 @@
+BEGIN;
+  
+SELECT evergreen.upgrade_deps_block_check('xxxx', :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;

commit 978479d8e6f50465ec4049db60d01c002a09c1b9
Author: Rogan Hamby <rogan.hamby at gmail.com>
Date:   Tue Nov 21 18:50:34 2017 -0500

    LP#1731960-preserving book bag entries with new values during bib merge
    
    The asset.merge_record_assets() removes bib records from containers when
    merging and deleting the record as appropriate but bib containers with
    the btype of 'bookbag' (used as reading lists) should instead be updated
    to the new bib record. Includes Pgtap test.
    
    Signed-off-by: Rogan Hamby <rhamby at equinoxinitiative.org>
    Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    
    Conflicts:
    	Open-ILS/src/sql/Pg/999.functions.global.sql
    
    Conflicts:
    	Open-ILS/src/sql/Pg/999.functions.global.sql

diff --git a/Open-ILS/src/sql/Pg/999.functions.global.sql b/Open-ILS/src/sql/Pg/999.functions.global.sql
index dc72926..b9a4849 100644
--- a/Open-ILS/src/sql/Pg/999.functions.global.sql
+++ b/Open-ILS/src/sql/Pg/999.functions.global.sql
@@ -1212,6 +1212,12 @@ BEGIN
 		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;
 
diff --git a/Open-ILS/src/sql/Pg/t/lp1731960_test_preserving_bookbag_entries.pg b/Open-ILS/src/sql/Pg/t/lp1731960_test_preserving_bookbag_entries.pg
new file mode 100644
index 0000000..5c16d8e
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/lp1731960_test_preserving_bookbag_entries.pg
@@ -0,0 +1,59 @@
+BEGIN;
+
+SELECT plan(2);
+
+----------------------------------
+--
+-- Setup Test environment and data
+--
+----------------------------------
+
+-- test records to dedupe and containers:
+-- bib 60500 (source)
+-- bib 60501 (target)
+--  
+
+-- create bib 60,500
+INSERT into biblio.record_entry (id, marc, last_xact_id)
+  VALUES (60500, 
+  $$
+<record    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"    xmlns="http://www.loc.gov/MARC21/slim"><leader>01938cam a2200337Ii 4500</leader><controlfield tag="001">8274393</controlfield><controlfield tag="005">20170831142031.0</controlfield><controlfield tag="008">170522s2017    mauaf  e      000 1 eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781328791825</subfield><subfield code="q">(hardcover)</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1328791823</subfield><subfield code="q">(hardcover)</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)987617974</subfield></datafield><datafield tag="082" ind1="0" ind2="4"><subfield code="a">823/.912</subfield><subfield code="2">23</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Tolk
 ien, J. R. R.</subfield><subfield code="q">(John Ronald Reuel),</subfield><subfield code="d">1892-1973,</subfield><subfield code="e">author.</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Beren and L&#xFA;thien /</subfield><subfield code="c">by J.R.R. Tolkien ; edited by Christopher Tolkien ; with illustrations by Alan Lee.</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">First U.S. edition.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Boston :</subfield><subfield code="b">Houghton Mifflin Harcourt,</subfield><subfield code="c">2017.</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">288 pages, 9 unnumbered leaves of plates :</subfield><subfield code="b">illustrations (some color) ;</subfield><subfield code="c">22 cm.</subfield></datafield></record>
+  $$,
+  'PGTAP'
+  );
+
+
+-- create bib 60,501
+INSERT into biblio.record_entry (id, marc, last_xact_id)
+  VALUES (60001,
+  $$
+<record    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"    xmlns="http://www.loc.gov/MARC21/slim"><leader>01938cam a2200337Ii 4500</leader><controlfield tag="001">8274392</controlfield><controlfield tag="005">20170831142031.0</controlfield><controlfield tag="008">170522s2017    mauaf  e      000 1 eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781328791825</subfield><subfield code="q">(hardcover)</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1328791823</subfield><subfield code="q">(hardcover)</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)987617974</subfield></datafield><datafield tag="082" ind1="0" ind2="4"><subfield code="a">823/.912</subfield><subfield code="2">23</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Tolk
 ien, J. R. R.</subfield><subfield code="q">(John Ronald Reuel),</subfield><subfield code="d">1892-1973,</subfield><subfield code="e">author.</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Beren and L&#xFA;thien /</subfield><subfield code="c">by J.R.R. Tolkien ; edited by Christopher Tolkien ; with illustrations by Alan Lee.</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">First U.S. edition.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Boston :</subfield><subfield code="b">Houghton Mifflin Harcourt,</subfield><subfield code="c">2017.</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">288 pages, 9 unnumbered leaves of plates :</subfield><subfield code="b">illustrations (some color) ;</subfield><subfield code="c">22 cm.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="a">text</subfield><subfield code="b">txt</subfield><subf
 ield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="a">unmediated</subfield><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="a">volume</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="520" ind1=" " ind2=" "><subfield code="a">Beren was a mortal man, but L&#xFA;thien was an immortal elf. Her father, a great elvish lord, in deep opposition to Beren, imposed on him an impossible task that he must perform before he might wed L&#xFA;thien. To show something of the process whereby this legend of Middle-earth evolved over the years, Christopher Tolkien has told the story in his father's own words by giving, first, its original form, and then passages in prose and verse from later texts that illustrate the narrative as it changed. Presented together for the first time, they reveal aspects of the story, both in event and
  in narrative immediacy, that were afterwards lost.--</subfield><subfield code="c">From publisher's description.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Middle Earth (Imaginary place)</subfield><subfield code="v">Fiction.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Elves</subfield><subfield code="v">Fiction.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Quests (Expeditions)</subfield><subfield code="v">Fiction.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Good and evil</subfield><subfield code="v">Fiction.</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">Fantasy fiction.</subfield><subfield code="2">lcgft</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Tolkien, Christopher,</subfield><subfield code="e">editor.</subfield></datafield><datafield tag="700" ind1="1" ind2=" ">
 <subfield code="a">Lee, Alan,</subfield><subfield code="e">illustrator.</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Tolkien, J. R. R.</subfield><subfield code="q">(John Ronald Reuel),</subfield><subfield code="d">1892-1973.</subfield><subfield code="t">Silmarillion.</subfield></datafield></record>
+  $$,
+  'PGTAP'
+  );
+
+INSERT INTO container.biblio_record_entry_bucket (id, owner, name, btype) 
+    VALUES 
+    (101, 1, 'Bookbag Bucket', 'bookbag'); 
+
+INSERT INTO container.biblio_record_entry_bucket_item (id, bucket, target_biblio_record_entry) 
+    VALUES 
+    (101, 101, 60500);
+
+-----------------------------------
+-- Test asset.merge_record_assets() 
+-----------------------------------
+
+SELECT is(asset.merge_record_assets(60501, 60500), 0, 'Record assets merged!');
+
+-- check if bucket 101's entry 101 was updated to 60501
+SELECT is(
+  (SELECT target_biblio_record_entry from container.biblio_record_entry_bucket_item where id=101)::BIGINT,
+  60501::BIGINT,
+  'LP 1731960 asset.merge_record_assets() preserve book bag entries, bib bucket item 101 should be 60501'
+);
+
+SELECT * FROM finish();
+
+ROLLBACK;
+

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/999.functions.global.sql       |    6 ++
 .../t/lp1731960_test_preserving_bookbag_entries.pg |   59 ++++++++++++++++++++
 ...107.schema.preserve_book_bags_on_bib_merge.sql} |   10 +++-
 4 files changed, 74 insertions(+), 3 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/t/lp1731960_test_preserving_bookbag_entries.pg
 copy Open-ILS/src/sql/Pg/upgrade/{1079.schema.fix_asset_merge.sql => 1107.schema.preserve_book_bags_on_bib_merge.sql} (95%)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list