[open-ils-commits] r10540 - in trunk: Evergreen/src/extras
Evergreen/src/extras/import Open-ILS/src/extras
Open-ILS/src/extras/import Open-ILS/src/sql/Pg
Open-ILS/src/support-scripts Open-ILS/web/vandelay
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 5 08:05:25 EDT 2008
Author: miker
Date: 2008-09-05 08:05:24 -0400 (Fri, 05 Sep 2008)
New Revision: 10540
Added:
trunk/Open-ILS/src/extras/import/quick_metarecord_map.sql
trunk/Open-ILS/src/extras/import/user_import.pl
trunk/Open-ILS/src/extras/report-fail
trunk/Open-ILS/src/extras/report-success
trunk/Open-ILS/src/support-scripts/object_dumper.pl
Removed:
trunk/Evergreen/src/extras/import/object_dumper.pl
trunk/Evergreen/src/extras/import/quick_metarecord_map.sql
trunk/Evergreen/src/extras/import/user_import.pl
trunk/Evergreen/src/extras/report-fail
trunk/Evergreen/src/extras/report-success
Modified:
trunk/Open-ILS/src/sql/Pg/100.circ_matrix.sql
trunk/Open-ILS/web/vandelay/vandelay.html
Log:
cleaning up the Evergreen repo area; adding Overlay as an option to Vandelay upload; fix thinko in in-db circ to load the circ test
Deleted: trunk/Evergreen/src/extras/import/object_dumper.pl
===================================================================
--- trunk/Evergreen/src/extras/import/object_dumper.pl 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Evergreen/src/extras/import/object_dumper.pl 2008-09-05 12:05:24 UTC (rev 10540)
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-# ---------------------------------------------------------------------
-# Generic databse object dumper.
-# ./object_dumper.pl <bootstrap_config> <type>, <type>, ...
-# ./object_dumper.pl /openils/conf/opensrf_core.xml permission.grp_tree
-# ---------------------------------------------------------------------
-
-use strict;
-use warnings;
-use OpenSRF::Utils::JSON;
-use OpenSRF::System;
-use OpenILS::Utils::Fieldmapper;
-use OpenSRF::Utils::SettingsClient;
-
-my $config = shift || die "bootstrap config required\n";
-
-OpenSRF::System->bootstrap_client( config_file => $config );
-Fieldmapper->import;
-
-require OpenILS::Utils::CStoreEditor;
-my $e = OpenILS::Utils::CStoreEditor->new;
-
-for my $t (@ARGV) {
- $t =~ s/\./_/og;
- my $m = "retrieve_all_$t";
- my $d = $e->$m();
- print OpenSRF::Utils::JSON->perl2JSON($_) . "\n" for @$d;
-}
Deleted: trunk/Evergreen/src/extras/import/quick_metarecord_map.sql
===================================================================
--- trunk/Evergreen/src/extras/import/quick_metarecord_map.sql 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Evergreen/src/extras/import/quick_metarecord_map.sql 2008-09-05 12:05:24 UTC (rev 10540)
@@ -1,31 +0,0 @@
-BEGIN;
-
-ALTER TABLE metabib.metarecord_source_map DROP CONSTRAINT metabib_metarecord_source_map_metarecord_fkey;
-
-TRUNCATE metabib.metarecord;
-TRUNCATE metabib.metarecord_source_map;
-
-INSERT INTO metabib.metarecord (fingerprint,master_record)
- SELECT fingerprint,id
- FROM (SELECT DISTINCT ON (fingerprint)
- fingerprint, id, quality
- FROM biblio.record_entry
- ORDER BY fingerprint, quality desc) AS x
- WHERE fingerprint IS NOT NULL;
-
-INSERT INTO metabib.metarecord_source_map (metarecord,source)
- SELECT m.id, b.id
- FROM biblio.record_entry b
- JOIN metabib.metarecord m ON (m.fingerprint = b.fingerprint);
-
-COMMIT;
-
-BEGIN;
-
-ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id) DEFERRABLE INITIALLY DEFERRED;
-
-COMMIT;
-
-VACUUM FULL ANALYZE VERBOSE metabib.metarecord;
-VACUUM FULL ANALYZE VERBOSE metabib.metarecord_source_map;
-
Deleted: trunk/Evergreen/src/extras/import/user_import.pl
===================================================================
--- trunk/Evergreen/src/extras/import/user_import.pl 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Evergreen/src/extras/import/user_import.pl 2008-09-05 12:05:24 UTC (rev 10540)
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Data::Dumper;
-
-while (<STDIN>) {
- chomp;
- my @parts = split '\|';
-# @parts = @parts[
-# PRIV_EXP_DATE CREATION_DATE PRIV_GRANT_DATE DELINQ_STATUS
-# 3, 4, 5, 7,
-#
-# USER_BARCODE PROFILE COUNTY(CAT1) BIRTH_YEAR
-# 10, 12, 13, 15,
-#
-# HOME_LIB ZIP ALTID ADDRESS1
-# 16, 17, 18, 19,
-#
-# ADDRESS2 PHONE EMAIL NAME
-# 20, 21, 22, 23,
-#
-# NUM_CLAIMED_RETURNED
-# 24
-# ];
-
- my $addr = parse_addr(@parts[19,20]);
-
- $$addr{county} = $parts[13];
- $$addr{zip} ||= $parts[17];
-
- print Dumper($addr);
-}
-
-sub parse_addr {
- my $addr1 = shift;
- my $addr2 = shift;
-
- $addr1 =~ s/^\s*(.+)\s*$/$1/gso;
- $addr2 =~ s/^\s*(.+)\s*$/$1/gso;
-
- $addr1 =~ s/\s+/ /gso;
- $addr2 =~ s/\s+/ /gso;
-
- my %hash;
-
- if ($addr1 =~ /^(\d+\s+[^,]+)/o) {
- $hash{address1} = $1;
- if ($addr1 =~ /,\s+(.+)$/o) {
- my $a2 = $1;
- if ($a2 =~ /^(\w{2})\.?\s+(\d+)$/o) {
- $hash{state} = uc($1);
- $hash{zip} = $2;
- } elsif (lc($a2) !~ /^(?:s\.?e\.?|s\.?w\.?|n\.?e\.?|n\.?w\.?|south|north|east|west|n\.?|s\.?|e\.?|w\.?)$/) {
- $hash{address2} = $a2;
- } else {
- $hash{address1} .= " $a2";
- }
- }
- } else {
- $hash{address1} = $addr1;
- }
-
- if ($addr2 =~ /^([^,]+),\s*(\w{2}).*\s+(\w+)$/o) {
- $hash{city} = $1;
- $hash{state} = uc($2);
- $hash{zip} = $3;
- }
-
- return \%hash;
-}
Deleted: trunk/Evergreen/src/extras/report-fail
===================================================================
--- trunk/Evergreen/src/extras/report-fail 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Evergreen/src/extras/report-fail 2008-09-05 12:05:24 UTC (rev 10540)
@@ -1,20 +0,0 @@
-To: {TO}
-From: {FROM}
-Reply-To: {REPLY_TO}
-Subject: Report Failure Notification
-
-Your report, named [{REPORT_NAME}], was scheduled to run at {RUN_TIME} has failed with the following error message:
-
- {ERROR_TEXT}
-
-The SQL command attempted was:
-
- {SQL}
-
-If you are unsure of the meaning of this message, please contact PINES staff
-and give them both the error message and the SQL command.
-
-Thanks,
-
-Clark Kent, your friendly neighorhood reporter.
-
Deleted: trunk/Evergreen/src/extras/report-success
===================================================================
--- trunk/Evergreen/src/extras/report-success 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Evergreen/src/extras/report-success 2008-09-05 12:05:24 UTC (rev 10540)
@@ -1,16 +0,0 @@
-To: {TO}
-From: {FROM}
-Reply-To: {REPLY_TO}
-Subject: Report Completion Notification
-
-Your report, named [{REPORT_NAME}], was scheduled to run at {RUN_TIME} and completed at {COMPLETE_TIME}.
-It is available for viewing at the following URL:
-
- {OUTPUT_URL}
-
-If you have any general questions, please contact the PINES staff.
-
-Thanks,
-
-Clark Kent, your friendly neighorhood reporter.
-
Copied: trunk/Open-ILS/src/extras/import/quick_metarecord_map.sql (from rev 10410, trunk/Evergreen/src/extras/import/quick_metarecord_map.sql)
===================================================================
--- trunk/Open-ILS/src/extras/import/quick_metarecord_map.sql (rev 0)
+++ trunk/Open-ILS/src/extras/import/quick_metarecord_map.sql 2008-09-05 12:05:24 UTC (rev 10540)
@@ -0,0 +1,31 @@
+BEGIN;
+
+ALTER TABLE metabib.metarecord_source_map DROP CONSTRAINT metabib_metarecord_source_map_metarecord_fkey;
+
+TRUNCATE metabib.metarecord;
+TRUNCATE metabib.metarecord_source_map;
+
+INSERT INTO metabib.metarecord (fingerprint,master_record)
+ SELECT fingerprint,id
+ FROM (SELECT DISTINCT ON (fingerprint)
+ fingerprint, id, quality
+ FROM biblio.record_entry
+ ORDER BY fingerprint, quality desc) AS x
+ WHERE fingerprint IS NOT NULL;
+
+INSERT INTO metabib.metarecord_source_map (metarecord,source)
+ SELECT m.id, b.id
+ FROM biblio.record_entry b
+ JOIN metabib.metarecord m ON (m.fingerprint = b.fingerprint);
+
+COMMIT;
+
+BEGIN;
+
+ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id) DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
+
+VACUUM FULL ANALYZE VERBOSE metabib.metarecord;
+VACUUM FULL ANALYZE VERBOSE metabib.metarecord_source_map;
+
Copied: trunk/Open-ILS/src/extras/import/user_import.pl (from rev 10410, trunk/Evergreen/src/extras/import/user_import.pl)
===================================================================
--- trunk/Open-ILS/src/extras/import/user_import.pl (rev 0)
+++ trunk/Open-ILS/src/extras/import/user_import.pl 2008-09-05 12:05:24 UTC (rev 10540)
@@ -0,0 +1,70 @@
+#!/usr/bin/perl
+
+use strict;
+use Data::Dumper;
+
+while (<STDIN>) {
+ chomp;
+ my @parts = split '\|';
+# @parts = @parts[
+# PRIV_EXP_DATE CREATION_DATE PRIV_GRANT_DATE DELINQ_STATUS
+# 3, 4, 5, 7,
+#
+# USER_BARCODE PROFILE COUNTY(CAT1) BIRTH_YEAR
+# 10, 12, 13, 15,
+#
+# HOME_LIB ZIP ALTID ADDRESS1
+# 16, 17, 18, 19,
+#
+# ADDRESS2 PHONE EMAIL NAME
+# 20, 21, 22, 23,
+#
+# NUM_CLAIMED_RETURNED
+# 24
+# ];
+
+ my $addr = parse_addr(@parts[19,20]);
+
+ $$addr{county} = $parts[13];
+ $$addr{zip} ||= $parts[17];
+
+ print Dumper($addr);
+}
+
+sub parse_addr {
+ my $addr1 = shift;
+ my $addr2 = shift;
+
+ $addr1 =~ s/^\s*(.+)\s*$/$1/gso;
+ $addr2 =~ s/^\s*(.+)\s*$/$1/gso;
+
+ $addr1 =~ s/\s+/ /gso;
+ $addr2 =~ s/\s+/ /gso;
+
+ my %hash;
+
+ if ($addr1 =~ /^(\d+\s+[^,]+)/o) {
+ $hash{address1} = $1;
+ if ($addr1 =~ /,\s+(.+)$/o) {
+ my $a2 = $1;
+ if ($a2 =~ /^(\w{2})\.?\s+(\d+)$/o) {
+ $hash{state} = uc($1);
+ $hash{zip} = $2;
+ } elsif (lc($a2) !~ /^(?:s\.?e\.?|s\.?w\.?|n\.?e\.?|n\.?w\.?|south|north|east|west|n\.?|s\.?|e\.?|w\.?)$/) {
+ $hash{address2} = $a2;
+ } else {
+ $hash{address1} .= " $a2";
+ }
+ }
+ } else {
+ $hash{address1} = $addr1;
+ }
+
+ if ($addr2 =~ /^([^,]+),\s*(\w{2}).*\s+(\w+)$/o) {
+ $hash{city} = $1;
+ $hash{state} = uc($2);
+ $hash{zip} = $3;
+ }
+
+ return \%hash;
+}
Copied: trunk/Open-ILS/src/extras/report-fail (from rev 10410, trunk/Evergreen/src/extras/report-fail)
===================================================================
--- trunk/Open-ILS/src/extras/report-fail (rev 0)
+++ trunk/Open-ILS/src/extras/report-fail 2008-09-05 12:05:24 UTC (rev 10540)
@@ -0,0 +1,20 @@
+To: {TO}
+From: {FROM}
+Reply-To: {REPLY_TO}
+Subject: Report Failure Notification
+
+Your report, named [{REPORT_NAME}], was scheduled to run at {RUN_TIME} has failed with the following error message:
+
+ {ERROR_TEXT}
+
+The SQL command attempted was:
+
+ {SQL}
+
+If you are unsure of the meaning of this message, please contact PINES staff
+and give them both the error message and the SQL command.
+
+Thanks,
+
+Clark Kent, your friendly neighorhood reporter.
+
Copied: trunk/Open-ILS/src/extras/report-success (from rev 10410, trunk/Evergreen/src/extras/report-success)
===================================================================
--- trunk/Open-ILS/src/extras/report-success (rev 0)
+++ trunk/Open-ILS/src/extras/report-success 2008-09-05 12:05:24 UTC (rev 10540)
@@ -0,0 +1,16 @@
+To: {TO}
+From: {FROM}
+Reply-To: {REPLY_TO}
+Subject: Report Completion Notification
+
+Your report, named [{REPORT_NAME}], was scheduled to run at {RUN_TIME} and completed at {COMPLETE_TIME}.
+It is available for viewing at the following URL:
+
+ {OUTPUT_URL}
+
+If you have any general questions, please contact the PINES staff.
+
+Thanks,
+
+Clark Kent, your friendly neighorhood reporter.
+
Modified: trunk/Open-ILS/src/sql/Pg/100.circ_matrix.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/100.circ_matrix.sql 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Open-ILS/src/sql/Pg/100.circ_matrix.sql 2008-09-05 12:05:24 UTC (rev 10540)
@@ -288,6 +288,8 @@
SELECT INTO matchpoint_id action.find_circ_matrix_matchpoint(circ_ou, match_item, match_user, renewal);
result.matchpoint := matchpoint_id;
+ SELECT INTO circ_test * from config.circ_matrix_test WHERE matchpoint = result.matchpoint;
+
-- Fail if we couldn't find a set of tests
IF result.matchpoint IS NULL THEN
result.fail_part := 'no_matchpoint';
Copied: trunk/Open-ILS/src/support-scripts/object_dumper.pl (from rev 10410, trunk/Evergreen/src/extras/import/object_dumper.pl)
===================================================================
--- trunk/Open-ILS/src/support-scripts/object_dumper.pl (rev 0)
+++ trunk/Open-ILS/src/support-scripts/object_dumper.pl 2008-09-05 12:05:24 UTC (rev 10540)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+# ---------------------------------------------------------------------
+# Generic databse object dumper.
+# ./object_dumper.pl <bootstrap_config> <type>, <type>, ...
+# ./object_dumper.pl /openils/conf/opensrf_core.xml permission.grp_tree
+# ---------------------------------------------------------------------
+
+use strict;
+use warnings;
+use OpenSRF::Utils::JSON;
+use OpenSRF::System;
+use OpenILS::Utils::Fieldmapper;
+use OpenSRF::Utils::SettingsClient;
+
+my $config = shift || die "bootstrap config required\n";
+
+OpenSRF::System->bootstrap_client( config_file => $config );
+Fieldmapper->import;
+
+require OpenILS::Utils::CStoreEditor;
+my $e = OpenILS::Utils::CStoreEditor->new;
+
+for my $t (@ARGV) {
+ $t =~ s/\./_/og;
+ my $m = "retrieve_all_$t";
+ my $d = $e->$m();
+ print OpenSRF::Utils::JSON->perl2JSON($_) . "\n" for @$d;
+}
Modified: trunk/Open-ILS/web/vandelay/vandelay.html
===================================================================
--- trunk/Open-ILS/web/vandelay/vandelay.html 2008-09-04 17:18:17 UTC (rev 10539)
+++ trunk/Open-ILS/web/vandelay/vandelay.html 2008-09-05 12:05:24 UTC (rev 10540)
@@ -73,6 +73,7 @@
<td>
<select name='purpose' dojoType='dijit.form.FilteringSelect'>
<option value='import'>Import</option>
+ <option value='overlay'>Overlay</option>
</select>
</td>
</tr>
More information about the open-ils-commits
mailing list