[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. af1c5ce175f35d6b90be0235ccf7275dc98f773f
Evergreen Git
git at git.evergreen-ils.org
Sun Nov 18 22:43:56 EST 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_1 has been updated
via af1c5ce175f35d6b90be0235ccf7275dc98f773f (commit)
from b975a74b340f27b969cae696947efbb9ec590394 (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 af1c5ce175f35d6b90be0235ccf7275dc98f773f
Author: Jason Stephenson <jason at sigio.com>
Date: Mon Sep 17 10:08:34 2018 -0400
Lp 1753813: Wrap all oils_persist:source_definitions in CDATA blocks.
For safety's sake, we add CDATA sections in all fm_ILD.xml
oils_persist:source_definition elements as show in the example at the
top of the IDL.
Signed-off-by: Jason Stephenson <jason at sigio.com>
Signed-off-by: Ben Shum <ben at evergreener.net>
diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 997afc6..fc18f04 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -3934,7 +3934,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
</links>
</class>
<class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT * FROM metabib.author_field_entry
UNION ALL
SELECT * FROM metabib.keyword_field_entry
@@ -3946,7 +3946,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
SELECT * FROM metabib.subject_field_entry
UNION ALL
SELECT * FROM metabib.series_field_entry
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields>
<field name="field" reporter:datatype="link"/>
<field name="id" reporter:datatype="id" />
@@ -4290,12 +4290,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
</permacrud>
</class>
<class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT usr,
SUM(
CASE
WHEN (
- ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day' AND due_date > 'now'))
+ ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day' AND due_date > 'now'))
AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
) THEN 1
ELSE 0
@@ -4305,7 +4305,7 @@ SELECT usr,
SUM(
CASE
WHEN (
- ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day' AND due_date < 'now'))
+ ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day' AND due_date < 'now'))
AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
) THEN 1
ELSE 0
@@ -4318,7 +4318,7 @@ SELECT usr,
FROM action.circulation
WHERE checkin_time IS NULL
GROUP BY 1
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="usr">
<field reporter:label="User ID" name="usr" reporter:datatype="link"/>
<field reporter:label="Out" name="out" reporter:datatype="text"/>
@@ -4332,12 +4332,12 @@ SELECT usr,
</links>
</class>
<class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT usr,
STRING_AGG(
CASE
WHEN (
- ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day' AND due_date > 'now'))
+ ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day' AND due_date > 'now'))
AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
) THEN id::TEXT
ELSE '0'
@@ -4347,7 +4347,7 @@ SELECT usr,
STRING_AGG(
CASE
WHEN (
- ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day' AND due_date < 'now'))
+ ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day' AND due_date < 'now'))
AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
) THEN id::TEXT
ELSE '0'
@@ -4360,7 +4360,7 @@ SELECT usr,
FROM action.circulation
WHERE checkin_time IS NULL
GROUP BY 1
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="usr">
<field reporter:label="User ID" name="usr" reporter:datatype="link"/>
<field reporter:label="Out" name="out" reporter:datatype="text"/>
@@ -6273,9 +6273,9 @@ SELECT usr,
</permacrud>
</class>
<class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL AND current_copy IS NOT NULL AND fulfillment_time IS NULL GROUP BY current_copy)x USING (current_copy, capture_time)
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id">
<field reporter:label="Status" name="status" oils_persist:virtual="true" />
<field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
@@ -10420,14 +10420,14 @@ SELECT usr,
</class>
<class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT DISTINCT l.*
FROM action.unfulfilled_hold_loops l
JOIN action.unfulfilled_hold_max_loop m USING (hold)
WHERE l.count = m.max
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields>
<field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
<field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
@@ -11001,7 +11001,7 @@ SELECT usr,
</class>
<class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT
cbrebi.id AS id, -- so we can have a pkey in our view
uvs.id AS session,
@@ -11012,7 +11012,7 @@ SELECT usr,
ON (uvs.container = cbreb.id)
JOIN container.biblio_record_entry_bucket_item cbrebi
ON (cbrebi.bucket = cbreb.id)
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
<field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
<field reporter:label="Session" name="session" reporter:datatype="link" />
@@ -11272,7 +11272,7 @@ SELECT usr,
</class>
<class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT b.id,
MAX(dcp.edit_date) AS last_delete_date
@@ -11283,7 +11283,7 @@ SELECT usr,
GROUP BY b.id
HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
<field reporter:label="Record ID" name="id" reporter:datatype="id"/>
<field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
@@ -11299,7 +11299,7 @@ SELECT usr,
</class>
<class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
-- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
-- -- If we expect to use pcrud to query against specific bibs, we probably want to do this. However, if we're using this to populate a report, we
@@ -11346,7 +11346,7 @@ SELECT usr,
-- )bre ON (z.bib_id = bre.id)
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
<field reporter:label="Record ID" name="id" reporter:datatype="id"/>
<field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
@@ -11364,7 +11364,7 @@ SELECT usr,
</class>
<class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT *,
CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
@@ -11392,7 +11392,7 @@ SELECT usr,
GROUP BY bib_record
)y
USING (id)
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
<field reporter:label="Record ID" name="id" reporter:datatype="link"/>
<field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
@@ -11415,7 +11415,7 @@ SELECT usr,
</class>
<class id="rhcrpbapd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup_desc" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library (and Descendants) ">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
WITH counts_at_ou AS (
SELECT rhrr.bib_record AS id,
aou.id AS pickup_lib_or_desc,
@@ -11448,7 +11448,7 @@ SELECT usr,
GROUP BY bib_record
)y
USING (id)
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
<field reporter:label="Record ID" name="id" reporter:datatype="link"/>
<field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
@@ -11471,7 +11471,7 @@ SELECT usr,
</class>
<class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT
ac.id,
COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
@@ -11489,7 +11489,7 @@ SELECT usr,
-- LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
-- LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
--GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
<field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
<field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
@@ -11687,7 +11687,7 @@ SELECT usr,
</class>
<class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT
po.ordering_agency AS ordering_agency,
@@ -11705,7 +11705,7 @@ SELECT usr,
-- we only care about claim policy actions whose claim
-- interval we'd reached or exceeded
- AND (NOW() - cpa.action_interval) > po.order_date
+ AND (NOW() - cpa.action_interval) > po.order_date
-- filter out all claim policy actions where claim events
-- have occurred on or after the action's action_interval
@@ -11718,7 +11718,7 @@ SELECT usr,
AND claim.lineitem_detail = lid.id
)
WHERE
- evt.event_date >= (po.order_date + cpa.action_interval)
+ evt.event_date >= (po.order_date + cpa.action_interval)
)
)
WHERE
@@ -11729,7 +11729,7 @@ SELECT usr,
AND po.state = 'on-order'
ORDER BY 1, 2, 3, 4, 5
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields>
<field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
<field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
@@ -11763,10 +11763,10 @@ SELECT usr,
</links>
</class>
<class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT * FROM acq.lineitem_summary
WHERE item_count > (invoice_count + cancel_count)
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
<field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
<field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
@@ -11784,15 +11784,15 @@ SELECT usr,
</links>
</class>
<class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT t.*
FROM action.transit_copy t
JOIN actor.org_unit AS s ON (t.source = s.id)
JOIN actor.org_unit AS d ON (t.dest = d.id)
- WHERE s.parent_ou <> d.parent_ou
+ WHERE s.parent_ou <> d.parent_ou
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
<field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
<field reporter:label="Destination" name="dest" reporter:datatype="link"/>
@@ -11817,7 +11817,7 @@ SELECT usr,
</class>
<class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT copy, SUM(count) AS count, year, is_renewal FROM (
SELECT
@@ -11849,7 +11849,7 @@ SELECT usr,
extend_reporter.legacy_circ_count
)x GROUP BY 1, 3, 4
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields>
<field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
<field reporter:label="Count" name="count" reporter:datatype="int"/>
@@ -12336,7 +12336,7 @@ SELECT usr,
</permacrud>
</class>
<class id="hasholdscount" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::has_holds_count" reporter:label="Copy Has Holds Count" oils_persist:readonly="true">
- <oils_persist:source_definition>
+ <oils_persist:source_definition><![CDATA[
SELECT ahcm.target_copy AS id,count(*) AS count
FROM
action.hold_request ahr,
@@ -12347,7 +12347,7 @@ SELECT usr,
ahr.capture_time IS NULL AND
ahr.id = ahcm.hold
GROUP BY ahcm.target_copy
- </oils_persist:source_definition>
+ ]]></oils_persist:source_definition>
<fields oils_persist:primary="id">
<field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
<field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/examples/fm_IDL.xml | 78 +++++++++++++++++++++---------------------
1 files changed, 39 insertions(+), 39 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list