[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 815f5e2dfd49019b9962d5a9e28eda3677f8e8dd

Evergreen Git git at git.evergreen-ils.org
Thu May 16 11:24:38 EDT 2013


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_2_2 has been updated
       via  815f5e2dfd49019b9962d5a9e28eda3677f8e8dd (commit)
       via  1b7a2d1d14838f2a196d09cb1fa2bbcdbc044b03 (commit)
       via  b610f9ab1ae0b14c2927a27e5537a8ce9eecb755 (commit)
       via  879c459db9d50a5e7b6e41061a996bd04e3429a8 (commit)
       via  a0ea0311956079a4f56b8342f5841df3795f3890 (commit)
      from  af1a7ccf5a82e2fbf03f4a8e366502148afb4ef1 (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 815f5e2dfd49019b9962d5a9e28eda3677f8e8dd
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Apr 3 15:30:40 2013 -0400

    stamping upgrade for field 264 reporter view
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index ab6ee88..dedbb43 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -87,7 +87,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 ('0787', :eg_version); -- callender/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0788', :eg_version); -- bshum/dbwells
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter_264_pubinfo.sql b/Open-ILS/src/sql/Pg/upgrade/0788.schema.reporter_264_pubinfo.sql
similarity index 96%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter_264_pubinfo.sql
rename to Open-ILS/src/sql/Pg/upgrade/0788.schema.reporter_264_pubinfo.sql
index bddcf84..8431105 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter_264_pubinfo.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0788.schema.reporter_264_pubinfo.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0788', :eg_version);
 
 -- New view including 264 as a potential tag for publisher and pubdate
 CREATE OR REPLACE VIEW reporter.old_super_simple_record AS

commit 1b7a2d1d14838f2a196d09cb1fa2bbcdbc044b03
Author: Ben Shum <bshum at biblio.org>
Date:   Thu Jan 31 12:20:20 2013 -0500

    LP1071505 - Add 264 RDA tag to reporter views
    
    Some reports draw from reporter.materialized_simple_record table and these
    were not made aware of the new 264 tag which contains publisher related
    information.
    
    Change the view for reporter.old_super_simple_record, which feeds into the
    other reporter table.
    
    The included upgrade SQL will update this view and then update the table using
    the new view.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/reporter-schema.sql b/Open-ILS/src/sql/Pg/reporter-schema.sql
index 25532b6..bad6892 100644
--- a/Open-ILS/src/sql/Pg/reporter-schema.sql
+++ b/Open-ILS/src/sql/Pg/reporter-schema.sql
@@ -163,8 +163,8 @@ SELECT  r.id,
   FROM  biblio.record_entry r
     LEFT JOIN metabib.full_rec title ON (r.id = title.record AND title.tag = '245' AND title.subfield = 'a')
     LEFT JOIN metabib.full_rec author ON (r.id = author.record AND author.tag IN ('100','110','111') AND author.subfield = 'a')
-    LEFT JOIN metabib.full_rec publisher ON (r.id = publisher.record AND publisher.tag = '260' AND publisher.subfield = 'b')
-    LEFT JOIN metabib.full_rec pubdate ON (r.id = pubdate.record AND pubdate.tag = '260' AND pubdate.subfield = 'c')
+    LEFT JOIN metabib.full_rec publisher ON (r.id = publisher.record AND (publisher.tag = '260' OR (publisher.tag = '264' AND publisher.ind2 = '1')) AND publisher.subfield = 'b')
+    LEFT JOIN metabib.full_rec pubdate ON (r.id = pubdate.record AND (pubdate.tag = '260' OR (pubdate.tag = '264' AND pubdate.ind2 = '1')) AND pubdate.subfield = 'c')
     LEFT JOIN metabib.full_rec isbn ON (r.id = isbn.record AND isbn.tag IN ('024', '020') AND isbn.subfield IN ('a','z'))
     LEFT JOIN metabib.full_rec issn ON (r.id = issn.record AND issn.tag = '022' AND issn.subfield = 'a')
   GROUP BY 1,2,3,4,5;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter_264_pubinfo.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter_264_pubinfo.sql
new file mode 100644
index 0000000..bddcf84
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter_264_pubinfo.sql
@@ -0,0 +1,37 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+-- New view including 264 as a potential tag for publisher and pubdate
+CREATE OR REPLACE VIEW reporter.old_super_simple_record AS
+SELECT  r.id,
+    r.fingerprint,
+    r.quality,
+    r.tcn_source,
+    r.tcn_value,
+    FIRST(title.value) AS title,
+    FIRST(author.value) AS author,
+    ARRAY_TO_STRING(ARRAY_ACCUM( DISTINCT publisher.value), ', ') AS publisher,
+    ARRAY_TO_STRING(ARRAY_ACCUM( DISTINCT SUBSTRING(pubdate.value FROM $$\d+$$) ), ', ') AS pubdate,
+    ARRAY_ACCUM( DISTINCT REPLACE(SUBSTRING(isbn.value FROM $$^\S+$$), '-', '') ) AS isbn,
+    ARRAY_ACCUM( DISTINCT REGEXP_REPLACE(issn.value, E'^\\S*(\\d{4})[-\\s](\\d{3,4}x?)', E'\\1 \\2') ) AS issn
+  FROM  biblio.record_entry r
+    LEFT JOIN metabib.full_rec title ON (r.id = title.record AND title.tag = '245' AND title.subfield = 'a')
+    LEFT JOIN metabib.full_rec author ON (r.id = author.record AND author.tag IN ('100','110','111') AND author.subfield = 'a')
+    LEFT JOIN metabib.full_rec publisher ON (r.id = publisher.record AND (publisher.tag = '260' OR (publisher.tag = '264' AND publisher.ind2 = '1')) AND publisher.subfield = 'b')
+    LEFT JOIN metabib.full_rec pubdate ON (r.id = pubdate.record AND (pubdate.tag = '260' OR (pubdate.tag = '264' AND pubdate.ind2 = '1')) AND pubdate.subfield = 'c')
+    LEFT JOIN metabib.full_rec isbn ON (r.id = isbn.record AND isbn.tag IN ('024', '020') AND isbn.subfield IN ('a','z'))
+    LEFT JOIN metabib.full_rec issn ON (r.id = issn.record AND issn.tag = '022' AND issn.subfield = 'a')
+  GROUP BY 1,2,3,4,5;
+
+-- Update reporter.materialized_simple_record with new 264-based values for publisher and pubdate
+DELETE FROM reporter.materialized_simple_record WHERE id IN (
+    SELECT DISTINCT record FROM metabib.full_rec WHERE tag = '264' AND subfield IN ('b', 'c')
+);
+
+INSERT INTO reporter.materialized_simple_record
+    SELECT DISTINCT rossr.* FROM reporter.old_super_simple_record rossr INNER JOIN metabib.full_rec mfr ON mfr.record = rossr.id
+        WHERE mfr.tag = '264' AND mfr.subfield IN ('b', 'c')
+;
+
+COMMIT;

commit b610f9ab1ae0b14c2927a27e5537a8ce9eecb755
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Oct 10 17:00:54 2012 -0400

    LP1071505 - Add 264 RDA tag to TPAC pubinfo display
    
    Prior to this, TPAC only retrieved the 260 tag for publication info. Allow for
    the possibility that the 264 tag might exist and contain relevant information.
    Special note: the 264 tag must have a second indicator value of 1 to be meant
    for publication statement.
    
    Also, this only picks out the first 260 or 264 tags in any given bib record.
    
    Approach inspired by Dan Scott's approach taken for finding edition statements.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    
    Conflicts:
    	Open-ILS/src/templates/opac/parts/misc_util.tt2
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 1077353..a52c5e5 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -48,19 +48,25 @@
         args.title_extended = titsubs_content.join(" ");
 
         args.pubplaces = [];
-        FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="a"]');
+        pubplace_hunt = xml.findnodes('//*[@tag="260"]/*[@code="a"]') ||
+            xml.findnodes('//*[@tag="264" and @ind2="1"]/*[@code="a"]');
+        FOR sub IN pubplace_hunt;
             args.pubplaces.push(sub.textContent);
         END;
         args.pubplace = (args.pubplaces.size) ? args.pubplaces.0 : '';
 
         args.publishers = [];
-        FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="b"]');
+        publishers_hunt = xml.findnodes('//*[@tag="260"]/*[@code="b"]') ||
+            xml.findnodes('//*[@tag="264" and @ind2="1"]/*[@code="b"]');
+        FOR sub IN publishers_hunt;
             args.publishers.push(sub.textContent);
         END;
         args.publisher = (args.publishers.size) ? args.publishers.0 : '';
 
         args.pubdates = [];
