Skip to content

Commit

Permalink
Merge branch 'tags/rel_2_12_9' into iish_master_rel_2_12_9
Browse files Browse the repository at this point in the history
# Conflicts:
#	ChangeLog
#	Open-ILS/src/perlmods/lib/OpenILS.pm
#	Open-ILS/src/perlmods/lib/OpenILS/Application.pm
#	Open-ILS/src/sql/Pg/002.schema.config.sql
#	Open-ILS/xul/staff_client/chrome/content/main/about.html
#	Open-ILS/xul/staff_client/defaults/preferences/prefs.js
#	README
#	build/i18n/po/AutoFieldWidget.js/AutoFieldWidget.js.pot
#	build/i18n/po/FlattenerGrid.js/FlattenerGrid.js.pot
#	build/i18n/po/PCrudFilterPane.js/PCrudFilterPane.js.pot
#	build/i18n/po/Searcher.js/Searcher.js.pot
#	build/i18n/po/TranslatorPopup.js/TranslatorPopup.js.pot
#	build/i18n/po/URLVerify.js/URLVerify.js.pot
#	build/i18n/po/User.js/User.js.pot
#	build/i18n/po/XULTermLoader.js/XULTermLoader.js.pot
#	build/i18n/po/acq.js/acq.js.pot
#	build/i18n/po/admin.properties/admin.properties.pot
#	build/i18n/po/auth.properties/auth.properties.pot
#	build/i18n/po/authority.js/authority.js.pot
#	build/i18n/po/capture.js/capture.js.pot
#	build/i18n/po/cat.properties/cat.properties.pot
#	build/i18n/po/circ.properties/circ.properties.pot
#	build/i18n/po/common.properties/common.properties.pot
#	build/i18n/po/conify.dtd/conify.dtd.pot
#	build/i18n/po/conify.js/conify.js.pot
#	build/i18n/po/db.seed/db.seed.pot
#	build/i18n/po/fm_IDL.dtd/fm_IDL.dtd.pot
#	build/i18n/po/ils_events.xml/ils_events.xml.pot
#	build/i18n/po/lang.dtd/lang.dtd.pot
#	build/i18n/po/match_set.js/match_set.js.pot
#	build/i18n/po/offline.properties/offline.properties.pot
#	build/i18n/po/opac.dtd/opac.dtd.pot
#	build/i18n/po/opac.js/opac.js.pot
#	build/i18n/po/patron.properties/patron.properties.pot
#	build/i18n/po/pickup_and_return.js/pickup_and_return.js.pot
#	build/i18n/po/pull_list.js/pull_list.js.pot
#	build/i18n/po/register.js/register.js.pot
#	build/i18n/po/reports.dtd/reports.dtd.pot
#	build/i18n/po/reports.js/reports.js.pot
#	build/i18n/po/reservation.js/reservation.js.pot
#	build/i18n/po/selfcheck.js/selfcheck.js.pot
#	build/i18n/po/serial.js/serial.js.pot
#	build/i18n/po/serial.properties/serial.properties.pot
#	build/i18n/po/vandelay.js/vandelay.js.pot
#	build/i18n/po/webstaff/webstaff.pot
#	configure.ac
#	docs/installation/server_upgrade.adoc
  • Loading branch information
Lucien van Wouw committed Feb 1, 2018
2 parents 1a92bcb + 3a461d0 commit bf10cfa
Show file tree
Hide file tree
Showing 92 changed files with 7,950 additions and 538 deletions.
305 changes: 80 additions & 225 deletions ChangeLog

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Open-ILS/src/extras/Makefile.install
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ export LIBDBI=libdbi-0.8.3
export LIBDBI_DRIVERS=libdbi-drivers-0.8.3
export LIBDBI_HOST=http://open-ils.org/~denials/evergreen

# some OSes require a source install of NodeJS.
# NOTE: Deprecate me with wheezy
export NODEJS_SOURCE_VERSION=v0.10.28
# some OSes require a newer version of NodeJS
# NOTE: Using the LTS binaries for NodeJS
export NODEJS_VERSION=v6.11.3
export NODEJS_BINDIR=node-$(NODEJS_VERSION)-linux-x64
export NODEJS_TARBIN=$(NODEJS_BINDIR).tar.xz
export NODEJS_BINARY="https://nodejs.org/dist/$(NODEJS_VERSION)/$(NODEJS_TARBIN)"

# As this Makefile is designed to be used by a make process running as
# root, this will avoid problems on some systems when tar extracts
Expand Down
8 changes: 3 additions & 5 deletions Open-ILS/src/extras/install/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ install_libdbi:
--with-pgsql --with-pgsql-incdir=$$(pg_config --includedir) \
--with-pgsql-libdir=$$(pg_config --libdir) && make all install

