[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. c924ea4250046fb74e360c454961cab6f9f18f6c

Evergreen Git git at git.evergreen-ils.org
Fri May 4 15:54:11 EDT 2012


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_0 has been updated
       via  c924ea4250046fb74e360c454961cab6f9f18f6c (commit)
       via  f3af9a00af84af7a44fcf308fa70afca65cbc0c6 (commit)
       via  adc67d07234dd752054c9435f56d5a35762f34a9 (commit)
       via  6c24c675d879b9928f3ef8964558129b430a6de7 (commit)
       via  e2e10c30bd257c48a5c923a4a2dd5ae36c2786c3 (commit)
       via  6741fc63dd74238792dea70b620bac4e39073fe6 (commit)
      from  b6141723b82c763a67f21a9a64fe6f5dab75e983 (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 c924ea4250046fb74e360c454961cab6f9f18f6c
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Feb 14 17:49:54 2012 -0500

    Acq: General Search refactor
    
    This is a combination of the following three commits from master:
    
    3149433d354889fb
    56121886c72b2d41
    35fe5b9cbe10b132
    
    The first two were meant for backport to rel_2_0 and rel_2_1 at the
    time, but the backport wasn't done.  They were buggy anyway, and now it
    makes the most sense (I hope) to backport them together with the
    corrective commit all at once.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 8088e35..c91bbd7 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -8454,6 +8454,142 @@ SELECT  usr,
 			</actions>
 		</permacrud>
 	</class>
+	<class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
+		<oils_persist:source_definition><![CDATA[
+		SELECT
+			poi.purchase_order AS purchase_order,
+			ii.invoice AS invoice,
+			NULL AS lineitem,
+			poi.id AS po_item,
+			NULL AS picklist
+		FROM
+			acq.po_item poi
+			JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
+		UNION SELECT
+			jub.purchase_order AS purchase_order,
+			ie.invoice AS invoice,
+			jub.id AS lineitem,
+			NULL AS po_item,
+			jub.picklist AS picklist
+		FROM
+			acq.lineitem jub
+			JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
+		UNION SELECT
+			ii.purchase_order AS purchase_order,
+			ii.invoice AS invoice,
+			NULL AS lineitem,
+			NULL AS po_item,
+			NULL AS picklist
+		FROM
+			acq.invoice_item ii
+		WHERE ii.po_item IS NULL
+		UNION SELECT
+			ie.purchase_order AS purchase_order,
+			ie.invoice AS invoice,
+			NULL AS lineitem,
+			NULL AS po_item,
+			NULL AS picklist
+		FROM
+			acq.invoice_entry ie
+		WHERE ie.lineitem IS NULL
+		UNION SELECT
+			NULL AS purchase_order,
+			NULL AS invoice,
+			jub.id AS lineitem,
+			NULL AS po_item,
+			jub.picklist AS picklist
+		FROM
+			acq.lineitem jub
+		WHERE jub.purchase_order IS NULL
+		]]></oils_persist:source_definition>
+		<fields>
+			<field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
+			<field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
+			<field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
+			<field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
+			<field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
+		</fields>
+		<links>
+			<link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
+			<link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
+			<link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
+			<link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
+			<link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
+		</links>
+	</class>
+	<class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
+		<fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
+			<field reporter:label="ID" name="id" reporter:datatype="id"/>
+			<field reporter:label="Active" name="active" reporter:datatype="bool"/>
+			<field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
+			<field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
+			<field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
+			<field reporter:label="Length" name="length" reporter:datatype="int"/>
+			<field reporter:label="Padding" name="padding" reporter:datatype="text"/>
+			<field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
+			<field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
+			<field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
+		</fields>
+		<links>
+			<link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
+		</links>
+		<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+			<actions>
+				<create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
+				<retrieve/>
+				<update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
+				<delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
+			</actions>
+		</permacrud>
+	</class>
+
+	<class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
+		<fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
+			<field reporter:label="ID" name="id" reporter:datatype="id"/>
+			<field name="date_applied" reporter:datatype="timestamp"/>
+			<field name="org" reporter:datatype="org_unit"/>
+			<field name="original_value" reporter:datatype="text"/>
+			<field name="new_value" reporter:datatype="text"/>
+			<field name="field_name" reporter:datatype="link"/>
+		</fields>
+		<links>
+			<link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
+			<link field="org" reltype="has_a" key="id" map="" class="aou"/>
+		</links>
+		<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+			<actions>
+				<create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
+				<retrieve/>
+				<update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
+				<delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
+			</actions>
+		</permacrud>
+	</class>
+	<class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
+		<fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
+			<field reporter:label="ID" name="id" reporter:datatype="id"/>
+			<field reporter:label="Circ" name="xact" reporter:datatype="link"/>
+			<field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
+			<field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
+		</fields>
+		<links>
+			<link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
+			<link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
+		</links>
+	</class>
+	<class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
+		<fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
+			<field reporter:label="ID" name="id" reporter:datatype="id"/>
+			<field reporter:label="Circ" name="xact" reporter:datatype="link"/>
+			<field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
+			<field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
+		</fields>
+		<links>
+			<link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
+			<link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
+		</links>
+	</class>
+
 
 	<!-- ********************************************************************************************************************* -->
 
diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
index 6e2d854..cbf4c73 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
@@ -156,12 +156,16 @@ sub get_fm_links_by_hint {
 
 sub gen_au_term {
     my ($value, $n) = @_;
+    my $lc_value = {
+        "=" => { transform => "lowercase", value => lc($value) }
+    };
+
     +{
         "-or" => [
             {"+au$n" => {"usrname" => $value}},
-            {"+au$n" => {"first_given_name" => $value}},
-            {"+au$n" => {"second_given_name" => $value}},
-            {"+au$n" => {"family_name" => $value}},
+            {"+au$n" => {"first_given_name" => $lc_value}},
+            {"+au$n" => {"second_given_name" => $lc_value}},
+            {"+au$n" => {"family_name" => $lc_value}},
             {"+ac$n" => {"barcode" => $value}}
         ]
     };
@@ -262,19 +266,13 @@ sub prepare_terms {
 }
 
 sub add_au_joins {
-    my ($from) = shift;
+    my $graft_map = shift;
+    my $core_hint = shift;
 
     my $n = 0;
     foreach my $join (@_) {
         my ($hint, $attr, $num) = @$join;
-        my $start;
-        if ($hint eq "jub") {
-            $start = $from->{$hint};
-        } elsif ($hint eq "acqinv") {
-            $start = $from->{"jub"}->{"acqie"}->{"join"}->{$hint};
-        } else {
-            $start = $from->{"jub"}->{$hint};
-        }
+        my $start = $graft_map->{$hint};
         my $clause = {
             "class" => "au",
             "type" => "left",
@@ -289,17 +287,64 @@ sub add_au_joins {
                 }
             }
         };
-        if ($hint eq "jub") {
+
+        if ($hint eq $core_hint) {
             $start->{"au$num"} = $clause;
         } else {
             $start->{"join"} ||= {};
             $start->{"join"}->{"au$num"} = $clause;
         }
+
         $n++;
     }
     $n;
 }
 
+sub build_from_clause_and_joins {
+    my ($query, $core, $and_terms, $or_terms) = @_;
+
+    my %graft_map = ();
+
+    $graft_map{$core} = $query->{from}{$core} = {};
+
+    my $join_type = keys(%$or_terms) ? "left" : "inner";
+
+    my @classes = grep { $core ne $_ } (keys(%$and_terms), keys(%$or_terms));
+    my %classes_uniq = map { $_ => 1 } @classes;
+    @classes = keys(%classes_uniq);
+
+    my $acqlia_join = sub {
+        return {"type" => "left", "field" => "lineitem", "fkey" => "id"};
+    };
+
+    foreach my $class (@classes) {
+        if ($class eq 'acqlia') {
+            if ($core eq 'acqinv') {
+                $graft_map{acqlia} =
+                    $query->{from}{$core}{acqmapinv}{join}{jub}{join}{acqlia} =
+                    $acqlia_join->();
+            } elsif ($core eq 'jub') {
+                $graft_map{acqlia} = 
+                    $query->{from}{$core}{acqlia} =
+                    $acqlia_join->();
+            } else {
+                $graft_map{acqlia} = 
+                    $query->{from}{$core}{jub}{join}{acqlia} =
+                    $acqlia_join->();
+            }
+        } elsif ($class eq 'acqinv' or $core eq 'acqinv') {
+            $graft_map{$class} =
+                $query->{from}{$core}{acqmapinv}{join}{$class} ||= {};
+            $graft_map{$class}{type} = $join_type;
+        } else {
+            $graft_map{$class} = $query->{from}{$core}{$class} ||= {};
+            $graft_map{$class}{type} = $join_type;
+        }
+    }
+
+    return \%graft_map;
+}
+
 __PACKAGE__->register_method(
     method    => "unified_search",
     api_name  => "open-ils.acq.lineitem.unified_search",
@@ -394,54 +439,22 @@ q/order_by clause must be of the long form, like:
     }
 
     my $query = {
-        "select" => $select_clause,
-        "from" => {
-            "jub" => {
-                "acqpo" => {
-                    "type" => "full",
-                    "field" => "id",
-                    "fkey" => "purchase_order"
-                },
-                "acqpl" => {
-                    "type" => "full",
-                    "field" => "id",
-                    "fkey" => "picklist"
-                },
-                "acqie" => {
-                    "type" => "full",
-                    "field" => "lineitem",
-                    "fkey" => "id",
-                    "join" => {
-                        "acqinv" => {
-                            "type" => "full",
-                            "fkey" => "invoice",
-                            "field" => "id"
-                        }
-                    }
-                }
-            }
-        },
-        "order_by" => ($options->{"order_by"} || {$hint => {"id" => {}}}),
-        "offset" => ($options->{"offset"} || 0)
+        select => $select_clause,
+        order_by => ($options->{order_by} || {$hint => {id => {}}}),
+        offset => ($options->{offset} || 0)
     };
 
     $query->{"limit"} = $options->{"limit"} if $options->{"limit"};
 
-    # XXX for the future? but it doesn't quite work as is.
-#    # Remove anything in temporary picklists from search results.
-#    $and_terms ||= {};
-#    $and_terms->{"acqpl"} ||= [];
-#    push @{$and_terms->{"acqpl"}}, {"name" => "", "__not" => 1};
+    my $graft_map = build_from_clause_and_joins(
+        $query, $hint, $and_terms, $or_terms
+    );
 
     $and_terms = prepare_terms($and_terms, 1);
-    $or_terms = prepare_terms($or_terms, 0) and do {
-        $query->{"from"}->{"jub"}->{"acqlia"} = {
-            "type" => "left", "field" => "lineitem", "fkey" => "id",
-        };
-    };
+    $or_terms = prepare_terms($or_terms, 0);
 
-    my $offset = add_au_joins($query->{"from"}, prepare_au_terms($and_terms));
-    add_au_joins($query->{"from"}, prepare_au_terms($or_terms, $offset));
+    my $offset = add_au_joins($graft_map, $hint, prepare_au_terms($and_terms));
+    add_au_joins($graft_map, $hint, prepare_au_terms($or_terms, $offset));
 
     if ($and_terms and $or_terms) {
         $query->{"where"} = {
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 9aa25b7..371f0cb 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0665'); -- phasefx/miker
+INSERT INTO config.upgrade_log (version) VALUES ('0691'); -- senator/miker
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index e8869a3..a00c1d3 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -839,6 +839,10 @@ CREATE TABLE acq.invoice_entry (
 	amount_paid     NUMERIC (8,2)
 );
 
+CREATE INDEX ie_inv_idx on acq.invoice_entry (invoice);
+CREATE INDEX ie_po_idx on acq.invoice_entry (purchase_order);
+CREATE INDEX ie_li_idx on acq.invoice_entry (lineitem);
+
 CREATE TABLE acq.invoice_item_type (
     code    TEXT    PRIMARY KEY,
     name    TEXT    NOT NULL,  -- i18n-ize
@@ -864,6 +868,8 @@ CREATE TABLE acq.po_item (
     target          BIGINT
 );
 
+CREATE INDEX poi_po_idx ON acq.po_item (purchase_order);
+
 CREATE TABLE acq.invoice_item ( -- for invoice-only debits: taxes/fees/non-bib items/etc
     id              SERIAL      PRIMARY KEY,
     invoice         INT         NOT NULL REFERENCES acq.invoice (id) ON UPDATE CASCADE ON DELETE CASCADE,
@@ -883,6 +889,10 @@ CREATE TABLE acq.invoice_item ( -- for invoice-only debits: taxes/fees/non-bib i
     target          BIGINT
 );
 
+CREATE INDEX ii_inv_idx on acq.invoice_item (invoice);
+CREATE INDEX ii_po_idx on acq.invoice_item (purchase_order);
+CREATE INDEX ii_poi_idx on acq.invoice_item (po_item);
+
 -- Patron requests
 CREATE TABLE acq.user_request_type (
     id      SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0691.schema.acq_fk_indices.sql b/Open-ILS/src/sql/Pg/upgrade/0691.schema.acq_fk_indices.sql
new file mode 100644
index 0000000..6a04874
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0691.schema.acq_fk_indices.sql
@@ -0,0 +1,15 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0691');
+
+CREATE INDEX poi_po_idx ON acq.po_item (purchase_order);
+
+CREATE INDEX ie_inv_idx on acq.invoice_entry (invoice);
+CREATE INDEX ie_po_idx on acq.invoice_entry (purchase_order);
+CREATE INDEX ie_li_idx on acq.invoice_entry (lineitem);
+
+CREATE INDEX ii_inv_idx on acq.invoice_item (invoice);
+CREATE INDEX ii_po_idx on acq.invoice_item (purchase_order);
+CREATE INDEX ii_poi_idx on acq.invoice_item (po_item);
+
+COMMIT;

commit f3af9a00af84af7a44fcf308fa70afca65cbc0c6
Author: Jason Stephenson <jason at sigio.com>
Date:   Sat Apr 28 14:39:42 2012 -0400

    Revert "Use getItemType() instead of getForm() in searchBarInit()."
    
    This reverts commit 47309fd18aad422b06fad51e5588400fd38cf71b.
    
    The reverted commit caused a problem with basic search, and fixing the
    problem with basic search was deemed more important than fixing this
    issue with Advanced seach.
    
    See Launchpad bugs:
    
    https://bugs.launchpad.net/evergreen/+bug/979158
    https://bugs.launchpad.net/evergreen/+bug/788629
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/web/opac/skin/default/js/search_bar.js b/Open-ILS/web/opac/skin/default/js/search_bar.js
index 4585067..1801edc 100644
--- a/Open-ILS/web/opac/skin/default/js/search_bar.js
+++ b/Open-ILS/web/opac/skin/default/js/search_bar.js
@@ -33,7 +33,7 @@ function searchBarInit() {
 	G.ui.searchbar.text.value = (getTerm() != null) ? getTerm() : "";
 	if (!isFrontPage) G.ui.searchbar.facets.value = (getFacet() != null) ? getFacet() : "";
 	setSelector(_ts,	getStype());
-	setSelector(_fs,	getItemType());
+	setSelector(_fs,	getForm());
 
 	depthSelInit();
 

commit adc67d07234dd752054c9435f56d5a35762f34a9
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Mon Jan 23 11:44:14 2012 -0500

    Install RPC::XML::Function on Ubuntu Lucid.
    
    Change the LUCID_CPAN target to install RPC::XML::Function instead of
    XML::RPC.
    
    Base on public bug report by Ben Shum (LP 920535).
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install
index c6f9690..8f69b56 100644
--- a/Open-ILS/src/extras/Makefile.install
+++ b/Open-ILS/src/extras/Makefile.install
@@ -278,7 +278,7 @@ CPAN_MODULES_FORCE = \
 
 # Lucid needs this because the XML::RPC that comes by default is broken with Evergreen
 LUCID_CPAN = \
-	XML::RPC
+	RPC::XML::Function
 
 # ----------------------------------------------------------------------------
 

commit 6c24c675d879b9928f3ef8964558129b430a6de7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Aug 12 21:13:20 2011 -0400

    Stamped upgrade script for "lp 823496: do not fail to index personal names that have relators"
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    
    Conflicts:
    
    	Open-ILS/src/sql/Pg/002.schema.config.sql
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql b/Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
similarity index 91%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
rename to Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
index 41d65f8..6089ef3 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
@@ -6,7 +6,7 @@
 BEGIN;
 
 -- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+INSERT INTO config.upgrade_log (version) VALUES ('0599'); -- miker/gmc
 
 UPDATE config.metabib_field 
 SET xpath = $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$

commit e2e10c30bd257c48a5c923a4a2dd5ae36c2786c3
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Tue Aug 9 15:30:56 2011 -0400

    lp 823496: don't fail to index personal names that have relators
    
    The default definition for the author|other index inadvertantly
    excluded names from 600, 700, 720, and 800 fields that have
    relator values ($e) or codes ($4).
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 8af3fed..cb6c18f 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -47,7 +47,7 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field ) VALUES 
     (9, 'author', 'conference', oils_i18n_gettext(9, 'Conference Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='conference' and mods32:role/mods32:roleTerm[text()='creator']]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */;
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field ) VALUES 
-    (10, 'author', 'other', oils_i18n_gettext(10, 'Other Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role)]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */;
+    (10, 'author', 'other', oils_i18n_gettext(10, 'Other Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */;
 
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES 
     (11, 'subject', 'geographic', oils_i18n_gettext(11, 'Geographic Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:geographic$$, TRUE );
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
new file mode 100644
index 0000000..41d65f8
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.fix_author_other_index.sql
@@ -0,0 +1,28 @@
+-- Evergreen DB patch XXXX.fix_author_other_index.sql
+--
+-- Fix author|other index so that it doesn't exclude 700
+-- fields that contain relator values in the $e or $4.
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE config.metabib_field 
+SET xpath = $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$
+WHERE field_class = 'author'
+AND name = 'other'
+AND xpath = $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role)]$$
+AND format = 'mods32';
+
+-- To reindex the affected bibs, you can run something like this:
+--
+-- SELECT metabib.reingest_metabib_field_entries(record)
+-- FROM (
+--   SELECT DISTINCT record
+--   FROM metabib.real_full_rec
+--   WHERE tag IN ('600', '700', '720', '800')
+--   AND   subfield IN ('4', 'e')
+-- ) a;
+
+COMMIT;

commit 6741fc63dd74238792dea70b620bac4e39073fe6
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri May 4 13:46:16 2012 -0400

    This addresses the issue where issuing refunds results in a negative
    ballance and it is then impossible to close the transaction by creating
    new billings.
    
    https://bugs.launchpad.net/evergreen/+bug/758982
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
index 8a001b0..865c9be 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
@@ -691,6 +691,10 @@ sub billing_items_create {
     $e->create_money_billing($billing) or return $e->die_event;
     my $evt = OpenILS::Utils::Penalty->calculate_penalties($e, $xact->usr, $U->xact_org($xact->id,$e));
     return $evt if $evt;
+
+    $evt = _check_open_xact($e, $xact->id, $xact);
+    return $evt if $evt;
+
     $e->commit;
 
     return $billing->id;

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

Summary of changes:
 Open-ILS/examples/fm_IDL.xml                       |  136 ++++++++++++++++++++
 Open-ILS/src/extras/Makefile.install               |    2 +-
 .../src/perlmods/OpenILS/Application/Acq/Search.pm |  121 ++++++++++--------
 .../src/perlmods/OpenILS/Application/Circ/Money.pm |    4 +
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/200.schema.acq.sql             |   10 ++
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |    2 +-
 .../upgrade/0599.data.fix_author_other_index.sql   |   28 ++++
 .../sql/Pg/upgrade/0691.schema.acq_fk_indices.sql  |   15 ++
 Open-ILS/web/opac/skin/default/js/search_bar.js    |    2 +-
 10 files changed, 264 insertions(+), 58 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0599.data.fix_author_other_index.sql
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0691.schema.acq_fk_indices.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list