-        FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="c"]');
+        pubdates_hunt = xml.findnodes('//*[@tag="260"]/*[@code="c"]') || 
+            xml.findnodes('//*[@tag="264" and @ind2="1"]/*[@code="c"]');
+        FOR sub IN pubdates_hunt;
             args.pubdates.push(sub.textContent);
         END;
         args.pubdate = (args.pubdates.size) ? args.pubdates.0 : '';

commit 879c459db9d50a5e7b6e41061a996bd04e3429a8
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Sep 12 12:59:53 2012 -0400

    TPAC: Results - don't show the pubdate if we're showing full pubinfo
    
    In the "show few details" mode, we show just the pubdate; in the "show
    full details" mode, we're showing the full pubinfo and therefore do not
    need to show the stubby pubdate.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 647e58e..45ddd61 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -62,6 +62,11 @@
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a></em>
+                                                                    [%- UNLESS CGI.param('detail_record_view')
+                                                                        OR (show_more_details.default == 'true'
+                                                                        OR show_more_details.default == 'hide')
+                                                                    %] [% attrs.pubdate | html %]
+                                                                    [%- END -%]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">

commit a0ea0311956079a4f56b8342f5841df3795f3890
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Sep 12 11:50:03 2012 -0400

    TPAC: Display full publication info
    
    In both the results table and record summary, we were failing to display
    the place of publication - which is critical information for people
    trying to track down the right edition or constructing a bibliography.
    
    Grab the place of publication, and then reconstruct 260abc (avoiding
    another XPath iteration and giving ourselves the ability to enhance the
    schema.org microdata at the same time).
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index cfe4c4a..1077353 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -47,6 +47,12 @@
             FOR sub IN titsubs; titsubs_content.push(sub.textContent); END;
         args.title_extended = titsubs_content.join(" ");
 