# NOTE: Deprecate me with wheezy
# NOTE: Use the NodeJS Binary
install_nodejs_from_source:
git clone https://github.com/joyent/node.git
cd node; \
git checkout -b $(NODEJS_SOURCE_VERSION) $(NODEJS_SOURCE_VERSION); \
./configure && make && make install
wget -N $(NODEJS_BINARY)
tar -C /usr/local --strip-components 1 -xJf $(NODEJS_TARBIN)
npm update
npm install -g grunt-cli
npm install -g bower
Expand Down
9 changes: 2 additions & 7 deletions Open-ILS/src/extras/install/Makefile.debian-jessie
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,10 @@ PGSQL_SERVER_DEBS_94 = \
# sections to support building Evergreen packages on servers
# where Evergreen and its prereqs are not installed.

# nodejs-legacy creates a symlink for /usr/bin/node -> /usr/bin/nodejs
# which is needed by our npm-installed packages
DEVELOPER_DEBS = \
automake \
autoconf \
libtool \
nodejs-legacy \
npm
libtool

PACKAGER_DEBS = \
asciidoc \
Expand Down Expand Up @@ -150,8 +146,7 @@ install_postgres_server:
# packages, use the packaged versions instead.
install_developer:
make -f $(DIR)/Makefile.debian DEBS="$(DEVELOPER_DEBS)"
npm update
npm install -g grunt-cli
make -f $(DIR)/Makefile.common install_nodejs_from_source
npm install -g bower

install_translator: install_developer
Expand Down
9 changes: 2 additions & 7 deletions Open-ILS/src/extras/install/Makefile.ubuntu-trusty
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,10 @@ PGSQL_SERVER_DEBS_94 = \
# sections to support building Evergreen packages on servers
# where Evergreen and its prereqs are not installed.

# nodejs-legacy creates a symlink for /usr/bin/node -> /usr/bin/nodejs
# which is needed by our npm-installed packages
DEVELOPER_DEBS = \
automake \
autoconf \
libtool \
nodejs-legacy \
npm
libtool

PACKAGER_DEBS = \
asciidoc \
Expand Down Expand Up @@ -156,8 +152,7 @@ install_postgres_server:
# packages, use the packaged versions instead.
install_developer:
make -f $(DIR)/Makefile.debian DEBS="$(DEVELOPER_DEBS)"
npm update
npm install -g grunt-cli
make -f $(DIR)/Makefile.common install_nodejs_from_source
npm install -g bower

install_translator: install_developer
Expand Down
9 changes: 2 additions & 7 deletions Open-ILS/src/extras/install/Makefile.ubuntu-xenial
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,10 @@ PGSQL_SERVER_DEBS_95 = \
# sections to support building Evergreen packages on servers
# where Evergreen and its prereqs are not installed.

# nodejs-legacy creates a symlink for /usr/bin/node -> /usr/bin/nodejs
# which is needed by our npm-installed packages
DEVELOPER_DEBS = \
automake \
autoconf \
libtool \
nodejs-legacy \
npm
libtool

PACKAGER_DEBS = \
asciidoc \
Expand Down Expand Up @@ -149,8 +145,7 @@ install_postgres_server:
# packages, use the packaged versions instead.
install_developer:
make -f $(DIR)/Makefile.debian DEBS="$(DEVELOPER_DEBS)"
npm update
npm install -g grunt-cli
make -f $(DIR)/Makefile.common install_nodejs_from_source
npm install -g bower

install_translator: install_developer
Expand Down
2 changes: 1 addition & 1 deletion Open-ILS/src/perlmods/lib/OpenILS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ OpenILS - Client and server support for the Evergreen open source library system
=cut

our $VERSION = '2.1207';
our $VERSION = '2.1209';

1;
2 changes: 1 addition & 1 deletion Open-ILS/src/perlmods/lib/OpenILS/Application.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use OpenILS::Utils::Fieldmapper;
sub ils_version {
# version format is "x-y-z", for example "2-0-0" for Evergreen 2.0.0
# For branches, format is "x-y"
return "2-12-7";
return "2-12-9";
}

