From: erickson Date: Thu, 19 Jun 2008 20:56:41 +0000 (+0000) Subject: Merged revisions 9822-9824,9828,9832,9836-9837,9840,9843-9850,9853-9854,9857,9862... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d4f833e96c7c8353debed14c346a81f13c485d8d;p=Evergreen.git Merged revisions 9822-9824,9828,9832,9836-9837,9840,9843-9850,9853-9854,9857,9862-9870,9873,9876,9880-9881,9886,9889-9890 via svnmerge from svn://svn.open-ils.org/ILS/trunk ........ r9822 | dbs | 2008-06-13 07:34:46 -0400 (Fri, 13 Jun 2008) | 1 line Fix broken entity ........ r9823 | dbs | 2008-06-13 07:35:25 -0400 (Fri, 13 Jun 2008) | 1 line Add script for checking DTD entities and usage ........ r9824 | dbs | 2008-06-13 07:36:57 -0400 (Fri, 13 Jun 2008) | 1 line Commit large i18n patch from Craig Ricciuto ........ r9828 | miker | 2008-06-13 09:40:46 -0400 (Fri, 13 Jun 2008) | 1 line adding copyright statement headers to the schema definition files; forward porting extend_reporter schema and example ........ r9832 | miker | 2008-06-13 13:34:39 -0400 (Fri, 13 Jun 2008) | 1 line add "is blank" and "is not blank" ops, similar to "is null" and "is not null" ........ r9836 | phasefx | 2008-06-13 17:16:07 -0400 (Fri, 13 Jun 2008) | 1 line Retrieve Record via internal Bib Id. No error checking ........ r9837 | dbs | 2008-06-16 09:04:29 -0400 (Mon, 16 Jun 2008) | 2 lines Prevent the title from being concatenated and remove obsolete comments ........ r9840 | miker | 2008-06-16 21:16:42 -0400 (Mon, 16 Jun 2008) | 1 line adding link from Copy source to total circ count view ........ r9843 | miker | 2008-06-17 08:47:28 -0400 (Tue, 17 Jun 2008) | 1 line activate the reporter schema extention ........ r9844 | dbs | 2008-06-17 14:07:45 -0400 (Tue, 17 Jun 2008) | 2 lines Apply Craig Ricciuto's patch to bring i18n to a number of patron interfaces ........ r9845 | dbs | 2008-06-18 01:24:09 -0400 (Wed, 18 Jun 2008) | 3 lines Add initial work towards CentOS/RHEL installation prerequisites Use aptitude instead of apt-get; make it easily configurable ........ r9846 | miker | 2008-06-18 12:19:09 -0400 (Wed, 18 Jun 2008) | 1 line add copy locations as a search filter ........ r9847 | miker | 2008-06-18 14:15:24 -0400 (Wed, 18 Jun 2008) | 1 line adding table (and view, for combining) to record "patronless" obfuscated circ data ........ r9848 | miker | 2008-06-18 14:16:11 -0400 (Wed, 18 Jun 2008) | 1 line adding IDL definitions for "patronless" obfuscated circ data ........ r9849 | miker | 2008-06-18 15:38:39 -0400 (Wed, 18 Jun 2008) | 1 line adding circ id to the all_circs view; adding BEFORE DELETE trigger to perform aging ........ r9850 | miker | 2008-06-18 15:58:18 -0400 (Wed, 18 Jun 2008) | 1 line fixing reporter extention example ........ r9853 | erickson | 2008-06-18 16:00:42 -0400 (Wed, 18 Jun 2008) | 1 line copying the item-config into the result object. fixed bug in capturing item config info in SIP msg ........ r9854 | dbs | 2008-06-18 16:36:22 -0400 (Wed, 18 Jun 2008) | 3 lines Debian's version of make likes its comments well-separated Fixes "commands commence before first target" error. ........ r9857 | miker | 2008-06-18 21:22:19 -0400 (Wed, 18 Jun 2008) | 1 line SQL generation bug on nullable joins ........ r9862 | erickson | 2008-06-18 22:25:38 -0400 (Wed, 18 Jun 2008) | 1 line patch from Brandon Uhlman (with slight alteration discussed and 1 added sanity check) to allow item barcodes to be returned instead of titles in the patron information request. The oils_sip.xml.exmample comments do a good job of explaining it. Thanks, Brandon. ........ r9863 | erickson | 2008-06-18 23:03:52 -0400 (Wed, 18 Jun 2008) | 1 line UI component for selecting copy locations to filter on. todo: plugging in cgi params and middle-layer work ........ r9864 | miker | 2008-06-18 23:07:33 -0400 (Wed, 18 Jun 2008) | 1 line add opac_visible flag to config.copy_status; make Reserves status "available" in counts ........ r9865 | miker | 2008-06-19 00:21:45 -0400 (Thu, 19 Jun 2008) | 1 line more switching to opac_visible on status ........ r9866 | erickson | 2008-06-19 09:08:23 -0400 (Thu, 19 Jun 2008) | 1 line slight wording change to make the date entry more clear ........ r9867 | erickson | 2008-06-19 09:10:56 -0400 (Thu, 19 Jun 2008) | 1 line patch from Bill Ott for a form-reset button to clear the advanced search inputs. i augmented the "clean" action to clear user-entered data in addition to data propogated from a search ........ r9868 | erickson | 2008-06-19 09:31:28 -0400 (Thu, 19 Jun 2008) | 1 line plugging in copy location search param logic ........ r9869 | erickson | 2008-06-19 09:52:49 -0400 (Thu, 19 Jun 2008) | 1 line moved copy location filter in with other filters -- only visible when search location has can_have_vols==true ........ r9870 | miker | 2008-06-19 11:30:35 -0400 (Thu, 19 Jun 2008) | 1 line honor expire time on holds ........ r9873 | phasefx | 2008-06-19 11:45:13 -0400 (Thu, 19 Jun 2008) | 1 line This fixes one class of caching problems with the chrome OPAC wrapper (all the different staff views that hang off of the catalog) ........ r9876 | erickson | 2008-06-19 11:57:08 -0400 (Thu, 19 Jun 2008) | 1 line added support for setting hold expire time using an interval defined in the org unit setting ........ r9880 | miker | 2008-06-19 13:14:07 -0400 (Thu, 19 Jun 2008) | 1 line typo ........ r9881 | miker | 2008-06-19 13:51:55 -0400 (Thu, 19 Jun 2008) | 1 line perl syntax typo ........ r9886 | phasefx | 2008-06-19 14:58:10 -0400 (Thu, 19 Jun 2008) | 1 line use POST instead of GET to prevent caching ........ r9889 | erickson | 2008-06-19 15:15:55 -0400 (Thu, 19 Jun 2008) | 1 line removed the image caching configs since that is handled by memcache now ........ r9890 | dbs | 2008-06-19 16:35:21 -0400 (Thu, 19 Jun 2008) | 2 lines Merge another i18n patch from Craig Ricciuto ........ git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9891 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/apache/eg.conf b/Open-ILS/examples/apache/eg.conf index 6bd99b118f..894aa55356 100644 --- a/Open-ILS/examples/apache/eg.conf +++ b/Open-ILS/examples/apache/eg.conf @@ -66,22 +66,6 @@ Alias /cgi-bin/ "/openils/var/cgi-bin/" # ---------------------------------------------------------------------------------- -# OPTIONAL: Set up image caching - some of these options only work with apache2.2 -# ---------------------------------------------------------------------------------- -# XXX This is no longer needed with built-in added content image caching -#CacheRoot "/opt/cache/" -#CacheEnable disk /opac/extras/jacket/ -#CacheMaxFileSize 1073741824 -#CacheIgnoreCacheControl On -#CacheStorePrivate On -#CacheStoreNoStore On -#CacheIgnoreNoLastMod On -#CacheMaxExpire 86400 -#CacheLastModifiedFactor 0.5 -#CacheDefaultExpire 604800 - - -# ---------------------------------------------------------------------------------- # OPTIONAL: Set how long the client will cache our content. Change to suit # ---------------------------------------------------------------------------------- ExpiresActive On diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index d19eb2ad89..2c41d5e601 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1567,6 +1567,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -1718,6 +1719,140 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2628,7 +2763,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + + @@ -2643,6 +2779,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -3915,6 +4052,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + + + + + + + + diff --git a/Open-ILS/examples/oils_sip.xml.example b/Open-ILS/examples/oils_sip.xml.example index 27b4c5522d..295666d841 100644 --- a/Open-ILS/examples/oils_sip.xml.example +++ b/Open-ILS/examples/oils_sip.xml.example @@ -78,7 +78,17 @@ - + + + /openils/var/ /openils/var/catalog/ diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 87a8f43aed..5c6dbcab61 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -3,19 +3,24 @@ # # Makefile to install prerequisites for OpenSRF and Evergreen # -# Currently supports Debian (etch), Ubuntu (gutsy) and Gentoo. Installs Perl prereqs, -# libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz +# Currently supports Debian (etch), Ubuntu (gutsy), and Gentoo. +# Working towards support of CentOS 5 / RHEL 5. +# Installs Perl prereqs, libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz # # usage: # make -f Makefile.install debian # - or - # make -f Makefile.install ubuntu # - or - +# make -f Makefile.install centos +# - or - +# make -f Makefile.install rhel +# - or - # make -f Makefile.install gentoo # # Notes: # -# This makefile has been tested much more with Debian than Gentoo. +# This makefile has been tested much more with Debian than CentOS, Gentoo, or RHEL. # # Gentoo (especially amd64) requires a good bit of masked package # mangling for some packages. These are not documented here because @@ -47,6 +52,27 @@ LIBDBI_HOST=http://open-ils.org/~denials/evergreen YAZ=yaz-2.1.56 YAZ_HOST=http://ftp.indexdata.dk/pub/yaz +# ejabberd is not packaged on CentOS/RHEL, so we have to +# download the installable package from the source +EJABBERD_VER=2.0.1 +EJABBERD_PKG=ejabberd-2.0.1_2-linux-x86-installer.bin +EJABBERD_HOST=http://www.process-one.net/downloads/ejabberd + +# Business::OnlinePayment is not packaged on CentOS/RHEL +PAY_ONLINE=Business-OnlinePayment-3.00_08.tar.gz +PAY_ONLINE_HOST=http://ftp.perl.org/pub/CPAN/authors/id/I/IV/IVAN/ + + +# XML::LibXSLT fails due to old libxslt +XSLT=libxslt-1.1.22 +XSLT_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1 + +# libxslt depends on a newer version of libxml2: +XML2=libxml2-2.6.30.tar.gz +XML2_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6 + +APT_TOOL=aptitude + # Debian dependencies DEBS = \ build-essential\ @@ -106,6 +132,82 @@ DEBS = \ libbusiness-onlinepayment-perl\ libbusiness-onlinepayment-authorizenet-perl +CENTOS = \ + apr-util-devel \ + aspell \ + aspell-devel \ + aspell-en \ + autoconf \ + automake \ + gcc \ + gd-devel \ + gdbm-devel \ + httpd-devel \ + less \ + libtool \ + libxml2-devel \ + libxslt-devel \ + make \ + mod_perl \ + mod_ssl \ + ntp \ + perl-DBD-Pg \ + perl-DBI \ + perl-XML-LibXML \ + perl-XML-Simple \ + perl-libwww-perl \ + psmisc \ + python-devel \ + readline-devel \ + wget + +PGSQL_CENTOS = \ + postgresql \ + postgresql-contrib \ + postgresql-devel \ + postgresql-pl \ + postgresql-server + +# Some of these packages have stupid bugs in their test suites +# that are simply too painful to workaround +CENTOS_PERL_NOTEST = \ + Business::OnlinePayment::AuthorizeNet \ + DateTime::Format::Strptime \ + RPC::XML + +# This is a developer's version, but B:OP:AuthorizeNet depends on it +CENTOS_PERL_VERSION = \ + IVAN/Business-OnlinePayment-3.00_08.tar.gz + +CENTOS_PERL_LOCAL = \ + XML-LibXSLT + +CENTOS_PERL = \ + Business::CreditCard \ + Cache::Memcached \ + Class::DBI::AbstractSearch \ + Class::DBI::Pg \ + Class::DBI::SQLite \ + DateTime \ + DateTime::TimeZone \ + DateTime::Format::Builder \ + Error \ + File::Find::Rule \ + FreezeThaw \ + GD::Graph3d \ + Log::Log4perl \ + MARC::Record \ + Net::Jabber \ + Net::Z3950::ZOOM \ + Spreadsheet::WriteExcel \ + Template \ + Test::Pod \ + Text::Aspell \ + Text::CSV \ + Tie::IxHash \ + Unix::Syslog \ + UNIVERSAL::require \ + XML::LibXSLT PGSQL_DEBIAN = \ postgresql-8.1\ @@ -185,8 +287,8 @@ CPAN_MODULES = \ DateTime::Format::ISO8601 \ TMTM/Class-DBI-0.96.tar.gz \ RHANDOM/Net-Server-0.90.tar.gz \ - MARC::Charset MARC::File::XML\ - JSON::XS\ + MARC::Charset MARC::File::XML \ + JSON::XS \ SRU \ Net::Z3950::ZOOM \ Business::CreditCard::Object \ @@ -202,10 +304,13 @@ all: # these should be the same for any distro install: install_yaz install_cpan install_js_sm install_libdbi +centos: install_centos_pgsql install_centos_rpms install_ejabberd install install_libxml2 install_libxslt install_centos_perl debian: install_pgsql_debian install_debs install debian_sys_config gentoo: install_gentoos install_gentoo_rc install_gentoo_perl install +rhel: centos + ubuntu: install_pgsql_ubuntu install_debs install debian_sys_config @@ -215,7 +320,26 @@ ubuntu: install_pgsql_ubuntu install_debs install debian_sys_config install_cpan: for m in $(CPAN_MODULES); do perl -MCPAN -e "install \"$$m\";"; done - +# Install ejabberd from official project installer binary +install_ejabberd: + if [ ! -f $(EJABBERD_PKG).gz ]; then wget $(EJABBERD_HOST)/$(EJABBERD_VER)/$(EJABBERD_PKG).gz; fi; + gunzip $(EJABBERD_PKG).gz + chmod u+x $(EJABBERD_PKG).gz + ./$(EJABBERD_PKG) --mode unattended --prefix /opt/ejabberd --adminpw evergreen + +# Install a newer version of libxslt +install_libxslt: + if [ ! -d $(XSLT) ]; then wget $(XSLT_HOST)/$(XSLT).tar.gz; fi; + tar xzf $(XSLT).tar.gz + cd $(XSLT) && ./configure --with-libxml-prefix=/usr/local && make && make install + +# Install a newer version of libxml2 +install_libxml2: + if [ ! -d $(XML2) ]; then wget $(XML2_HOST)/$(XML2).tar.gz; fi; + tar xzf $(XML2).tar.gz + cd $(XML2) && ./configure && make && make install + +# Install a known working version of YAZ install_yaz: if [ ! -d $(YAZ) ]; then wget $(YAZ_HOST)/$(YAZ).tar.gz; fi; tar xzf $(YAZ).tar.gz @@ -251,6 +375,8 @@ clean: make -C $(LIBDBI) clean make -C $(LIBDBI_DRIVERS) clean make -C $(LIBJS_PERL) clean + make -C $(XML2) clean + make -C $(XSLT) clean make -f Makefile.ref -C js/src/ clean @@ -269,13 +395,13 @@ debian_sys_config: # Install the debian-specific dependencies install_debs: - apt-get install $(DEBS) + $(APT_TOOL) install $(DEBS) install_pgsql_debian: - apt-get install $(PGSQL_DEBIAN) + $(APT_TOOL) install $(PGSQL_DEBIAN) install_pgsql_ubuntu: - apt-get install $(PGSQL_UBUNTU) + $(APT_TOOL) install $(PGSQL_UBUNTU) # ------------------------------------------------------------------ # - GENTOO --------------------------------------------------------- @@ -292,3 +418,16 @@ install_gentoo_perl: # ------------------------------------------------------------------ +# CENTOS +install_centos_rpms: + yum -y install $(CENTOS) + +install_centos_pgsql: + yum -y install $(PGSQL_CENTOS) + +install_centos_perl: + for m in $(CENTOS_PERL); do perl -MCPAN -e "install \"$$m\";"; done + for m in $(CENTOS_PERL_VERSION); do perl -MCPAN -e "CPAN::Shell->install \"$$m\";"; done + for m in $(CENTOS_PERL_NOTEST); do perl -MCPAN -e "CPAN::Shell->notest('install', \"$$m\";"; done + for m in $(CENTOS_PERL_LOCAL); do LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib perl -MCPAN -e "install \"$$m\";"; done + diff --git a/Open-ILS/src/javascript/backend/circ/circ_item_config.js b/Open-ILS/src/javascript/backend/circ/circ_item_config.js index 9cfd9463ee..c54d0cc5e2 100644 --- a/Open-ILS/src/javascript/backend/circ/circ_item_config.js +++ b/Open-ILS/src/javascript/backend/circ/circ_item_config.js @@ -51,7 +51,7 @@ var CIRC_MOD_MAP = { /* this will set defaults even if no one asked for them */ log_debug("Calling getItemConfig() to force defaults.."); -getItemConfig(); +result.item_config = getItemConfig(); function getItemConfig() { diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 97bf16f8ab..f02962c495 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -18,10 +18,12 @@ package OpenILS::Application::Circ::Holds; use base qw/OpenILS::Application/; use strict; use warnings; use OpenILS::Application::AppUtils; +use DateTime; use Data::Dumper; use OpenSRF::EX qw(:try); use OpenILS::Perm; use OpenILS::Event; +use OpenSRF::Utils; use OpenSRF::Utils::Logger qw(:logger); use OpenILS::Utils::CStoreEditor q/:funcs/; use OpenILS::Utils::PermitHold; @@ -34,6 +36,7 @@ my $U = $apputils; + __PACKAGE__->register_method( method => "create_hold", api_name => "open-ils.circ.holds.create", @@ -138,6 +141,13 @@ sub create_hold { } } + # set the configured expire time + my $interval = $U->ou_ancestor_setting_value($recipient->home_ou, OILS_SETTING_HOLD_EXPIRE); + if($interval) { + my $date = DateTime->now->add(seconds => OpenSRF::Utils::interval_to_seconds($interval)); + $hold->expire_time($U->epoch2ISO8601($date->epoch)); + } + $hold->requestor($e->requestor->id); $hold->request_lib($e->requestor->ws_ou); $hold->selection_ou($hold->pickup_lib) unless $hold->selection_ou; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index 5ddd0087ed..367e3cdc25 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -1699,7 +1699,7 @@ sub copies_by_cn_label { ); # ... and test for location and status visibility - return [ map { ($U->is_true($_->location->opac_visible) && $U->is_true($_->status->holdable)) ? ($_->id) : () } @$copies ]; + return [ map { ($U->is_true($_->location->opac_visible) && $U->is_true($_->status->opac_visible)) ? ($_->id) : () } @$copies ]; } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm index a2e1fa5fa2..64fb180726 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm @@ -73,7 +73,7 @@ package config::copy_status; use base qw/config/; __PACKAGE__->table('config_copy_status'); __PACKAGE__->columns(Primary => 'id'); -__PACKAGE__->columns(Essential => qw/name holdable/); +__PACKAGE__->columns(Essential => qw/name holdable opac_visible/); #------------------------------------------------------------------------------- package config::net_access_level; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index 7af61273d9..e77eefc5f9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -63,6 +63,7 @@ sub ou_hold_requests { WHERE ou.id = ? AND h.capture_time IS NULL AND h.cancel_time IS NULL + AND (h.expire_time IS NULL OR h.expire_time > NOW()) ORDER BY h.request_time SQL @@ -218,6 +219,7 @@ sub nearest_hold { AND (AGE(NOW(),h.request_time) >= CAST(? AS INTERVAL) OR p.prox = 0) AND h.capture_time IS NULL AND h.cancel_time IS NULL + AND (h.expire_time IS NULL OR h.expire_time > NOW()) AND h.frozen IS FALSE ORDER BY p.prox, @@ -368,6 +370,7 @@ sub hold_pull_list { WHERE a.circ_lib = ? AND h.capture_time IS NULL AND h.cancel_time IS NULL + AND (h.expire_time IS NULL OR h.expire_time > NOW()) $status_filter ORDER BY h.request_time ASC LIMIT $limit @@ -724,7 +727,7 @@ sub generate_fines { $client->respond( "Error processing overdue circulation [".$c->id."]:\n\n$e\n" ); $log->error("Error processing overdue circulation [".$c->id."]:\n$e\n"); $self->method_lookup('open-ils.storage.transaction.rollback')->run; - throw $e ifif ($e =~ /IS NOT CONNECTED TO THE NETWORK/o); + throw $e if ($e =~ /IS NOT CONNECTED TO THE NETWORK/o); }; } } @@ -821,13 +824,19 @@ sub new_hold_copy_targeter { #first, re-fetch the hold, to make sure it's not captured already $hold->remove_from_object_index(); $hold = action::hold_request->retrieve( $hold->id ); - die "OK\n" if (!$hold or $hold->capture_time); # remove old auto-targeting maps my @oldmaps = action::hold_copy_map->search( hold => $hold->id ); $_->delete for (@oldmaps); - + if ($hold->expire_time) { + my $ex_time = $parser->parse_datetime( clense_ISO8601( $hold->expire_time ) ); + $hold->update( { cancel_time => 'now' } ) if ( DateTime->compare($ex_time, DateTime->now) < 0 ); + $self->method_lookup('open-ils.storage.transaction.commit')->run; + } + + die "OK\n" if (!$hold or $hold->capture_time or $hold->cancel_time); + my $all_copies = []; # find filters for MR holds diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm index cb5a66c56c..11836856b7 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm @@ -30,7 +30,7 @@ sub record_copy_count { $ancestors = "(select org_unit as id from actor.org_lasso_map where lasso = ?) u CROSS JOIN (SELECT -1 AS depth) t"; } - my $visible = 'AND a.opac_visible = TRUE AND st.holdable = TRUE AND loc.opac_visible = TRUE AND cp.opac_visible = TRUE'; + my $visible = 'AND a.opac_visible = TRUE AND st.opac_visible = TRUE AND loc.opac_visible = TRUE AND cp.opac_visible = TRUE'; if ($self->api_name =~ /staff/o) { $visible = '' } @@ -61,7 +61,7 @@ sub record_copy_count { $visible AND cn.deleted IS FALSE AND cp.deleted IS FALSE - AND cp.status IN (0,7)) + AND cp.status IN (0,7,12)) ) AS available, sum( (SELECT count(cp.id) @@ -70,7 +70,7 @@ sub record_copy_count { JOIN $st_table st ON (cp.status = st.id) JOIN $loc_table loc ON (cp.location = loc.id) WHERE cn.record = ? - AND st.holdable = TRUE + AND st.opac_visible = TRUE AND loc.opac_visible = TRUE AND cp.opac_visible = TRUE AND cn.deleted IS FALSE @@ -318,7 +318,7 @@ sub global_record_copy_count { my $cl_table = asset::copy_location->table; my $cs_table = config::copy_status->table; - my $copies_visible = 'AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE'; + my $copies_visible = 'AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE'; $copies_visible = '' if ($self->api_name =~ /staff/o); my $sql = <<" SQL"; @@ -331,7 +331,7 @@ sub global_record_copy_count { JOIN $cs_table cs ON (cs.id = cp.status) JOIN $cl_table cl ON (cl.id = cp.location) WHERE cn.record = ? - AND cp.status IN (0,7) + AND cp.status IN (0,7,12) $copies_visible GROUP BY 1 UNION @@ -400,7 +400,7 @@ sub record_copy_status_count { AND cl.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cp.deleted IS FALSE - AND cs.holdable + AND cs.opac_visible IS TRUE GROUP BY 1,2,3; SQL diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm index 93843349f4..c095160cc3 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm @@ -38,7 +38,7 @@ sub ordered_records_from_metarecord { "actor.org_unit_descendants($org)" ; - my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE'; + my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE'; $copies_visible = '' if ($self->api_name =~ /staff/o); my $sm_table = metabib::metarecord_source_map->table; @@ -279,7 +279,7 @@ sub metarecord_copy_count { $ancestors = "(select org_unit as id from actor.org_lasso_map where lasso = ?) u CROSS JOIN (SELECT -1 AS depth) t"; } - my $copies_visible = 'AND a.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE'; + my $copies_visible = 'AND a.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE'; $copies_visible = '' if ($self->api_name =~ /staff/o); my (@types,@forms,@blvl); @@ -335,7 +335,7 @@ sub metarecord_copy_count { JOIN $cl_table cl ON (cp.location = cl.id) JOIN $descendants a ON (cp.circ_lib = a.id) WHERE r.metarecord = ? - AND cp.status IN (0,7) + AND cp.status IN (0,7,12) AND cn.deleted IS FALSE AND cp.deleted IS FALSE $copies_visible @@ -356,7 +356,7 @@ sub metarecord_copy_count { AND cn.deleted IS FALSE AND cp.deleted IS FALSE AND cp.opac_visible IS TRUE - AND cs.holdable IS TRUE + AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE $t_filter $f_filter @@ -476,7 +476,7 @@ sub biblio_multi_search_full_rec { my $has_vols = 'AND cn.owning_lib = d.id'; my $has_copies = 'AND cp.call_number = cn.id'; - my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE'; + my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE'; if ($self->api_name =~ /staff/o) { $copies_visible = ''; @@ -796,7 +796,7 @@ sub search_class_fts { my $has_vols = 'AND cn.owning_lib = d.id'; my $has_copies = 'AND cp.call_number = cn.id'; - my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE'; + my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE'; my $visible_count = ', count(DISTINCT cp.id)'; my $visible_count_test = 'HAVING count(DISTINCT cp.id) > 0'; @@ -970,7 +970,7 @@ sub search_class_fts_count { my $has_vols = 'AND cn.owning_lib = d.id'; my $has_copies = 'AND cp.call_number = cn.id'; - my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.holdable IS TRUE AND cl.opac_visible IS TRUE'; + my $copies_visible = 'AND d.opac_visible IS TRUE AND cp.opac_visible IS TRUE AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE'; if ($self->api_name =~ /staff/o) { $copies_visible = ''; $has_vols = '' if ($ou_type == 0); @@ -1267,7 +1267,7 @@ sub postfilter_search_class_fts { AND cn.owning_lib = d.id AND cp.call_number = cn.id AND cp.opac_visible IS TRUE - AND cs.holdable IS TRUE + AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE AND d.opac_visible IS TRUE AND br.active IS TRUE @@ -1304,7 +1304,7 @@ sub postfilter_search_class_fts { AND cp.circ_lib = d.id AND cp.call_number = cn.id AND cp.opac_visible IS TRUE - AND cs.holdable IS TRUE + AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE AND d.opac_visible IS TRUE AND br.active IS TRUE @@ -1467,7 +1467,7 @@ sub postfilter_search_multi_class_fts { my ($oa_filter, $ol_filter, $olf_filter) = ('','',''); if ($args{available}) { - $avail_filter = ' AND cp.status IN (0,7)'; + $avail_filter = ' AND cp.status IN (0,7,12)'; } if (my $a = $args{audience}) { @@ -1760,7 +1760,7 @@ sub postfilter_search_multi_class_fts { AND cp.circ_lib = d.id AND cp.call_number = cn.id AND cp.opac_visible IS TRUE - AND cs.holdable IS TRUE + AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE AND d.opac_visible IS TRUE AND br.active IS TRUE @@ -1957,7 +1957,7 @@ sub biblio_search_multi_class_fts { my ($oa_filter, $ol_filter, $olf_filter) = ('','',''); if ($args{available}) { - $avail_filter = ' AND cp.status IN (0,7)'; + $avail_filter = ' AND cp.status IN (0,7,12)'; } if (my $a = $args{audience}) { @@ -2235,7 +2235,7 @@ sub biblio_search_multi_class_fts { AND cp.location = cl.id AND cp.call_number = cn.id AND cp.opac_visible IS TRUE - AND cs.holdable IS TRUE + AND cs.opac_visible IS TRUE AND cl.opac_visible IS TRUE AND d.opac_visible IS TRUE AND cp.deleted IS FALSE @@ -2346,10 +2346,15 @@ sub staged_fts { die "No search arguments were passed to ".$self->api_name; } - my (@statuses,@types,@forms,@lang,@aud,@lit_form,@vformats,@bib_level); + my (@statuses,@locations,@types,@forms,@lang,@aud,@lit_form,@vformats,@bib_level); if ($args{available}) { - @statuses = (0,7); + @statuses = (0,7,12); + } + + if (my $s = $args{locations}) { + $s = [$s] if (!ref($s)); + @locations = @$s; } if (my $s = $args{statuses}) { @@ -2444,6 +2449,7 @@ sub staged_fts { my $param_depth = $args{depth}; $param_depth = 'NULL' unless (defined($param_depth) and length($param_depth) > 0 ); my $param_searches = OpenSRF::Utils::JSON->perl2JSON( \%stored_proc_search_args ); $param_searches =~ s/\$//go; $param_searches = '$$'.$param_searches.'$$'; my $param_statuses = '$${' . join(',', map { s/\$//go; "\"$_\""} @statuses) . '}$$'; + my $param_locations = '$${' . join(',', map { s/\$//go; "\"$_\""} @locations) . '}$$'; my $param_audience = '$${' . join(',', map { s/\$//go; "\"$_\"" } @aud) . '}$$'; my $param_language = '$${' . join(',', map { s/\$//go; "\"$_\""} @lang) . '}$$'; my $param_lit_form = '$${' . join(',', map { s/\$//go; "\"$_\"" } @lit_form) . '}$$'; @@ -2468,6 +2474,7 @@ sub staged_fts { $param_depth, $param_searches, $param_statuses, + $param_locations, $param_audience, $param_language, $param_lit_form, diff --git a/Open-ILS/src/perlmods/OpenILS/Reporter/SQLBuilder.pm b/Open-ILS/src/perlmods/OpenILS/Reporter/SQLBuilder.pm index f5307ef425..4fad08faa5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Reporter/SQLBuilder.pm +++ b/Open-ILS/src/perlmods/OpenILS/Reporter/SQLBuilder.pm @@ -927,11 +927,11 @@ sub toSQL { return $self->{_sql} if ($self->{_sql}); - my $sql; + my $sql = ''; my $rel = $self->find_relation(); if ($rel && $rel->is_nullable) { - $sql = "(". $self->SUPER::toSQL ." IS NULL OR "; + $sql = "((". $self->SUPER::toSQL .") IS NULL OR "; } $sql .= $self->SUPER::toSQL; @@ -941,12 +941,22 @@ sub toSQL { if (lc($op) eq 'in') { $sql .= " IN (". join(",", map { $_->toSQL } @$val).")"; + } elsif (lc($op) eq 'not in') { $sql .= " NOT IN (". join(",", map { $_->toSQL } @$val).")"; + + } elsif (lc($op) eq 'is blank') { + $sql = '('. $self->SUPER::toSQL ." IS NULL OR ". $self->SUPER::toSQL ." = '')"; + + } elsif (lc($op) eq 'is not blank') { + $sql = '('. $self->SUPER::toSQL ." IS NOT NULL AND ". $self->SUPER::toSQL ." <> '')"; + } elsif (lc($op) eq 'between') { $sql .= " BETWEEN ". join(" AND ", map { $_->toSQL } @$val); + } elsif (lc($op) eq 'not between') { $sql .= " NOT BETWEEN ". join(" AND ", map { $_->toSQL } @$val); + } elsif (lc($op) eq 'like') { $val = $$val[0] if (ref($val) eq 'ARRAY'); $val = $val->toSQL; @@ -954,6 +964,7 @@ sub toSQL { $val =~ s/%/\\\\%/o; $val =~ s/_/\\\\_/o; $sql .= " LIKE '\%$val\%'"; + } elsif (lc($op) eq 'ilike') { $val = $$val[0] if (ref($val) eq 'ARRAY'); $val = $val->toSQL; @@ -961,6 +972,7 @@ sub toSQL { $val =~ s/%/\\\\%/o; $val =~ s/_/\\\\_/o; $sql .= " ILIKE '\%$val\%'"; + } else { $val = $$val[0] if (ref($val) eq 'ARRAY'); $sql .= " $op " . $val->toSQL; diff --git a/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm b/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm index a0777860ea..3e3f7b9793 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP/Item.pm @@ -112,7 +112,7 @@ sub run_attr_script { sub magnetic { my $self = shift; return 0 unless $self->run_attr_script; - my $mag = $self->{item_config_result}->{magneticMedia}; + my $mag = $self->{item_config_result}->{item_config}->{magneticMedia}; syslog('LOG_DEBUG', "OILS: magnetic = $mag"); return ($mag and $mag eq 't') ? 1 : 0; } @@ -120,7 +120,7 @@ sub magnetic { sub sip_media_type { my $self = shift; return 0 unless $self->run_attr_script; - my $media = $self->{item_config_result}->{SIPMediaType}; + my $media = $self->{item_config_result}->{item_config}->{SIPMediaType}; syslog('LOG_DEBUG', "OILS: media type = $media"); return ($media) ? $media : '001'; } diff --git a/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm index a780b7e69c..ab47d70eac 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm @@ -415,9 +415,17 @@ sub overdue_items { my @o; syslog('LOG_DEBUG', "OILS: overdue_items() fleshing circs @overdues"); + + + my @return_datatype = grep { $_->{name} eq 'msg64_summary_datatype' } @{$self->{config}->{implementation_config}->{options}->{option}}; + for my $circid (@overdues) { next unless $circid; - push( @o, __circ_to_title($self->{editor}, $circid) ); + if(@return_datatype and $return_datatype[0]->{value} eq 'barcode') { + push( @o, __circ_to_barcode($self->{editor}, $circid)); + } else { + push( @o, __circ_to_title($self->{editor}, $circid)); + } } @overdues = @o; @@ -425,6 +433,14 @@ sub overdue_items { [ $overdues[($start-1)..($end-1)] ] : \@overdues; } +sub __circ_to_barcode { + my ($e, $circ) = @_; + return unless $circ; + $circ = $e->retrieve_action_circulation($circ); + my $copy = $e->retrieve_asset_copy($circ->target_copy); + return $copy->barcode; +} + sub __circ_to_title { my( $e, $circ ) = @_; return unless $circ; @@ -447,10 +463,18 @@ sub charged_items { my @c; syslog('LOG_DEBUG', "OILS: charged_items() fleshing circs @charges"); + + my @return_datatype = grep { $_->{name} eq 'msg64_summary_datatype' } @{$self->{config}->{implementation_config}->{options}->{option}}; + for my $circid (@charges) { next unless $circid; - push( @c, __circ_to_title($self->{editor}, $circid) ); + if(@return_datatype and $return_datatype[0]->{value} eq 'barcode') { + push( @c, __circ_to_barcode($self->{editor}, $circid)); + } else { + push( @c, __circ_to_title($self->{editor}, $circid)); + } } + @charges = @c; return (defined $start and defined $end) ? diff --git a/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql b/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql index c15bcf1265..a7f47771cc 100644 --- a/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql +++ b/Open-ILS/src/sql/Pg/000.english.pg80.fts-config.sql @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ BEGIN; diff --git a/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql b/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql index c15bcf1265..d42ff973fc 100644 --- a/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql +++ b/Open-ILS/src/sql/Pg/000.english.pg81.fts-config.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + BEGIN; diff --git a/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql b/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql index c15bcf1265..d42ff973fc 100644 --- a/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql +++ b/Open-ILS/src/sql/Pg/000.english.pg82.fts-config.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + BEGIN; diff --git a/Open-ILS/src/sql/Pg/001.schema.offline.sql b/Open-ILS/src/sql/Pg/001.schema.offline.sql index 8bd18089ff..51f2e40613 100644 --- a/Open-ILS/src/sql/Pg/001.schema.offline.sql +++ b/Open-ILS/src/sql/Pg/001.schema.offline.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA offline CASCADE; diff --git a/Open-ILS/src/sql/Pg/002.functions.config.sql b/Open-ILS/src/sql/Pg/002.functions.config.sql index a4d186f392..b70da55e3f 100644 --- a/Open-ILS/src/sql/Pg/002.functions.config.sql +++ b/Open-ILS/src/sql/Pg/002.functions.config.sql @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + + BEGIN; /* diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 48d6340058..6a652977ed 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + + DROP SCHEMA stats CASCADE; DROP SCHEMA config CASCADE; @@ -337,7 +355,8 @@ $$; CREATE TABLE config.copy_status ( id SERIAL PRIMARY KEY, name TEXT NOT NULL UNIQUE, - holdable BOOL NOT NULL DEFAULT FALSE + holdable BOOL NOT NULL DEFAULT FALSE, + opac_visible BOOL NOT NULL DEFAULT FALSE ); COMMENT ON TABLE config.copy_status IS $$ /* diff --git a/Open-ILS/src/sql/Pg/006.schema.permissions.sql b/Open-ILS/src/sql/Pg/006.schema.permissions.sql index 0dbc45e58f..bc41328f26 100644 --- a/Open-ILS/src/sql/Pg/006.schema.permissions.sql +++ b/Open-ILS/src/sql/Pg/006.schema.permissions.sql @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + + DROP SCHEMA permission CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/010.schema.biblio.sql b/Open-ILS/src/sql/Pg/010.schema.biblio.sql index b727339303..4a9794e8ad 100644 --- a/Open-ILS/src/sql/Pg/010.schema.biblio.sql +++ b/Open-ILS/src/sql/Pg/010.schema.biblio.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA biblio CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/011.schema.authority.sql b/Open-ILS/src/sql/Pg/011.schema.authority.sql index 2b2013d2e5..6ffc574904 100644 --- a/Open-ILS/src/sql/Pg/011.schema.authority.sql +++ b/Open-ILS/src/sql/Pg/011.schema.authority.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA authority CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/020.schema.functions.sql b/Open-ILS/src/sql/Pg/020.schema.functions.sql index 0ba1add6e4..7796c01577 100644 --- a/Open-ILS/src/sql/Pg/020.schema.functions.sql +++ b/Open-ILS/src/sql/Pg/020.schema.functions.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + CREATE OR REPLACE FUNCTION public.non_filing_normalize ( TEXT, "char" ) RETURNS TEXT AS $$ SELECT SUBSTRING( REGEXP_REPLACE( diff --git a/Open-ILS/src/sql/Pg/030.schema.metabib.sql b/Open-ILS/src/sql/Pg/030.schema.metabib.sql index f51109dfed..27f2586618 100644 --- a/Open-ILS/src/sql/Pg/030.schema.metabib.sql +++ b/Open-ILS/src/sql/Pg/030.schema.metabib.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA metabib CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql index 1a17d9e559..0146072812 100644 --- a/Open-ILS/src/sql/Pg/040.schema.asset.sql +++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA asset CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/070.schema.container.sql b/Open-ILS/src/sql/Pg/070.schema.container.sql index d8acdd99af..983c44769b 100644 --- a/Open-ILS/src/sql/Pg/070.schema.container.sql +++ b/Open-ILS/src/sql/Pg/070.schema.container.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA container CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/080.schema.money.sql b/Open-ILS/src/sql/Pg/080.schema.money.sql index 24d6b581d4..b0da2dac4b 100644 --- a/Open-ILS/src/sql/Pg/080.schema.money.sql +++ b/Open-ILS/src/sql/Pg/080.schema.money.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA money CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index 76e7c49a63..fa75c908b2 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA action CASCADE; BEGIN; @@ -109,6 +126,76 @@ CREATE INDEX circ_checkin_time ON "action".circulation (checkin_time) WHERE chec CREATE INDEX circ_circ_lib_idx ON "action".circulation (circ_lib); CREATE INDEX circ_open_date_idx ON "action".circulation (xact_start) WHERE xact_finish IS NULL; +CREATE TABLE action.aged_circulation ( + usr_post_code TEXT, + usr_home_ou INT NOT NULL, + usr_profile INT NOT NULL, + usr_birth_year INT, + copy_call_number INT NOT NULL, + copy_location INT NOT NULL, + copy_owning_lib INT NOT NULL, + copy_circ_lib INT NOT NULL, + copy_bib_record BIGINT NOT NULL, + LIKE action.circulation + +); +ALTER TABLE action.aged_circulation ADD PRIMARY KEY (id); +ALTER TABLE action.aged_circulation DROP COLUMN usr; +CREATE INDEX aged_circ_circ_lib_idx ON "action".aged_circulation (circ_lib); +CREATE INDEX aged_circ_start_idx ON "action".aged_circulation (xact_start); +CREATE INDEX aged_circ_copy_circ_lib_idx ON "action".aged_circulation (copy_circ_lib); +CREATE INDEX aged_circ_copy_owning_lib_idx ON "action".aged_circulation (copy_owning_lib); +CREATE INDEX aged_circ_copy_location_idx ON "action".aged_circulation (copy_location); + +CREATE OR REPLACE VIEW action.all_circulation AS + SELECT id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location, + copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy, + circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date, + stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine, + max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule, + max_fine_rule, stop_fines + FROM action.aged_circulation + UNION ALL + SELECT circ.id,COALESCE(a.post_code,b.post_code) AS usr_post_code, p.home_ou AS usr_home_ou, p.profile AS usr_profile, EXTRACT(YEAR FROM p.dob)::INT AS usr_birth_year, + cp.call_number AS copy_call_number, cp.location AS copy_location, cn.owning_lib AS copy_owning_lib, cp.circ_lib AS copy_circ_lib, + cn.record AS copy_bib_record, circ.xact_start, circ.xact_finish, circ.target_copy, circ.circ_lib, circ.circ_staff, circ.checkin_staff, + circ.checkin_lib, circ.renewal_remaining, circ.due_date, circ.stop_fines_time, circ.checkin_time, circ.create_time, circ.duration, + circ.fine_interval, circ.recuring_fine, circ.max_fine, circ.phone_renewal, circ.desk_renewal, circ.opac_renewal, circ.duration_rule, + circ.recuring_fine_rule, circ.max_fine_rule, circ.stop_fines + FROM action.circulation circ + JOIN asset.copy cp ON (circ.target_copy = cp.id) + JOIN asset.call_number cn ON (cp.call_number = cn.id) + JOIN actor.usr p ON (circ.usr = p.id) + LEFT JOIN actor.usr_address a ON (p.mailing_address = a.id) + LEFT JOIN actor.usr_address b ON (p.billing_address = a.id); + +CREATE OR REPLACE FUNCTION action.age_circ_on_delete () RETURNS TRIGGER AS $$ +BEGIN + INSERT INTO action.aged_circulation + (id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location, + copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy, + circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date, + stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine, + max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule, + max_fine_rule, stop_fines) + SELECT + id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location, + copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy, + circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date, + stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine, + max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule, + max_fine_rule, stop_fines + FROM action.all_circulation WHERE id = OLD.id; + + RETURN OLD; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE TRIGGER action_circulation_aging_tgr + BEFORE DELETE ON action.circulation + FOR EACH ROW + EXECUTE PROCEDURE action.age_circ_on_delete (); + CREATE OR REPLACE VIEW action.open_circulation AS SELECT * diff --git a/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql new file mode 100644 index 0000000000..cb6adb3e4f --- /dev/null +++ b/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +BEGIN; + +CREATE SCHEMA extend_reporter; + +CREATE TABLE extend_reporter.legcay_circ_count ( + id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id) + circ_count INT NOT NULL DEFAULT 0 +); + +CREATE VIEW extend_reporter.full_circ_count AS + SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count + FROM asset."copy" cp + LEFT JOIN extend_reporter.legcay_circ_count c USING (id) + LEFT JOIN "action".circulation circ ON circ.target_copy = c.id + GROUP BY cp.id; + +COMMIT; + diff --git a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql index 50f3a05842..8c91ba61b2 100644 --- a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql +++ b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA search CASCADE; @@ -33,6 +49,7 @@ CREATE OR REPLACE FUNCTION search.staged_fts ( param_depth INT, param_searches TEXT, -- JSON hash, to be turned into a resultset via search.parse_search_args param_statuses INT[], + param_locations INT[], param_audience TEXT[], param_language TEXT[], param_lit_form TEXT[], @@ -413,6 +430,26 @@ BEGIN END IF; + IF param_locations IS NOT NULL AND array_upper(param_locations, 1) > 0 THEN + + PERFORM 1 + FROM asset.call_number cn + JOIN asset.copy cp ON (cp.call_number = cn.id) + WHERE NOT cn.deleted + AND NOT cp.deleted + AND cp.location IN ( SELECT * FROM search.explode_array( param_locations ) ) + AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) ) + AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) ) + LIMIT 1; + + IF NOT FOUND THEN + -- RAISE NOTICE ' % were all copy_location-excluded ... ', core_result.records; + excluded_count := excluded_count + 1; + CONTINUE; + END IF; + + END IF; + IF staff IS NULL OR NOT staff THEN PERFORM 1 @@ -423,7 +460,7 @@ BEGIN JOIN config.copy_status cs ON (cp.status = cs.id) WHERE NOT cn.deleted AND NOT cp.deleted - AND cs.holdable + AND cs.opac_visible AND cl.opac_visible AND cp.opac_visible AND a.opac_visible @@ -444,7 +481,6 @@ BEGIN JOIN asset.copy cp ON (cp.call_number = cn.id) JOIN actor.org_unit a ON (cp.circ_lib = a.id) JOIN asset.copy_location cl ON (cp.location = cl.id) - JOIN config.copy_status cs ON (cp.status = cs.id) WHERE NOT cn.deleted AND NOT cp.deleted AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) ) diff --git a/Open-ILS/src/sql/Pg/500.view.cross-schema.sql b/Open-ILS/src/sql/Pg/500.view.cross-schema.sql index 23c2b2c17f..cfbcf48f18 100644 --- a/Open-ILS/src/sql/Pg/500.view.cross-schema.sql +++ b/Open-ILS/src/sql/Pg/500.view.cross-schema.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + BEGIN; CREATE OR REPLACE VIEW money.open_billable_xact_summary AS diff --git a/Open-ILS/src/sql/Pg/800.fkeys.sql b/Open-ILS/src/sql/Pg/800.fkeys.sql index e0309841df..2679d69b69 100644 --- a/Open-ILS/src/sql/Pg/800.fkeys.sql +++ b/Open-ILS/src/sql/Pg/800.fkeys.sql @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Copyright (C) 2008 Laurentian University + * Mike Rylander + * Dan Scott + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + BEGIN; ALTER TABLE actor.usr ADD CONSTRAINT actor_usr_mailing_address_fkey FOREIGN KEY (mailing_address) REFERENCES actor.usr_address (id) DEFERRABLE INITIALLY DEFERRED; diff --git a/Open-ILS/src/sql/Pg/900.audit-functions.sql b/Open-ILS/src/sql/Pg/900.audit-functions.sql index 802516fe90..df4acd7c03 100644 --- a/Open-ILS/src/sql/Pg/900.audit-functions.sql +++ b/Open-ILS/src/sql/Pg/900.audit-functions.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA auditor CASCADE; BEGIN; diff --git a/Open-ILS/src/sql/Pg/901.audit-tables.sql b/Open-ILS/src/sql/Pg/901.audit-tables.sql index d0cef3fd90..987a18ee41 100644 --- a/Open-ILS/src/sql/Pg/901.audit-tables.sql +++ b/Open-ILS/src/sql/Pg/901.audit-tables.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + BEGIN; SELECT auditor.create_auditor ( 'actor', 'usr' ); diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index b1f1b31289..64ecf63a0a 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -97,23 +97,23 @@ INSERT INTO config.rule_recuring_fine VALUES INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, oils_i18n_gettext('3month'), '3 months', 0); INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, oils_i18n_gettext('6month'), '6 months', 2); -INSERT INTO config.copy_status (id,name,holdable) VALUES (0,oils_i18n_gettext('Available'),'t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (0,oils_i18n_gettext('Available'),'t','t'); -INSERT INTO config.copy_status (id,name,holdable) VALUES (1,oils_i18n_gettext('Checked out'),'t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (1,oils_i18n_gettext('Checked out'),'t','t'); INSERT INTO config.copy_status (id,name) VALUES (2,oils_i18n_gettext('Bindery')); INSERT INTO config.copy_status (id,name) VALUES (3,oils_i18n_gettext('Lost')); INSERT INTO config.copy_status (id,name) VALUES (4,oils_i18n_gettext('Missing')); -INSERT INTO config.copy_status (id,name,holdable) VALUES (5,oils_i18n_gettext('In process'),'t'); -INSERT INTO config.copy_status (id,name,holdable) VALUES (6,oils_i18n_gettext('In transit'),'t'); -INSERT INTO config.copy_status (id,name,holdable) VALUES (7,oils_i18n_gettext('Reshelving'),'t'); -INSERT INTO config.copy_status (id,name,holdable) VALUES (8,oils_i18n_gettext('On holds shelf'),'t'); -INSERT INTO config.copy_status (id,name,holdable) VALUES (9,oils_i18n_gettext('On order'),'t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (5,oils_i18n_gettext('In process'),'t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (6,oils_i18n_gettext('In transit'),'t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (7,oils_i18n_gettext('Reshelving'),'t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (8,oils_i18n_gettext('On holds shelf'),'t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (9,oils_i18n_gettext('On order'),'t','t'); INSERT INTO config.copy_status (id,name) VALUES (10,oils_i18n_gettext('ILL')); INSERT INTO config.copy_status (id,name) VALUES (11,oils_i18n_gettext('Cataloging')); -INSERT INTO config.copy_status (id,name) VALUES (12,oils_i18n_gettext('Reserves')); +INSERT INTO config.copy_status (id,name,opac_visible) VALUES (12,oils_i18n_gettext('Reserves'),'t'); INSERT INTO config.copy_status (id,name) VALUES (13,oils_i18n_gettext('Discard/Weed')); INSERT INTO config.copy_status (id,name) VALUES (14,oils_i18n_gettext('Damaged')); diff --git a/Open-ILS/src/sql/Pg/build-db.sh b/Open-ILS/src/sql/Pg/build-db.sh index cf738be1d2..1f6ede8355 100755 --- a/Open-ILS/src/sql/Pg/build-db.sh +++ b/Open-ILS/src/sql/Pg/build-db.sh @@ -35,3 +35,4 @@ PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f 952.data.MODS3 PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f 953.data.MODS32-xsl.sql PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f reporter-schema.sql +PGPASSWORD=$5 PGUSER=$4 PGHOST=$1 PGPORT=$2 PGDATABASE=$3 psql -f extend-reporter.sql diff --git a/Open-ILS/src/sql/Pg/example.reporter-extension.sql b/Open-ILS/src/sql/Pg/example.reporter-extension.sql index 00c79e4e6f..2bffcef310 100644 --- a/Open-ILS/src/sql/Pg/example.reporter-extension.sql +++ b/Open-ILS/src/sql/Pg/example.reporter-extension.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + BEGIN; CREATE OR REPLACE VIEW reporter.classic_current_circ AS diff --git a/Open-ILS/src/sql/Pg/extend-reporter.sql b/Open-ILS/src/sql/Pg/extend-reporter.sql new file mode 100644 index 0000000000..0197cf4273 --- /dev/null +++ b/Open-ILS/src/sql/Pg/extend-reporter.sql @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +DROP SCHEMA extend_reporter CASCADE; + +BEGIN; + +CREATE SCHEMA extend_reporter; + +CREATE TABLE extend_reporter.legacy_circ_count ( + id BIGSERIAL PRIMARY KEY REFERENCES asset.copy (id), + circ_count INT NOT NULL DEFAULT 0 +); + +CREATE VIEW extend_reporter.full_circ_count AS + SELECT cp.id, COALESCE(sum(c.circ_count), 0::bigint) + COALESCE(count(circ.id), 0::bigint) AS circ_count + FROM asset."copy" cp + LEFT JOIN extend_reporter.legacy_circ_count c USING (id) + LEFT JOIN "action".all_circulation circ ON circ.target_copy = c.id + GROUP BY cp.id; + +COMMIT; + diff --git a/Open-ILS/src/sql/Pg/reporter-schema.sql b/Open-ILS/src/sql/Pg/reporter-schema.sql index 3fc2e22f14..f2101ef96e 100644 --- a/Open-ILS/src/sql/Pg/reporter-schema.sql +++ b/Open-ILS/src/sql/Pg/reporter-schema.sql @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2004-2008 Georgia Public Library Service + * Copyright (C) 2007-2008 Equinox Software, Inc. + * Mike Rylander + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + DROP SCHEMA reporter CASCADE; BEGIN; diff --git a/Open-ILS/web/conify/global/config/copy_status.html b/Open-ILS/web/conify/global/config/copy_status.html index 21d88cb3f3..8b6f062888 100644 --- a/Open-ILS/web/conify/global/config/copy_status.html +++ b/Open-ILS/web/conify/global/config/copy_status.html @@ -88,6 +88,9 @@ if (attr == 'holdable' && typeof n != 'string') this.setValue(item, 'holdable', n ? 't' : 'f'); + if (attr == 'opac_visible' && typeof n != 'string') + this.setValue(item, 'opac_visible', n ? 't' : 'f'); + }; dojo.addOnUnload( function (event) { @@ -203,14 +206,26 @@ { name : "Holdable", field : "holdable", editor : dojox.grid.editors.bool, - get : function (row) { - var r = window.status_data_model.getRow(row); + get : function (row) { + var r = window.status_data_model.getRow(row); if (r) { - var h = r.holdable; - if (h == 't' || h === true) return true; - return false; + var h = r.holdable; + if (h == 't' || h === true) return true; + return false; } - } + } + }, + { name : "OPAC Visible", + field : "opac_visible", + editor : dojox.grid.editors.bool, + get : function (row) { + var r = window.status_data_model.getRow(row); + if (r) { + var h = r.opac_visible; + if (h == 't' || h === true) return true; + return false; + } + } } ] ] diff --git a/Open-ILS/web/opac/common/js/config.js b/Open-ILS/web/opac/common/js/config.js index accdcd664b..11016a9c3b 100644 --- a/Open-ILS/web/opac/common/js/config.js +++ b/Open-ILS/web/opac/common/js/config.js @@ -38,6 +38,7 @@ var PARAM_TFORM = 'tf'; /* temporary format for title result pages */ var PARAM_RDEPTH = 'rd'; var PARAM_REDIR = 're'; /* true if we have been redirected by IP (we're at a real lib) */ var PARAM_AVAIL = 'av'; /* limit search results to available items */ +var PARAM_COPYLOCS = 'cl'; // copy (shelving) locations /* URL param values (see comments above) */ var TERM; @@ -73,6 +74,7 @@ var LANGUAGE; var TFORM; var RDEPTH; var AVAIL; +var COPYLOCS; /* cookie values */ var SBEXTRAS; diff --git a/Open-ILS/web/opac/common/js/opac_utils.js b/Open-ILS/web/opac/common/js/opac_utils.js index c730e50da0..590c99db4c 100644 --- a/Open-ILS/web/opac/common/js/opac_utils.js +++ b/Open-ILS/web/opac/common/js/opac_utils.js @@ -166,6 +166,8 @@ function initParams() { TFORM = cgi.param(PARAM_TFORM); RDEPTH = cgi.param(PARAM_RDEPTH); AVAIL = cgi.param(PARAM_AVAIL); + COPYLOCS = cgi.param(PARAM_COPYLOCS); + /* set up some sane defaults */ //if(isNaN(DEPTH)) DEPTH = 0; @@ -205,6 +207,7 @@ function clearSearchParams() { LANGUAGE = null; RDEPTH = null; AVAIL = null; + COPYLOCS = null; } @@ -254,6 +257,7 @@ function getSearches() { return SEARCHES; } function getLanguage() { return LANGUAGE; } function getRdepth() { return RDEPTH; } function getAvail() { return AVAIL; } +function getCopyLocs() { return COPYLOCS; } function findBasePath() { @@ -406,6 +410,8 @@ function buildOPACLink(args, slim, ssl) { string += _appendParam(SORT_DIR, PARAM_SORT_DIR, args, getSortDir, string); if(getAvail()) string += _appendParam(AVAIL, PARAM_AVAIL, args, getAvail, string); + if(getCopyLocs()) + string += _appendParam(COPYLOCS, PARAM_COPYLOCS, args, getCopyLocs, string); return string.replace(/\&$/,'').replace(/\?\&/,"?"); } diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 36dded85fc..0ce32ac475 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -632,6 +632,8 @@ + + @@ -759,6 +761,8 @@ + + @@ -1915,3 +1919,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd index 3100a85d4b..8be327b693 100644 --- a/Open-ILS/web/opac/locale/en-US/opac.dtd +++ b/Open-ILS/web/opac/locale/en-US/opac.dtd @@ -319,6 +319,7 @@ Please see a librarian to renew your account."> + + + @@ -180,6 +182,14 @@ + + + &opac.advanced.copy_loc_filter; + + + + diff --git a/Open-ILS/web/reports/oils_rpt_builder.js b/Open-ILS/web/reports/oils_rpt_builder.js index 380d1127e0..285807a946 100644 --- a/Open-ILS/web/reports/oils_rpt_builder.js +++ b/Open-ILS/web/reports/oils_rpt_builder.js @@ -518,7 +518,7 @@ function oilsAddRptFilterItem(path, tform, filter) { //_debug('NEXT PARAM = ' + oilsRptID2); //_debug('NEXT PARAM = ' + oilsRptNextParam()); - if( filter == 'is' || filter == 'is not' ) + if( filter == 'is' || filter == 'is not' || filter == 'is blank' || filter == 'is not blank' ) where.condition[filter] = null; else where.condition[filter] = oilsRptNextParam(); @@ -557,7 +557,7 @@ function oilsAddRptHavingItem(path, tform, filter) { column: { transform: tform, colname: oilsRptPathCol(path) }, condition : {} }; - if( filter == 'is' || filter == 'is not' ) + if( filter == 'is' || filter == 'is not' || filter == 'is blank' || filter == 'is not blank' ) having.condition[filter] = null; else having.condition[filter] = oilsRptNextParam(); diff --git a/Open-ILS/web/reports/oils_rpt_param_editor.js b/Open-ILS/web/reports/oils_rpt_param_editor.js index 8455217ab7..d99c7b0775 100644 --- a/Open-ILS/web/reports/oils_rpt_param_editor.js +++ b/Open-ILS/web/reports/oils_rpt_param_editor.js @@ -194,6 +194,8 @@ oilsRptParamEditor.prototype.buildWidget = function(param, node) { return new oilsRptSetWidget(widgetArgs); case 'is': case 'is not': + case 'is blank': + case 'is not blank': return new oilsRptNullWidget(widgetArgs); case 'between': case 'not between': diff --git a/Open-ILS/web/reports/xul/operators.js b/Open-ILS/web/reports/xul/operators.js index 81982fd569..8c643e4620 100644 --- a/Open-ILS/web/reports/xul/operators.js +++ b/Open-ILS/web/reports/xul/operators.js @@ -55,6 +55,14 @@ var OILS_RPT_FILTERS = { 'is not' : { label : 'Is not NULL' + }, + + 'is blank' : { + label : 'Is NULL or Blank' + }, + + 'is not blank' : { + label : 'Is not NULL or Blank' } } diff --git a/Open-ILS/web/reports/xul/template-config.js b/Open-ILS/web/reports/xul/template-config.js index b112595536..24681e8d49 100644 --- a/Open-ILS/web/reports/xul/template-config.js +++ b/Open-ILS/web/reports/xul/template-config.js @@ -920,7 +920,7 @@ function fleshTemplateField ( template, rel, tab_name, field ) { if (tab_name.match(/filter/)) { element.condition = {}; - if (tab[field].op == 'is' || tab[field].op == 'is not') { + if (tab[field].op == 'is' || tab[field].op == 'is not' || tab[field].op == 'is blank' || tab[field].op == 'is not blank') { element.condition[tab[field].op] = null; } else { element.condition[tab[field].op] = diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index 1d539fa5b1..caf3c80f24 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -1,5 +1,10 @@ var docid; var marc_html; var top_pane; var bottom_pane; var opac_frame; var opac_url; +var marc_view_reset = true; +var marc_edit_reset = true; +var copy_browser_reset = true; +var hold_browser_reset = true; + function $(id) { return document.getElementById(id); } function my_init() { @@ -34,7 +39,7 @@ function my_init() { } } -function set_brief_view(reset) { +function set_brief_view() { var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid); dump('spawning ' + url + '\n'); top_pane.set_iframe( @@ -52,16 +57,17 @@ function set_brief_view(reset) { ); } -function set_marc_view(reset) { +function set_marc_view() { g.view = 'marc_view'; - if (reset) { + if (marc_view_reset) { bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG); + marc_view_reset = false; } else { bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG); } } -function set_marc_edit(reset) { +function set_marc_edit() { g.view = 'marc_edit'; var a = xulG.url_prefix( urls.XUL_MARC_EDIT ); var b = {}; @@ -83,32 +89,35 @@ function set_marc_edit(reset) { } } }; - if (reset) { + if (marc_edit_reset) { bottom_pane.reset_iframe( a,b,c ); + marc_edit_reset = false; } else { bottom_pane.set_iframe( a,b,c ); } } -function set_copy_browser(reset) { +function set_copy_browser() { g.view = 'copy_browser'; - if (reset) { + if (copy_browser_reset) { bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG); + copy_browser_reset =false; } else { bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG); } } -function set_hold_browser(reset) { +function set_hold_browser() { g.view = 'hold_browser'; - if (reset) { + if (hold_browser_reset) { bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG); + hold_browser_reset = false; } else { bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG); } } -function set_opac(reset) { +function set_opac() { g.view = 'opac'; try { var content_params = { @@ -143,7 +152,7 @@ function set_opac(reset) { try { if (docid == id) return; docid = id; - refresh_display(id,true); + refresh_display(id); } catch(E) { g.error.standard_unexpected_error_alert('rdetail -> recordRetrieved',E); } @@ -243,7 +252,7 @@ function delete_record() { alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_deleted.error', [docid, robj.textcode, robj.desc]) + '\n'); } else { alert(document.getElementById('offlineStrings').getString('cat.opac.record_deleted')); - refresh_display(docid,true); + refresh_display(docid); } } } @@ -262,20 +271,24 @@ function undelete_record() { alert(document.getElementById('offlineStrings').getFormattedString('cat.opac.record_undeleted.error', [docid, robj.textcode, robj.desc]) + '\n'); } else { alert(document.getElementById('offlineStrings').getString('cat.opac.record_undeleted')); - refresh_display(docid,true); + refresh_display(docid); } } } -function refresh_display(id,reset) { +function refresh_display(id) { try { + marc_view_reset = true; + marc_edit_reset = true; + copy_browser_reset = true; + hold_browser_reset = true; while(top_pane.node.lastChild) top_pane.node.removeChild( top_pane.node.lastChild ); var children = bottom_pane.node.childNodes; for (var i = 0; i < children.length; i++) { if (children[i] != browser_frame) bottom_pane.node.removeChild(children[i]); } - set_brief_view(reset); + set_brief_view(); $('nav').setAttribute('hidden','false'); var settings = g.network.simple_request( 'FM_AUS_RETRIEVE', @@ -287,12 +300,12 @@ function refresh_display(id,reset) { g.view_override = null; } switch(view) { - case 'marc_view' : set_marc_view(reset); break; - case 'marc_edit' : set_marc_edit(reset); break; - case 'copy_browser' : set_copy_browser(reset); break; - case 'hold_browser' : set_hold_browser(reset); break; + case 'marc_view' : set_marc_view(); break; + case 'marc_edit' : set_marc_edit(); break; + case 'copy_browser' : set_copy_browser(); break; + case 'hold_browser' : set_hold_browser(); break; case 'opac' : - default: set_opac(reset); break; + default: set_opac(); break; } } catch(E) { g.error.standard_unexpected_error_alert('in refresh_display',E); diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index f147eba7b9..479fb3b0fb 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -59,7 +59,7 @@ - + diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index 39a40a5cbc..79e8412ac8 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -230,6 +230,25 @@ main.menu.prototype = { } } ], + 'cmd_search_bib_id' : [ + ['oncommand'], + function() { + var bib_id = prompt(offlineStrings.getString('menu.cmd_search_bib_id.tab'),'',offlineStrings.getString('menu.cmd_search_bib_id.prompt')); + if (!bib_id) return; + + var opac_url = obj.url_prefix( urls.opac_rdetail ) + '?r=' + bib_id; + var content_params = { + 'session' : ses(), + 'authtime' : ses('authtime'), + 'opac_url' : opac_url, + }; + obj.set_tab( + obj.url_prefix(urls.XUL_OPAC_WRAPPER), + {'tab_name':'#' + bib_id}, + content_params + ); + } + ], 'cmd_copy_status' : [ ['oncommand'], function() { diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul index 9f1c264c79..b1b1f67e88 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul @@ -34,6 +34,7 @@ + @@ -150,6 +151,7 @@ + + ]> + + + + @@ -16,14 +20,17 @@ - - - + + + - + - + @@ -42,11 +49,11 @@ - - - - - - - + diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul index bd7d031d12..f2423956ea 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul @@ -12,14 +12,14 @@ + ]> - @@ -37,11 +37,11 @@ function my_init() { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); } + if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); } JSAN.errorLevel = "die"; // none, warn, or die JSAN.addRepository('/xul/server/'); JSAN.use('util.error'); g.error = new util.error(); - g.error.sdump('D_TRACE','my_init() for record_buckets.xul'); + g.error.sdump('D_TRACE','my_init() for cat/record_buckets_quick.xul'); JSAN.use('util.network'); g.network = new util.network(); JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'}); @@ -57,8 +57,8 @@ $('desc').appendChild( document.createTextNode( (g.record_ids.length == 1 ? - 'Copy this 1 record into which bucket?' : - 'Copy these ' + g.record_ids.length + ' items into which bucket?') + $("catStrings").getString('staff.cat.record_buckets_quick.copy_one_record') : + $("catStrings").getFormattedString('staff.cat.record_buckets_quick.copy_multiple_records', [g.record_ids.length])) ) ); var robj = g.network.simple_request('BUCKET_RETRIEVE_VIA_USER',[ ses(), g.data.list.au[0].id() ]); if (typeof robj.ilsevent != 'undefined') throw(robj); @@ -75,7 +75,7 @@ } catch(E) { try { - g.error.standard_unexpected_error_alert('Trying to init record_buckets_quick.xul',E); + g.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets_quick.initing_record_buckets_quick_xul'), E); } catch(F) { alert(E); } @@ -84,7 +84,9 @@ g.new_bucket = function() { try { - var name = prompt('What would you like to name the bucket?','','Bucket Creation'); + var name = prompt($("catStrings").getString('staff.cat.record_buckets_quick.name_of_bucket'), + '', + $("catStrings").getString('staff.cat.record_buckets_quick.name_of_bucket.title')); if (name) { var bucket = new cbreb(); bucket.btype('staff_client'); @@ -97,7 +99,7 @@ g.add_to_bucket(bucket_id); } } catch(E) { - g.error.standard_unexpected_error_alert('Bucket creation failed.',E); + g.error.standard_unexpected_error_alert($("catStrings").getString('staff.cat.record_buckets_quick.bucket_creation_failure'),E); } } @@ -122,7 +124,7 @@ if (typeof robj == 'object') throw robj; } catch(E) { - g.error.standard_unexpected_error_alert('Addition likely failed for bucket = ' + bucket_id + ' and record id = ' + g.record_ids[i],E); + g.error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.record_buckets_quick.add_to_bucket.addition_failed', [bucket_id, g.record_ids[i]]), E); } } window.close(); @@ -137,21 +139,28 @@ ]]> + + + + - + -