+        args.pubplaces = [];
+        FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="a"]');
+            args.pubplaces.push(sub.textContent);
+        END;
+        args.pubplace = (args.pubplaces.size) ? args.pubplaces.0 : '';
+
         args.publishers = [];
         FOR sub IN xml.findnodes('//*[@tag="260"]/*[@code="b"]');
             args.publishers.push(sub.textContent);
@@ -59,6 +65,9 @@
         END;
         args.pubdate = (args.pubdates.size) ? args.pubdates.0 : '';
 
+        # Full publisher info
+        args.pubinfo = "$args.pubplace $args.publisher $args.pubdate";
+
         args.summaries = [];
         FOR sub IN xml.findnodes('//*[@tag="520"]/*[@code="a"]');
             args.summaries.push(sub.textContent);
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2
index 3b348d6..33916fe 100644
--- a/Open-ILS/src/templates/opac/parts/record/summary.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2
@@ -140,12 +140,15 @@ IF num_uris > 0;
     [%- IF attrs.publisher %]
     <li id='rdetail_publisher'>
         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
-        <span class='rdetail_value' itemprop="publisher">[%
-            attrs.publisher | html;
-        %]</span>
-        [% IF attrs.pubdate; %]
-        <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
-        [% END; %]
+        <span class='rdetail_value' itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
+        [%- IF attrs.pubplace; %]
+            <span itemprop="location">[% attrs.pubplace | html; %]</span>
+        [%- END; %]
+            <span itemprop="name">[% attrs.publisher | html; %]</span>
+        </span>
+        [%- IF attrs.pubdate; %]
+            <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
+        [%- END; %]
     </li>
     [%- END %]
 </ul>
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 21ccaa4..647e58e 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -62,8 +62,6 @@
                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a></em>
-                                                        &nbsp;&nbsp;
-                                                        [% attrs.pubdate | html %]
                                                     </div>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
@@ -79,12 +77,12 @@
                                                         [% IF CGI.param('detail_record_view') %]
                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
 
-                                                        [% IF attrs.publisher %]
+                                                        [% IF attrs.pubinfo %]
                                                             <tr name="results_pub_tr">
                                                                 <td valign="top">
                                                                     <strong>[% l('Publisher:') %]</strong>
                                                                 </td>
-                                                                <td>[% attrs.publisher | html %]</td>
+                                                                <td>[% attrs.pubinfo | html %]</td>
                                                             </tr>
                                                         [% END %]
                                                         [% IF attrs.isbns.size > 0 %]

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/reporter-schema.sql            |    4 +-
 .../upgrade/0788.schema.reporter_264_pubinfo.sql   |   37 ++++++++++++++++++++
 Open-ILS/src/templates/opac/parts/misc_util.tt2    |   19 +++++++++-
 .../src/templates/opac/parts/record/summary.tt2    |   15 +++++---
 Open-ILS/src/templates/opac/parts/result/table.tt2 |   11 ++++--
 6 files changed, 73 insertions(+), 15 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0788.schema.reporter_264_pubinfo.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list