[open-ils-commits] [GIT] Evergreen ILS branch master updated. 1937f3f57995a375e7c41505779a30c0c926712e

Evergreen Git git at git.evergreen-ils.org
Tue Apr 4 10:39:22 EDT 2017


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, master has been updated
       via  1937f3f57995a375e7c41505779a30c0c926712e (commit)
       via  5f26da6220906be586d43158449d76c19559323f (commit)
       via  4e64cbbc4cdda08a60d3e9c45a90f2e9ca0309f5 (commit)
      from  33b39b61713d5b6033c6265f0c8739a5d120ca9c (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 1937f3f57995a375e7c41505779a30c0c926712e
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Tue Apr 4 10:32:58 2017 -0400

    LP#1599634: stamp schema update
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 9770e54..8b2d9c3 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,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 ('1031', :eg_version); -- jeffdavis/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1032', :eg_version); -- Bmagic/csharp/gmcharlt
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_circulation_combined_types_view.sql b/Open-ILS/src/sql/Pg/upgrade/1032.schema.all_circulation_combined_types_view.sql
similarity index 95%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_circulation_combined_types_view.sql
rename to Open-ILS/src/sql/Pg/upgrade/1032.schema.all_circulation_combined_types_view.sql
index e76686b..4620707 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_circulation_combined_types_view.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1032.schema.all_circulation_combined_types_view.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1032', :eg_version); -- Bmagic/csharp/gmcharlt
 
 CREATE OR REPLACE VIEW action.all_circulation_combined_types AS 
  SELECT acirc.id AS id,

commit 5f26da6220906be586d43158449d76c19559323f
Author: blake <blake at mobiusconsortium.org>
Date:   Thu Nov 10 17:06:39 2016 -0600

    LP1599634: follow-ups
    
    Squashed patch containing follows-ups written by Chris Sharp
    and Galen Charlton:
    
    *  When running the upgrade script, the DROP VIEW statement resulted in an
    error since the view did not already exist.  You could add IF EXISTS, but
    CREATE OR REPLACE VIEW is sufficient.
    
    * Changes the ID column to just pass through
    the ID from the source tables, promoted to BIGINT in
    some cases.  This has the effect of:
    
    - removing a redundancy, as circ_type already specifies the source table
    - making it easier to join this view against the circulation tables when
      writing SQL queries
    
    * Renames the schema upgrade script to better
    match conventions.
    
    * Move release notes entry so that it will get picked up
    
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: blake <blake at mobiusconsortium.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 50b0dc4..8f35858 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -4223,7 +4223,7 @@ SELECT  usr,
 		<fields>
 			<field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
 			<field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
-			<field reporter:label="Circ ID" name="id" reporter:datatype="text" />
+			<field reporter:label="Circ ID" name="id" reporter:datatype="int" />
 			<field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
 			<field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
 			<field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index 3744e15..bed82b7 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -1503,7 +1503,7 @@ CREATE TRIGGER maintain_usr_circ_history_tgr
     FOR EACH ROW EXECUTE PROCEDURE action.maintain_usr_circ_history();
 
 CREATE OR REPLACE VIEW action.all_circulation_combined_types AS 
- SELECT 'regularcirc'::text || acirc.id AS id,
+ SELECT acirc.id AS id,
     acirc.xact_start,
     acirc.circ_lib,
     acirc.circ_staff,
@@ -1514,7 +1514,7 @@ CREATE OR REPLACE VIEW action.all_circulation_combined_types AS
     asset.copy ac_acirc
   WHERE acirc.target_copy = ac_acirc.id
 UNION ALL
- SELECT 'noncatcirc'::text || ancc.id AS id,
+ SELECT ancc.id::BIGINT AS id,
     ancc.circ_time AS xact_start,
     ancc.circ_lib,
     ancc.staff AS circ_staff,
@@ -1525,7 +1525,7 @@ UNION ALL
     config.non_cataloged_type cnct_ancc
   WHERE ancc.item_type = cnct_ancc.id
 UNION ALL
- SELECT 'inhouseuse'::text || aihu.id AS id,
+ SELECT aihu.id::BIGINT AS id,
     aihu.use_time AS xact_start,
     aihu.org_unit AS circ_lib,
     aihu.staff AS circ_staff,
@@ -1536,7 +1536,7 @@ UNION ALL
     asset.copy ac_aihu
   WHERE aihu.item = ac_aihu.id
 UNION ALL
- SELECT 'noncatinhouseuse'::text || ancihu.id AS id,
+ SELECT ancihu.id::BIGINT AS id,
     ancihu.use_time AS xact_start,
     ancihu.org_unit AS circ_lib,
     ancihu.staff AS circ_staff,
@@ -1547,7 +1547,7 @@ UNION ALL
     config.non_cataloged_type cnct_ancihu
   WHERE ancihu.item_type = cnct_ancihu.id
 UNION ALL
- SELECT 'agedcirc'::text || aacirc.id::text AS id,
+ SELECT aacirc.id AS id,
     aacirc.xact_start,
     aacirc.circ_lib,
     aacirc.circ_staff,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_circulation_combined_types_view.sql
similarity index 85%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.LP1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ
rename to Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_circulation_combined_types_view.sql
index 8042c32..e76686b 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_circulation_combined_types_view.sql
@@ -2,10 +2,8 @@ BEGIN;
 
 SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
 
-DROP VIEW action.all_circulation_combined_types;
-
 CREATE OR REPLACE VIEW action.all_circulation_combined_types AS 
- SELECT 'regularcirc'::text || acirc.id AS id,
+ SELECT acirc.id AS id,
     acirc.xact_start,
     acirc.circ_lib,
     acirc.circ_staff,
@@ -16,7 +14,7 @@ CREATE OR REPLACE VIEW action.all_circulation_combined_types AS
     asset.copy ac_acirc
   WHERE acirc.target_copy = ac_acirc.id
 UNION ALL
- SELECT 'noncatcirc'::text || ancc.id AS id,
+ SELECT ancc.id::BIGINT AS id,
     ancc.circ_time AS xact_start,
     ancc.circ_lib,
     ancc.staff AS circ_staff,
@@ -27,7 +25,7 @@ UNION ALL
     config.non_cataloged_type cnct_ancc
   WHERE ancc.item_type = cnct_ancc.id
 UNION ALL
- SELECT 'inhouseuse'::text || aihu.id AS id,
+ SELECT aihu.id::BIGINT AS id,
     aihu.use_time AS xact_start,
     aihu.org_unit AS circ_lib,
     aihu.staff AS circ_staff,
@@ -38,7 +36,7 @@ UNION ALL
     asset.copy ac_aihu
   WHERE aihu.item = ac_aihu.id
 UNION ALL
- SELECT 'noncatinhouseuse'::text || ancihu.id AS id,
+ SELECT ancihu.id::BIGINT AS id,
     ancihu.use_time AS xact_start,
     ancihu.org_unit AS circ_lib,
     ancihu.staff AS circ_staff,
@@ -49,7 +47,7 @@ UNION ALL
     config.non_cataloged_type cnct_ancihu
   WHERE ancihu.item_type = cnct_ancihu.id
 UNION ALL
- SELECT 'agedcirc'::text || aacirc.id::text AS id,
+ SELECT aacirc.id AS id,
     aacirc.xact_start,
     aacirc.circ_lib,
     aacirc.circ_staff,
diff --git a/docs/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc b/docs/RELEASE_NOTES_NEXT/Reports/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc
similarity index 100%
rename from docs/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc
rename to docs/RELEASE_NOTES_NEXT/Reports/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc

commit 4e64cbbc4cdda08a60d3e9c45a90f2e9ca0309f5
Author: blake <blake at mobiusconsortium.org>
Date:   Thu Jul 7 15:01:36 2016 -0500

    LP1599634 Circulation report source to include in-house(non cat), and non cat circ
    
    Added a simple view and supporting IDL. This will allow all the circulation
    data to output in the same report.
    
    Signed-off-by: blake <blake at mobiusconsortium.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: blake <blake at mobiusconsortium.org>
    
    Conflicts:
    	Open-ILS/examples/fm_IDL.xml
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 86efb0d..50b0dc4 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -4219,6 +4219,26 @@ SELECT  usr,
 			</actions>
 		</permacrud>
 	</class>
+	<class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
+		<fields>
+			<field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
+			<field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
+			<field reporter:label="Circ ID" name="id" reporter:datatype="text" />
+			<field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
+			<field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
+			<field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
+			<field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
+		</fields>
+		<links>
+			<link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
+			<link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
+		</links>
+		<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+			<actions>
+				<retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
+			</actions>
+		</permacrud>
+	</class>
 	<class id="combcirc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
 		<fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
 			<field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index 5832034..3744e15 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -1502,4 +1502,60 @@ CREATE TRIGGER maintain_usr_circ_history_tgr
     AFTER INSERT OR UPDATE ON action.circulation 
     FOR EACH ROW EXECUTE PROCEDURE action.maintain_usr_circ_history();
 
+CREATE OR REPLACE VIEW action.all_circulation_combined_types AS 
+ SELECT 'regularcirc'::text || acirc.id AS id,
+    acirc.xact_start,
+    acirc.circ_lib,
+    acirc.circ_staff,
+    acirc.create_time,
+    ac_acirc.circ_modifier AS item_type,
+    'regular_circ'::text AS circ_type
+   FROM action.circulation acirc,
+    asset.copy ac_acirc
+  WHERE acirc.target_copy = ac_acirc.id
+UNION ALL
+ SELECT 'noncatcirc'::text || ancc.id AS id,
+    ancc.circ_time AS xact_start,
+    ancc.circ_lib,
+    ancc.staff AS circ_staff,
+    ancc.circ_time AS create_time,
+    cnct_ancc.name AS item_type,
+    'non-cat_circ'::text AS circ_type
+   FROM action.non_cataloged_circulation ancc,
+    config.non_cataloged_type cnct_ancc
+  WHERE ancc.item_type = cnct_ancc.id
+UNION ALL
+ SELECT 'inhouseuse'::text || aihu.id AS id,
+    aihu.use_time AS xact_start,
+    aihu.org_unit AS circ_lib,
+    aihu.staff AS circ_staff,
+    aihu.use_time AS create_time,
+    ac_aihu.circ_modifier AS item_type,
+    'in-house_use'::text AS circ_type
+   FROM action.in_house_use aihu,
+    asset.copy ac_aihu
+  WHERE aihu.item = ac_aihu.id
+UNION ALL
+ SELECT 'noncatinhouseuse'::text || ancihu.id AS id,
+    ancihu.use_time AS xact_start,
+    ancihu.org_unit AS circ_lib,
+    ancihu.staff AS circ_staff,
+    ancihu.use_time AS create_time,
+    cnct_ancihu.name AS item_type,
+    'non-cat_circ'::text AS circ_type
+   FROM action.non_cat_in_house_use ancihu,
+    config.non_cataloged_type cnct_ancihu
+  WHERE ancihu.item_type = cnct_ancihu.id
+UNION ALL
+ SELECT 'agedcirc'::text || aacirc.id::text AS id,
+    aacirc.xact_start,
+    aacirc.circ_lib,
+    aacirc.circ_staff,
+    aacirc.create_time,
+    ac_aacirc.circ_modifier AS item_type,
+    'aged_circ'::text AS circ_type
+   FROM action.aged_circulation aacirc,
+    asset.copy ac_aacirc
+  WHERE aacirc.target_copy = ac_aacirc.id;
+
 COMMIT;
diff --git a/Open-ILS/src/sql/Pg/t/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.pg b/Open-ILS/src/sql/Pg/t/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.pg
new file mode 100644
index 0000000..2795719
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.pg
@@ -0,0 +1,27 @@
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(1);
+
+-- Run the tests.
+-- Check to make sure that the action.all_circulation_combined_types view exists
+SELECT has_view( 'action', 'all_circulation_combined_types', 'VIEW action.all_circulation_combined_types EXISTS' );
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ b/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ
new file mode 100644
index 0000000..8042c32
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.LP1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ
@@ -0,0 +1,63 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+DROP VIEW action.all_circulation_combined_types;
+
+CREATE OR REPLACE VIEW action.all_circulation_combined_types AS 
+ SELECT 'regularcirc'::text || acirc.id AS id,
+    acirc.xact_start,
+    acirc.circ_lib,
+    acirc.circ_staff,
+    acirc.create_time,
+    ac_acirc.circ_modifier AS item_type,
+    'regular_circ'::text AS circ_type
+   FROM action.circulation acirc,
+    asset.copy ac_acirc
+  WHERE acirc.target_copy = ac_acirc.id
+UNION ALL
+ SELECT 'noncatcirc'::text || ancc.id AS id,
+    ancc.circ_time AS xact_start,
+    ancc.circ_lib,
+    ancc.staff AS circ_staff,
+    ancc.circ_time AS create_time,
+    cnct_ancc.name AS item_type,
+    'non-cat_circ'::text AS circ_type
+   FROM action.non_cataloged_circulation ancc,
+    config.non_cataloged_type cnct_ancc
+  WHERE ancc.item_type = cnct_ancc.id
+UNION ALL
+ SELECT 'inhouseuse'::text || aihu.id AS id,
+    aihu.use_time AS xact_start,
+    aihu.org_unit AS circ_lib,
+    aihu.staff AS circ_staff,
+    aihu.use_time AS create_time,
+    ac_aihu.circ_modifier AS item_type,
+    'in-house_use'::text AS circ_type
+   FROM action.in_house_use aihu,
+    asset.copy ac_aihu
+  WHERE aihu.item = ac_aihu.id
+UNION ALL
+ SELECT 'noncatinhouseuse'::text || ancihu.id AS id,
+    ancihu.use_time AS xact_start,
+    ancihu.org_unit AS circ_lib,
+    ancihu.staff AS circ_staff,
+    ancihu.use_time AS create_time,
+    cnct_ancihu.name AS item_type,
+    'non-cat_circ'::text AS circ_type
+   FROM action.non_cat_in_house_use ancihu,
+    config.non_cataloged_type cnct_ancihu
+  WHERE ancihu.item_type = cnct_ancihu.id
+UNION ALL
+ SELECT 'agedcirc'::text || aacirc.id::text AS id,
+    aacirc.xact_start,
+    aacirc.circ_lib,
+    aacirc.circ_staff,
+    aacirc.create_time,
+    ac_aacirc.circ_modifier AS item_type,
+    'aged_circ'::text AS circ_type
+   FROM action.aged_circulation aacirc,
+    asset.copy ac_aacirc
+  WHERE aacirc.target_copy = ac_aacirc.id;
+
+COMMIT;
diff --git a/docs/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc b/docs/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc
new file mode 100644
index 0000000..46d12cb
--- /dev/null
+++ b/docs/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc
@@ -0,0 +1,12 @@
+New circulation report source "All Circulation Combined Types"
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This report source will allow you to create a single report template for all of the following:
+  * In House
+  * In House Non Cat
+  * Circulation (standard)
+  * Non Cat Circulation
+
+These columns are important to display:
+  * Item Type
+  * Circulation Type

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

Summary of changes:
 Open-ILS/examples/fm_IDL.xml                       |   20 +++++++
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/090.schema.action.sql          |   56 ++++++++++++++++++
 ...source_to_include_in-house_and_non_cat_circ.pg} |    7 +--
 ....schema.all_circulation_combined_types_view.sql |   61 ++++++++++++++++++++
 ...ource_to_include_in-house_and_non_cat_circ.adoc |   12 ++++
 6 files changed, 152 insertions(+), 6 deletions(-)
 copy Open-ILS/src/sql/Pg/t/{lp1533329-restrict-opt-in-setting.pg => lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.pg} (67%)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1032.schema.all_circulation_combined_types_view.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/Reports/lp1599634_Circulation_report_source_to_include_in-house_and_non_cat_circ.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list