[open-ils-commits] r17423 - in tags/rel_1_6_0_8: . Open-ILS/src/perlmods/OpenILS Open-ILS/src/sql/Pg (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 1 11:24:26 EDT 2010


Author: miker
Date: 2010-09-01 11:24:23 -0400 (Wed, 01 Sep 2010)
New Revision: 17423

Added:
   tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.5-1.6.0.6-upgrade-db.sql
   tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.6-1.6.0.7-upgrade-db.sql
Modified:
   tags/rel_1_6_0_8/ChangeLog
   tags/rel_1_6_0_8/Open-ILS/src/perlmods/OpenILS/Application.pm
   tags/rel_1_6_0_8/README
Log:
previous upgrade scripts and version bumping

Modified: tags/rel_1_6_0_8/ChangeLog
===================================================================
--- tags/rel_1_6_0_8/ChangeLog	2010-09-01 15:11:06 UTC (rev 17422)
+++ tags/rel_1_6_0_8/ChangeLog	2010-09-01 15:24:23 UTC (rev 17423)
@@ -1 +1,154 @@
-#ChangeLog
+2010-08-05  gmc
+
+	* bug 613703: normalize backdate on item checkin better
+	  
+	  Fixes bug that appears to cause all checkins uploaded
+	  via offline circ to fail with an "invalid date format"
+	  error.
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+2010-08-06  gmc
+
+	* Patch from Bill Erickson backporting various autogrid fixes
+	  
+	  * includes autogrid caching and paging
+	  * purpose is to more gracefully handle large circ and
+	  hold policy matrixes in the 1.6.0.x branch
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+	* bug 614132: fix glitch when used cached permission group widget
+	  
+	  Fixes bug where the initial permission group value in a circ or
+	  hold matrix entry was not displayed when editing an
+	  existing matchpoint.
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+	* bug 614150: bail out on ACTOR_USER_NOT_FOUND
+	  
+	  This fixes a bug where uploading an offline checkout
+	  that refers to a missing patron returns an INTERNAL_SERVER_ERROR
+	  instead of ACTOR_USER_NOT_FOUND. More generally, this avoids
+	  an exception in case case where a circ operation is made
+	  without checking the existence of the patron record beforehand.
+	  
+	  mk_env could use a better name, too.
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+2010-08-06  phasefx
+
+	* backporting changeset 16688 for more robust printing (addresses
+	  some "inner print_tree" errors). See
+	  https://bugs.launchpad.net/evergreen/+bug/567505/
+
+2010-08-06  gmc
+
+	* bug 532217: work around caching issue resulting doubled title
+	  display
+	  
+	  Quick hack shamelessly borrowed from Dan Scott to fix problem
+	  of title being displayed twice on bib details page when back
+	  button is used in OPAC or staff client.
+	  
+	  This is a temporary fix in lieu of rewriting the bib details
+	  display to use BibTemplate exclusively.
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+2010-08-09  dbs
+
+	* Patch from Ben Ostrowsky <ben at esilibrary.com> to specify "staff
+	  account" in proxied pages
+	  
+	  This change will make it a bit more clear that we're not looking
+	  for a
+	  patron barcode/PIN in the Selfcheck Login screen (and make the
+	  wording
+	  consistent across similar login pages).
+
+2010-08-10  gmc
+
+	* fix age protection proximity test for in-DB circ
+	  
+	  Patch from John Craig.
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+	* remove extra DB upgrade script
+	  
+	  Thought better of including it in the backport to rel_1_6_0
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+	* bug 592777: allow authoritative version of open-ils.circ.retrieve
+	  
+	  Part of a fix to avoid race condition that can occur
+	  when patron renews an item in the OPAC in a database
+	  that uses pgpool and replication, which sometimes
+	  results in an erroneous 'action_circulation_not_found' error.
+	  
+	  Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+
+2010-08-12  dbs
+
+	* Remove broken old JavaScript in Google Book preview code
+	  
+	  I /think/ this was supposed to change the title of the "Preview"
+	  link to
+	  "Read this online" or the like in the case that the full text is
+	  available,
+	  but it was relying on a function that didn't exist (setText) and
+	  trying
+	  to reference an ID that didn't exists. So it broke in those rare
+	  cases
+	  where Google Books did provide the full text.
+
+	* Enable "Delete address" button to work in rel_1_6
+	  
+	  In some ways the inverse of r17023, the else clause that enabled
+	  the delete button to be enabled was never being reached because
+	  the preceding clauses caught all cases.
+	  
+	  Moving it outside of the foreach() loop entirely seems to resolve
+	  the problem.
+
+	* Show the "Active?" checkbox as part of the required (minimal) set
+	  of fields
+	  
+	  As we're registering users, it's probably a good idea to ensure
+	  that staff
+	  can set the user to active at the same time that they enter the
+	  minimal
+	  patron information.
+
+	* And get that closing brace back in place for the Dojo user editor
+
+2010-08-18  miker
+
+	* Backport of 17243: so, some datasets have records with multiple
+	  245a subfields. yeah, really.
+
+2010-08-21  miker
+
+	* backport of r17299: we need an index on LOWER(barcode) with
+	  r17018
+
+2010-08-24  atz
+
+	* 1-line fix for false 404 from sylvar
+	  
+	  solves "The requested URL
+	  /xul/rel_1_6_0_7/server/patron/ue.xhtml&clone=112879 was not
+	  found on this server."
+
+2010-08-31  phasefx
+
+	* fixes a bug when purging offline transactions after an Export
+
+2010-09-01  miker
+
+	* .: Tagging 1.6.0.8 ... let's hope this is the last 1.6.0!
+

Modified: tags/rel_1_6_0_8/Open-ILS/src/perlmods/OpenILS/Application.pm
===================================================================
--- tags/rel_1_6_0_8/Open-ILS/src/perlmods/OpenILS/Application.pm	2010-09-01 15:11:06 UTC (rev 17422)
+++ tags/rel_1_6_0_8/Open-ILS/src/perlmods/OpenILS/Application.pm	2010-09-01 15:24:23 UTC (rev 17423)
@@ -5,7 +5,7 @@
 
 sub ils_version {
     # version format is "x-y-z-p", for example "1-2-1-0" for Evergreen 1.2.1.0
-    return "1-5";
+    return "1-6-0-8";
 }
 
 __PACKAGE__->register_method(

Added: tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.5-1.6.0.6-upgrade-db.sql
===================================================================
--- tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.5-1.6.0.6-upgrade-db.sql	                        (rev 0)
+++ tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.5-1.6.0.6-upgrade-db.sql	2010-09-01 15:24:23 UTC (rev 17423)
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2010  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+BEGIN;
+
+INSERT INTO config.upgrade_log(version) VALUES ('1.6.0.6');
+
+COMMIT;

Added: tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.6-1.6.0.7-upgrade-db.sql
===================================================================
--- tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.6-1.6.0.7-upgrade-db.sql	                        (rev 0)
+++ tags/rel_1_6_0_8/Open-ILS/src/sql/Pg/1.6.0.6-1.6.0.7-upgrade-db.sql	2010-09-01 15:24:23 UTC (rev 17423)
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2010  Equinox Software, Inc.
+ * Mike Rylander <miker at esilibrary.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+BEGIN;
+
+INSERT INTO config.upgrade_log(version) VALUES ('1.6.0.7');
+
+CREATE INDEX atev_target_def_idx ON action_trigger.event (target,event_def);
+
+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;
+    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
+
+        SELECT  COUNT(*) INTO counter
+          FROM  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) || '">' ||
+                        array_to_string(
+                            array_accum(
+                                '<subfield code="' || subfield || '">' ||
+                                regexp_replace(
+                                    regexp_replace(
+                                        regexp_replace(data,'&','&amp;','g'),
+                                        '>', '&gt;', 'g'
+                                    ),
+                                    '<', '&lt;', 'g'
+                                ) || '</subfield>'
+                            ), ''
+                        ) || '</datafield>' INTO uri_datafield
+              FROM  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);
+
+            uri_text := uri_text || 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 owning_lib = source_cn.owning_lib
+            AND record = target_record;
+
+        -- ... 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;
+
+        -- ... 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;
+
+    -- 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;

Modified: tags/rel_1_6_0_8/README
===================================================================
--- tags/rel_1_6_0_8/README	2010-09-01 15:11:06 UTC (rev 17422)
+++ tags/rel_1_6_0_8/README	2010-09-01 15:24:23 UTC (rev 17423)
@@ -1,4 +1,4 @@
-README for Evergreen 1.6
+README for Evergreen 1.6.0.8
 
 Installing prerequisites:
 ========================
@@ -40,7 +40,7 @@
 Once you have configured and compiled Evergreen, issue the following
 command as the root user to install Evergreen:
 
-make STAFF_CLIENT_BUILD_ID=rel_1_6_0_0 install
+make STAFF_CLIENT_BUILD_ID=rel_1_6_0_8 install
 
 This will install Evergreen, including example configuration files in
 /openils/conf/ that you can use as templates for your own configuration files.



More information about the open-ils-commits mailing list