cleaning up the Evergreen repo area; adding Overlay as an option to Vandelay upload...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Sep 2008 12:05:24 +0000 (12:05 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Sep 2008 12:05:24 +0000 (12:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10540 dcc99617-32d9-48b4-a31d-7c20da2025e4

12 files changed:
Evergreen/src/extras/import/object_dumper.pl [deleted file]
Evergreen/src/extras/import/quick_metarecord_map.sql [deleted file]
Evergreen/src/extras/import/user_import.pl [deleted file]
Evergreen/src/extras/report-fail [deleted file]
Evergreen/src/extras/report-success [deleted file]
Open-ILS/src/extras/import/quick_metarecord_map.sql [new file with mode: 0644]
Open-ILS/src/extras/import/user_import.pl [new file with mode: 0755]
Open-ILS/src/extras/report-fail [new file with mode: 0644]
Open-ILS/src/extras/report-success [new file with mode: 0644]
Open-ILS/src/sql/Pg/100.circ_matrix.sql
Open-ILS/src/support-scripts/object_dumper.pl [new file with mode: 0755]
Open-ILS/web/vandelay/vandelay.html

diff --git a/Evergreen/src/extras/import/object_dumper.pl b/Evergreen/src/extras/import/object_dumper.pl
deleted file mode 100755 (executable)
index 0f69ca4..0000000
+++ /dev/null
@@ -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;
-}
diff --git a/Evergreen/src/extras/import/quick_metarecord_map.sql b/Evergreen/src/extras/import/quick_metarecord_map.sql
deleted file mode 100644 (file)
index f058a4d..0000000
+++ /dev/null
@@ -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;
-
diff --git a/Evergreen/src/extras/import/user_import.pl b/Evergreen/src/extras/import/user_import.pl
deleted file mode 100755 (executable)
index 9031468..0000000
+++ /dev/null
@@ -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;
-}
diff --git a/Evergreen/src/extras/report-fail b/Evergreen/src/extras/report-fail
deleted file mode 100644 (file)
index 496da93..0000000
+++ /dev/null
@@ -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.
-
diff --git a/Evergreen/src/extras/report-success b/Evergreen/src/extras/report-success
deleted file mode 100644 (file)
index 38212df..0000000
+++ /dev/null
@@ -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.
-
diff --git a/Open-ILS/src/extras/import/quick_metarecord_map.sql b/Open-ILS/src/extras/import/quick_metarecord_map.sql
new file mode 100644 (file)
index 0000000..f058a4d
--- /dev/null
@@ -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;
+
diff --git a/Open-ILS/src/extras/import/user_import.pl b/Open-ILS/src/extras/import/user_import.pl
new file mode 100755 (executable)
index 0000000..9031468
--- /dev/null
@@ -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;
+}
diff --git a/Open-ILS/src/extras/report-fail b/Open-ILS/src/extras/report-fail
new file mode 100644 (file)
index 0000000..496da93
--- /dev/null
@@ -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.
+
diff --git a/Open-ILS/src/extras/report-success b/Open-ILS/src/extras/report-success
new file mode 100644 (file)
index 0000000..38212df
--- /dev/null
@@ -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.
+
index 1aa7d69..5059351 100644 (file)
@@ -288,6 +288,8 @@ BEGIN
        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';
diff --git a/Open-ILS/src/support-scripts/object_dumper.pl b/Open-ILS/src/support-scripts/object_dumper.pl
new file mode 100755 (executable)
index 0000000..0f69ca4
--- /dev/null
@@ -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;
+}
index 415a6a2..c83303b 100644 (file)
@@ -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>