__PACKAGE__->register_method(
Expand Down
2 changes: 1 addition & 1 deletion Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ sub _add_patron {
# do a dance to get the password hashed securely
my $saved_password = $patron->passwd;
$patron->passwd('');
$e->create_actor_user($patron) or return $e->die_event;
$e->create_actor_user($patron) or return (undef, $e->die_event);
modify_migrated_user_password($e, $patron->id, $saved_password);

my $id = $patron->id; # added by CStoreEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1409,11 +1409,13 @@ sub retrieve_cached_facets {

eval {
local $SIG{ALRM} = sub {die};
alarm(2); # we'll sleep for as much as 2s
alarm(10); # we'll sleep for as much as 10s
do {
die if $cache->get_cache($key . '_COMPLETE');
} while (sleep(0.05));
alarm(0);
};
alarm(0);

my $blob = $cache->get_cache($key) || {};

Expand Down
2 changes: 1 addition & 1 deletion Open-ILS/src/sql/Pg/000.functions.general.sql
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION evergreen.unaccent_and_squash ( IN arg text) RETURNS text
IMMUTABLE STRICT AS $$
BEGIN
RETURN evergreen.lowercase(unaccent(regexp_replace(arg, '[\s[:punct:]]','','g')));
RETURN evergreen.lowercase(public.unaccent('public.unaccent', regexp_replace(arg, '[\s[:punct:]]','','g')));
END;
$$ LANGUAGE PLPGSQL;

Expand Down
4 changes: 2 additions & 2 deletions Open-ILS/src/sql/Pg/002.schema.config.sql
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ 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 ('1078', :eg_version); -- csharp/bshum/gmcharlt
INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.12.7', :eg_version);
INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1083', :eg_version); -- jeff/dyrcona
INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.12.9', :eg_version);

CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Expand Down
4 changes: 4 additions & 0 deletions Open-ILS/src/sql/Pg/999.functions.global.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,8 @@ BEGIN
SELECT INTO target_cn *
FROM asset.call_number
WHERE label = source_cn.label
AND prefix = source_cn.prefix
AND suffix = source_cn.suffix
AND owning_lib = source_cn.owning_lib
AND record = target_record
AND NOT deleted;
Expand All @@ -1082,6 +1084,8 @@ BEGIN

moved_objects := moved_objects + 1;
END LOOP;

UPDATE asset.call_number SET deleted = TRUE WHERE id = source_cn.id;

-- ... if not ...
ELSE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
BEGIN;

SELECT plan(5);

----------------------------------
--
-- Setup Test environment and data
--
----------------------------------

-- create mock bib records to be merged:
-- Data:
-- bib 60000 (new lead), org 4 acn 'F Cline' copy 1
-- bib 60001 (merged from target), org 5 acn 'JF cline' copy 2, org 6 acn 'JF Cline' copy 3, org 4 acn 'F Cline' copy 4
--
-- copy 2 ACN

-- create bib 60,000
INSERT into biblio.record_entry (id, marc, last_xact_id)
VALUES (60000,
$$
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"><leader>00934njm a2200241 a 4500</leader><controlfield tag="001">03-0003745</controlfield><controlfield tag="005">19991118131708.0</controlfield><controlfield tag="008">971016n nyuuuu eng </controlfield><datafield tag="050" ind1=" " ind2=" "><subfield code="a">4539</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Bart&#xF3;k, B&#xE9;la,</subfield><subfield code="d">1881-1945.</subfield></datafield><datafield tag="240" ind1=" " ind2=" "><subfield code="t">Concertos,</subfield><subfield code="m">piano,</subfield><subfield code="n">no. 1,</subfield><subfield code="n">Sz. 83</subfield><subfield code="f">(1926) </subfield><subfield code="a">Concertos,</subfield><subfield code="m">piano,</subfield><subfield code="n">no. 1,</subfield><subfield code="n">Sz. 83,</subfield><subfield code="n">(1926)</subfield></datafield><datafield tag="245" ind1=" " ind2=" "><subfield code="a">Piano concerto no. 1 (1926) ; Rhapsody, op. 1 (1904)</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">New York, NY :</subfield><subfield code="b">Vox</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">1 sound disc :</subfield><subfield code="b">33 1/3 rpm, stereo.</subfield></datafield><datafield tag="349" ind1=" " ind2=" "><subfield code="a">PHONO RECORD</subfield></datafield><datafield tag="511" ind1=" " ind2=" "><subfield code="a">Gy&#xF6;rgy S&#xE1;ndor, piano ; Sudwest[rund]funkorchester, Baden-Baden ; Rolf Reinhardt, conductor.</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">S&#xE1;ndor, Gy&#xF6;rgy,</subfield><subfield code="d">1912-</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Reinhardt, Rolf</subfield></datafield><datafield tag="710" ind1=" " ind2=" "><subfield code="a">Sudwestrundfunkorchester (Baden-Baden, Germany)</subfield></datafield><datafield tag="730" ind1=" " ind2=" "><subfield code="a">Rhapsodies,</subfield><subfield code="m">piano, orchestra,</subfield><subfield code="n">op. 1,</subfield><subfield code="n">Sz. 27,</subfield><subfield code="n">(1904)</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="a">a339398</subfield><subfield code="b">Sirsi_Auto</subfield><subfield code="c">339398</subfield></datafield></record>
$$,
'PGTAP'
);


-- create bib 60,001
INSERT into biblio.record_entry (id, marc, last_xact_id)
VALUES (60001,
$$
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"><leader>00863njm a2200253 a 4500</leader><controlfield tag="001">03-0004689</controlfield><controlfield tag="005">19991127191346.0</controlfield><controlfield tag="008">971027r19631952nyuuuu eng </controlfield><datafield tag="050" ind1=" " ind2=" "><subfield code="a">4578</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Telemann, Georg Philipp,</subfield><subfield code="d">1681-1767</subfield></datafield><datafield tag="245" ind1=" " ind2=" "><subfield code="a">Viola concerto in G major</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">New York, NY :</subfield><subfield code="b">Vox,</subfield><subfield code="c">1963</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">1 sound disc :</subfield><subfield code="b">33 1/3 rpm, mono.</subfield></datafield><datafield tag="349" ind1=" " ind2=" "><subfield code="a">PHONO RECORD</subfield></datafield><datafield tag="505" ind1=" " ind2=" "><subfield code="a">Viola concerto / Telemann -- Viola concerto in D major / Stamitz.</subfield></datafield><datafield tag="511" ind1=" " ind2=" "><subfield code="a">Heinz Wigand, viola ; Pro Musica Orchestra, Stuttgart ; Rolf Reinhardt, conductor.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Concertos (Viola)</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Stamitz, Carl,</subfield><subfield code="d">1745-1801</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Reinhardt, Rolf</subfield></datafield><datafield tag="700" ind1=" " ind2=" "><subfield code="a">Wigand, Heinz</subfield></datafield><datafield tag="710" ind1="2" ind2=" "><subfield code="a">Pro Musica Orchestra (Stuttgart)</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="a">a340312</subfield><subfield code="b">Sirsi_Auto</subfield><subfield code="c">340312</subfield></datafield></record>
$$,
'PGTAP'
);


INSERT into asset.call_number(id, record, creator, editor, owning_lib, label, label_class, prefix)
VALUES (999999, 60000, 1, 1, 4, 'Cline', 1, 9986),
(1000000,60001, 1, 1, 5, 'Cline', 1, 9987),
(1000001,60001, 1, 1, 6, 'Cline', 1, 9988),
(1000002,60001, 1, 1, 4, 'Cline', 1, 9986);

INSERT into asset.call_number_prefix(id, owning_lib, label) VALUES
(9986, 4, 'F'),
(9987, 5, 'F'),
(9988, 6, 'JF');

-- circ_lib for copy == the same as acn
INSERT INTO asset.copy(id, circ_lib, creator, call_number, editor, copy_number, loan_duration, fine_level, barcode) VALUES
(905555, 4, 1, 999999, 1, 1, 1, 1, '1copycopycopy'),
(906666, 5, 1, 1000000, 1, 1, 1, 1, '2copycopycopy'),
(907777, 6, 1, 1000001, 1, 1, 1, 1, '3copycopycopy'),
(908888, 4, 1, 1000002, 1, 1, 1, 1, '4copycopycopy');

-----------------------------------
-- Test asset.merge_record_assets()
-----------------------------------

-- do merge
SELECT is(asset.merge_record_assets(60000, 60001), 4, 'Record assets merged!');

-- check if copy 4's acn was updated
SELECT is(
(SELECT call_number from asset.copy where id=908888)::BIGINT,
999999::BIGINT,
'LP 1145213 asset.merge_record_assets() messing up call numbers. copy 4 should have acn -> 999999'
);

-- acn #1,000,002 should be deleted
SELECT is(
(SELECT deleted FROM asset.call_number WHERE id=1000002)::BOOLEAN,
TRUE,
'LP 1145213 asset.merge_record_assets() should have deleted acn #1000002'
);

-- all non-deleted acn should point to source bib record #60,000
SELECT is(
(SELECT count(*) FROM asset.call_number WHERE record=60001 AND not deleted=true)::INT,
0::INT,
'LP 1145213 asset.merge_record_assets() all call_numbers should point to bib record #60,000 '
);

-- test copies to make sure none point to stale acn
SELECT is(
(SELECT count(*) from asset.copy where call_number=1000002)::INT,
0::INT,
'LP 1145213 asset.merge_record_assets() all copies should point to acn #999999 which is for bib record #60,000 '
);

SELECT * FROM finish();

ROLLBACK;

Loading

0 comments on commit bf10cfa

Please sign in to comment.