working/Evergreen.git
11 years agoPatron Editor can enter erroneous values for Claims-returned count
Steven Chan [Thu, 23 May 2013 22:22:15 +0000 (15:22 -0700)]
Patron Editor can enter erroneous values for Claims-returned count

In the staff client, Patrons interface, Edit screen, when
mouse-scrolling up and down the Edit form, it is possible to
inadvertently change the value in Claims-returned Count or Claims Never
Checked Out Count field.  It will happen if the mouse hovers over either
data field while using the mouse wheel.

Both data fields use the dijit.form.NumberSpinner widget to provide a
'spin' behaviour.  The fix involves cancelling the mouse scroll event as
it propagates to input fields in table rows that are using the
dijit.form.NumberSpinner widget, because the mouse scroll would be
applied too early by the widget, before the user has intentionally
focussed on one of the input fields.  Now, mouse scrolling has no effect
on the two input fields; it will only have an effect in scrolling the
page up or down.

Signed-off-by: Steven Chan <schan@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoSIP2: Return slightly more hold info
Thomas Berezansky [Thu, 24 May 2012 16:37:33 +0000 (12:37 -0400)]
SIP2: Return slightly more hold info

We don't have a normal hold queue, but if there is a hold we can call that
the hold queue. So return the ID of the hold that was captured.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoServer maintenance message via Apache config
James Fournie [Sat, 23 Feb 2013 01:28:29 +0000 (17:28 -0800)]
Server maintenance message via Apache config

This adds a custom maintenance message which you can issue in your
Apache config by setting the environment variable "MAINTENANCE_MESSAGE"
and restarting/reloading Apache.  This message appears in the TPAC for
both staff and patrons in the form of a red banner across the top of the
screen.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoRevert 56a63f03 and try again
Dan Scott [Thu, 11 Jul 2013 01:03:38 +0000 (21:03 -0400)]
Revert 56a63f03 and try again

I totally screwed up this commit by committing old versions of files
instead of the deltas against current master. Reverting, then will apply
the correct commit.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoServer maintenance message via Apache config
James Fournie [Thu, 11 Jul 2013 00:41:51 +0000 (20:41 -0400)]
Server maintenance message via Apache config

This adds a custom maintenance message which you can issue in your
Apache config by setting the environment variable "MAINTENANCE_MESSAGE"
and restarting/reloading Apache.  This message appears in the TPAC for
both staff and patrons in the form of a red banner across the top of the
screen.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoRestore look of acct summary table
Remington Steed [Wed, 10 Jul 2013 21:22:24 +0000 (17:22 -0400)]
Restore look of acct summary table

This commit makes a small adjustment to Pasi's cleaner layout of the
Account Summary table.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoClean up the account summary table HTML.
Pasi Kallinen [Thu, 31 Jan 2013 10:20:48 +0000 (12:20 +0200)]
Clean up the account summary table HTML.

Instead of faking a table with three separate DIVs,
actually use a single table.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoStamping upgrade script for Desk Renewal Circ Lib
Mike Rylander [Wed, 10 Jul 2013 16:44:33 +0000 (12:44 -0400)]
Stamping upgrade script for Desk Renewal Circ Lib

Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoDesk Renewal at original circ library
Ben Shum [Mon, 11 Feb 2013 17:16:10 +0000 (12:16 -0500)]
Desk Renewal at original circ library

In the same spirit as OPAC Renewal at the original circ library, include a
new setting to allow the same for Desk Renewals.

See 8823e4060bbc825c859327b018c5f8cb29b9ac2a and related.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoAdd missing oils_i18n call #2 to upgrade script
Dan Wells [Wed, 10 Jul 2013 15:39:08 +0000 (11:39 -0400)]
Add missing oils_i18n call #2 to upgrade script

Simple thinko fix for missing translation function call.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
11 years agoAdd missing oils_i18n call to upgrade script
Dan Wells [Wed, 10 Jul 2013 15:39:08 +0000 (11:39 -0400)]
Add missing oils_i18n call to upgrade script

Simple thinko fix for missing translation function call.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
11 years agoLP1156905 lineitem worksheet sorts copies by org
Mark Cooper [Mon, 18 Mar 2013 22:45:14 +0000 (15:45 -0700)]
LP1156905 lineitem worksheet sorts copies by org

Lineitem copies (details) were set to be sorted by branch ('owning_lib')
by default. However this was not happening because the lineitem_details
'owning_lib' referenced a fieldmapper object (not an id or name).
This submission sets the owning_lib to the shortname so that sorting can
occur in the intended way.

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoStamping upgrade for Gwich'in language typo
Dan Wells [Wed, 10 Jul 2013 15:26:07 +0000 (11:26 -0400)]
Stamping upgrade for Gwich'in language typo

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoLP1158206 - include upgrade script to fix Gwich'in typo
Ben Shum [Wed, 10 Jul 2013 00:47:20 +0000 (20:47 -0400)]
LP1158206 - include upgrade script to fix Gwich'in typo

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoFix LP1158206 - The language is Gwich'in.
Pasi Kallinen [Thu, 13 Jun 2013 06:06:26 +0000 (09:06 +0300)]
Fix LP1158206 - The language is Gwich'in.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoStamping upgrade script for empty seed description
Dan Wells [Wed, 10 Jul 2013 14:53:41 +0000 (10:53 -0400)]
Stamping upgrade script for empty seed description

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoLP1158211 - add upgrade script to fill empty description
Remington Steed [Wed, 10 Jul 2013 13:32:07 +0000 (09:32 -0400)]
LP1158211 - add upgrade script to fill empty description

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoDescription for circ.holds.default_shelf_expire_interval
Pasi Kallinen [Tue, 11 Jun 2013 08:01:53 +0000 (11:01 +0300)]
Description for circ.holds.default_shelf_expire_interval

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoSimplified pull list: More name options
Thomas Berezansky [Fri, 17 Aug 2012 17:57:08 +0000 (13:57 -0400)]
Simplified pull list: More name options

Because sometimes you don't want the alias to override the entire name.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoLP1183414: OPAC patron opt-in settings table does not work correctly
Pasi Kallinen [Mon, 27 May 2013 09:02:38 +0000 (12:02 +0300)]
LP1183414: OPAC patron opt-in settings table does not work correctly

Fix the template logic error, trying to use a variable before
it is defined.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoDon't let pref_ou repeat in staff recent searches list
Pasi Kallinen [Fri, 28 Jun 2013 07:22:59 +0000 (10:22 +0300)]
Don't let pref_ou repeat in staff recent searches list

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoModify default logging of SIP2 in oils_ctl.sh.
Jason Stephenson [Fri, 7 Jun 2013 13:25:56 +0000 (09:25 -0400)]
Modify default logging of SIP2 in oils_ctl.sh.

Change the default of OILS_SIP_ERR_LOG from /dev/null to
LOCALSTATEDIR/log/oils_sip.log to mirror what is done with the
Z39.50 log.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoFix LP#1108668 by marking the internet access level column contents as translatable...
Pasi Kallinen [Tue, 11 Jun 2013 09:29:29 +0000 (12:29 +0300)]
Fix LP#1108668 by marking the internet access level column contents as translatable in fm_IDL.xml

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoCorrect Linux staff client build instructions
Dan Scott [Tue, 9 Jul 2013 20:53:29 +0000 (16:53 -0400)]
Correct Linux staff client build instructions

There were a few things going on here; 2.3 introduced linux32-client and
linux64-client targets, so the old linux-client Make target no longer
worked.

Also, Wine isn't generally how many of us would recommend running staff
clients when there's a perfectly good native client likely to better
support printing, etc.

Also, rather than pointing at evergreen-ils.org for downloads, which
won't work in many situations (and which prevents the use of the
auto-update mechanism), use the "updates" target to point at the locally
downloadable clients. Eventually we'll properly document the use of
auto-updates, but for now this is hopefully a step in the right
direction.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoBuild 64-bit Linux client updates when asked
Dan Scott [Tue, 9 Jul 2013 23:43:17 +0000 (19:43 -0400)]
Build 64-bit Linux client updates when asked

A copy/paste error led to a request for linux64-updates-client to
generate 32-bit clients instead of the requested 64-bit clients.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoStamping upgrade script for file-order authority subfields
Dan Wells [Tue, 9 Jul 2013 15:46:31 +0000 (11:46 -0400)]
Stamping upgrade script for file-order authority subfields

And fixing a small typo.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoUpgrade script for file-order authority subfields
Mike Rylander [Tue, 9 Jul 2013 14:09:39 +0000 (10:09 -0400)]
Upgrade script for file-order authority subfields

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoPreserve record order of subfields for authority heading extraction
Mike Rylander [Tue, 25 Jun 2013 14:03:36 +0000 (10:03 -0400)]
Preserve record order of subfields for authority heading extraction

When extracting headings from authority records we currently read the
subfields of a tag in configuration order.  We should, instead, read
them in record order, to preserve the desired sorting properties that
the cataloger has encoded in the record.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Yamil Suarez <yamil@yamil.com>
11 years agoLP#973666: Print Purchase Order does not print PO Name
Michael Peters [Thu, 5 Apr 2012 14:23:32 +0000 (10:23 -0400)]
LP#973666: Print Purchase Order does not print PO Name

Printing a PO from the menu option "Actions-->Print Purchase Order"
generates a document that displays the PO #, but not the PO Name. It
was suggested that it would be helpful if the print document
displayed the PO Name instead of, or in addition to, the PO #. This
commit adds the PO Name in the default template for new installs,
but does not affect upgrades.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoLP1187016 Prevent new copies on activated POs
Bill Erickson [Wed, 5 Jun 2013 21:29:36 +0000 (17:29 -0400)]
LP1187016 Prevent new copies on activated POs

If a PO has already been activated, prevent users from adding new copies
in the Item Count entry under the full lineitem copy grid.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoStamping upgrade script for user barcode regex setting
Ben Shum [Mon, 8 Jul 2013 14:33:12 +0000 (10:33 -0400)]
Stamping upgrade script for user barcode regex setting

Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoAdd registration/edit time barcode restrictions
Thomas Berezansky [Tue, 31 Jan 2012 21:50:21 +0000 (16:50 -0500)]
Add registration/edit time barcode restrictions

In the quest to not let staff put bad data into the system (losing battle,
but hey, gotta keep trying, right?), add a barcode regex specifically for
patron registration.

This intentionally does *not* check the opac "is this a barcode?" value.

Use cases for not checking that value include, but are not limited to:

Special "barcodes" for staff accounts. Specific OUs may have a barcode
regex of ".*" to ensure they can use anything for these accounts.

Different prefixes per library - To prevent libraries from using another
library's prefix, but still detect all of them as barcodes.

Special case "this is a barcode" checks for the opac, like legacy barcodes
that should no longer be assigned to new patrons, or on edits.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agofix clear hold shelf with 25 or more holds
Jason Etheridge [Tue, 26 Jun 2012 15:39:48 +0000 (11:39 -0400)]
fix clear hold shelf with 25 or more holds

When there are 25 or more shelf expired holds to be processed, the API call
returns an array of objects instead of an object, which the staff client wasn't
prepared to accommodate. This fixes that.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoAvoid 0788 duplication from 2.3 failure
Dan Scott [Thu, 27 Jun 2013 13:46:55 +0000 (09:46 -0400)]
Avoid 0788 duplication from 2.3 failure

Recent installs of 2.3, or upgrades during 2.3, will have introduced
0788 already into the upgrade process -- meaning that the 2.3-2.4.0
script will rollback the entire transaction if it hits the duplicated
0788. Instead, move 0788 into its own transaction to increase the
chances that the 2.3-2.4.0 script will work for sites that stay up to
date or that recently installed Evergreen.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoSign off on apostrophe upgrade script
Dan Scott [Thu, 27 Jun 2013 03:01:36 +0000 (23:01 -0400)]
Sign off on apostrophe upgrade script

Also had to quote the \qecho commands to prevent them from being
executed instead of simply set to STDOUT.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Conflicts:
Open-ILS/src/sql/Pg/002.schema.config.sql

11 years agoCreate upgrade script for ingest normalization changes
Mike Rylander [Mon, 24 Jun 2013 19:48:07 +0000 (15:48 -0400)]
Create upgrade script for ingest normalization changes

This provides the upgrade script for the ingest changes outlined
in LP 1187433.  In addition, the version-upgrade script for 2.3 to
2.4.0 has been modified to move the final reingest step until after
this incremental change has been applied.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoRetain index granularity with minimal bloat
Dan Scott [Thu, 13 Jun 2013 05:16:23 +0000 (01:16 -0400)]
Retain index granularity with minimal bloat

The previous approach to reducing index bloat arguably went too far, in
that analytics such as separately catalogued songs for an album were all
simply aggregated together in a single metabib.title_field_entry row,
rather than being added as separated metabib.title_field_entry rows for
each unique value.

To avoid the original problem of exact duplicate rows being inserted, we
now check for an existing matching row before inserting into the index.
A good test record is title "Cello concerto." which results in 1 title
proper row and 4 added entry title rows in metabib.title_field_entry
after this change.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoBring back "split-brain" indexing normalization
Mike Rylander [Wed, 12 Jun 2013 15:17:08 +0000 (11:17 -0400)]
Bring back "split-brain" indexing normalization

Before 2.4-era changes to indexing and search, normalizers were applied
in a way that resulted in different effects on the value and index_vector
columns of metabib.*field_entry tables.  This behavior was lost during
the changes mentioned above, but we need it for several things to work
properly, phrase search and (likely) facets among them.  This commit
brings that behavior back.

See here for the original behavioral documentation:

http://evergreen-ils.org/dokuwiki/doku.php?id=documentation:indexing#field_normalization_settings

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoReduce index bloat involving non-search_field values
Bob Wicksall [Thu, 13 Jun 2013 05:06:10 +0000 (01:06 -0400)]
Reduce index bloat involving non-search_field values

Rows in metabib.title_field_entry, subject_field_entry,
series_field_entry, and author_field_entry are doubled or tripled due to
bad logic in biblio.extract_metabib_field_entry. This results in these
tables being 2 or more times their correct size.

This was introduced in 2.2.0 when the logic for browse_field and
facet_field were added to biblio.extract_metabib_field_entry. 2.1 is not
affected.

The duplicates are caused when biblio.extract_metabib_field_entry
returns TRUE in the search_field column for all rows even if they should
just be facet_field or browse_field after the first search_field value
is returned.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoOnly attempt to map copies once per hold
Mike Rylander [Tue, 25 Jun 2013 11:44:22 +0000 (07:44 -0400)]
Only attempt to map copies once per hold

The development of Calculated Proximity Adjustment (CPA) for 2.4 added a "prox"
column to action.hold_copy_map (ahcm) to store on variant of copy proximity.  That
value is calculated at the same time that certain other data structures are
set up, and is conceptually tied to them, so the resulting combined data
set is used to insert values into the ahcm.  However, user configuration
can cause that data set to contain non-unique values, where the data structure
used previous to CPA was guaranteed to be unique.  This lack of uniqueness
would then violate a constraint on the achm table.  This commit restores the
required uniqueness for the purpose of creating the ahcm rows.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoGenerate Password Label
Kathy Lussier [Fri, 12 Apr 2013 23:40:34 +0000 (16:40 -0700)]
Generate Password Label

The "Reset" label for the button that generates random passwords can be
confusing for staff. Changes the label to "Generate Password" to let
people know what the button does.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoPrevent JavaScript error on non-Novelist sites
Dan Scott [Fri, 21 Jun 2013 18:49:27 +0000 (14:49 -0400)]
Prevent JavaScript error on non-Novelist sites

Unless the Evergreen site in question is signed up and configured to
support Novelist added content, every details page will generate a
JavaScript error due to the reference to an undefined JavaScript
function. Guard against that by testing for the presence of the Novelist
URL.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoSilence QP warning due to inappropriate cmp op
Dan Scott [Wed, 19 Jun 2013 20:49:14 +0000 (16:49 -0400)]
Silence QP warning due to inappropriate cmp op

In QueryParser, we're comparing two strings, but using the numeric !=
operator. Switching to the 'ne' operator silences a warning that came up
7,000 today in our logs so far...

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoSilence uninit var warnings from query normalizer
Dan Scott [Fri, 21 Jun 2013 03:11:20 +0000 (23:11 -0400)]
Silence uninit var warnings from query normalizer

$field_info can return undef from the search for a matching ID from the
list of normalizers, which in turn generates several uninit var warnings
when attempts are made to access members of the undef variable. We saw
6700 occurrences of these warnings during a typical day of operations.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoreturn, not next, from eval BLOCK
Dan Scott [Fri, 21 Jun 2013 03:39:21 +0000 (23:39 -0400)]
return, not next, from eval BLOCK

Per perldoc eval, exiting an eval BLOCK is not allowed. And it generates
warnings - 37,000 of them in one day - on a system on which the fine
generator runs every 15 minutes. Simply returning from the block
achieves the same goal without generating scads of warnings.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoLP1179609 ACQ lineitem identifier inline update
Bill Erickson [Mon, 13 May 2013 17:22:37 +0000 (13:22 -0400)]
LP1179609 ACQ lineitem identifier inline update

When the identifier value for a linetiem is changed, apply the change
and refresh the lineitem in real time instead of requiring users to
click the 'Apply Lineitem Identifier' link.

The 'Apply Lineitem Identifier' link has also been removed, since it is
no longer needed.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
11 years agoAdd (noop) upgrade script for 2.2.10
Lebbeous Fogle-Weekley [Wed, 19 Jun 2013 19:42:07 +0000 (15:42 -0400)]
Add (noop) upgrade script for 2.2.10

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years ago2.3.8 stub upgrade script
Bill Erickson [Wed, 19 Jun 2013 14:47:20 +0000 (10:47 -0400)]
2.3.8 stub upgrade script

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoSupport script-based circ in nearest_hold()
Dan Scott [Mon, 17 Jun 2013 04:38:43 +0000 (00:38 -0400)]
Support script-based circ in nearest_hold()

The nearest_hold() implementation recently changed to pull in the circ
library ID; however, if circulation runs through scripts, the circ
library on the copy object has been fleshed, and the nearest hold
routine gets very confused.

Check to see if we do, in fact, have an object instead of a plain
scalar, and assign the value to a placeholder variable accordingly.

Thanks to Jeff Godin for his great assistance on debugging this!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

(Just whitespace. Resolved by hand.  --miker)

11 years agoLP 1177388 'Add to Po' Honors default copy count
Bill Erickson [Tue, 7 May 2013 13:48:05 +0000 (09:48 -0400)]
LP 1177388 'Add to Po' Honors default copy count

Create the requested number of copies for lineitems added to purchase
orders whose provider has a non-zero value for 'default copy count'.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
11 years agoPrevent uninit var warnings in Search/Biblio.pm
Dan Scott [Tue, 18 Jun 2013 16:17:40 +0000 (12:17 -0400)]
Prevent uninit var warnings in Search/Biblio.pm

The logger messages in Search/Biblio.pm throw _many_ uninitialized
variable warnings. With a little care, we can prevent those warnings and
return our attention to more important log messages.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoFixes to MARC batch import docs
Kathy Lussier [Fri, 14 Jun 2013 19:51:42 +0000 (15:51 -0400)]
Fixes to MARC batch import docs

Added needed subheadings to the MARC batch update docs. Also shortened
line lengths and modified intro that focused on 2.2 new features.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
11 years agoPost-2.5-m1 whitespace fixup user/dbwells/whitespace_fixup_m1
Dan Wells [Fri, 14 Jun 2013 18:21:10 +0000 (14:21 -0400)]
Post-2.5-m1 whitespace fixup

This is an attempt at an automated whitespace cleanup for the m1
milestone of version 2.5.  It was created using the following
commands (run from Open-ILS/src/perlmods/lib):

find . -name "*.pm" \
-exec sh -c 'sed "/<</s/\t/    /g" < {} \
| expand -t 4 > {}.fixed ; \
cp --no-preserve=mode,ownership {}.fixed {}; \
rm {}.fixed' \;

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
11 years agoRepair fine generator memory leak
Bill Erickson [Mon, 27 Aug 2012 14:38:48 +0000 (10:38 -0400)]
Repair fine generator memory leak

Calling "next" from within a "try" block results in a memory leak,
presumably because "try" is a tangled nest of subs and evals.
Replacing the "try" with a good ol' "eval" avoids the leak.

This can be reproduced with the following:

---------
use Error qw/:try/;

foreach (0..200000) {
    try {
        next;
    } catch Error with {
    };
}
---------

This particular leak in the fine generator is onerous when the fine
generator is run often (e.g. every 15 mins), which means circs that
have already been processed for the day are re-analzyed over and over,
causing the code to continue early (next) to the next loop iteration
for large numbers of circs.  It also happens when a circs are skipped
because they have no fine interval, rate, or max fine.

You know this is happening because you will see something like this in
the storage stderr log:

Exiting eval via next at
/usr/local/share/perl/5.10.1/OpenILS/Application/Storage/Publisher/action.pm
line 820.

Exiting subroutine via next at
/usr/local/share/perl/5.10.1/OpenILS/Application/Storage/Publisher/action.pm
line 820.

This patch does not avoid the "exiting eval via next" warning, since
we're still next'ing out of the eval.  It just avoids the memory leak
(and the "Exiting subroutine" warning).  More extensive refactoring is
needed to to completely remove the second warning.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoUse the centralized initialization method for QP
Mike Rylander [Tue, 11 Jun 2013 20:44:35 +0000 (16:44 -0400)]
Use the centralized initialization method for QP

QueryParser maintains an effective singleton for internal configuration of
the driver in order to avoid going to the database on every search request
to gather configuration parameters.  There is also a centralized sub that
has the task of properly configuring said singleton.  Previous to this commit
we were not using that centralized initializer in one case, and that case
happened to be the most important initialization of QP in all of Evergreen.
The fallout from that was that some configuration was not being gathered
and passed to QueryParser, resulting in incorrect search SQL being generated.

This is rectified by using the centralized initializer everywhere that it
is needed and can be used -- and particularly in the effected case.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
11 years agoSearch clicked /and/ preceding sf values
Mike Rylander [Tue, 30 Apr 2013 20:45:55 +0000 (16:45 -0400)]
Search clicked /and/ preceding sf values

When looking for authority records to control a bib field, we currently
search using exactly, and only, the subfield that was clicked.  This
commit changes that so that the full field up to and including the clicked
subfield is used in the simple authority heading search we perform to find
the best-match (pivot) authority record.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
11 years agoEdits to documentation
Angela Kilsdonk [Tue, 11 Jun 2013 14:56:01 +0000 (10:56 -0400)]
Edits to documentation

Edits to fit documentation structure.

Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com>
11 years agoDocumentation for Binary MARC21 Feeds and search enhancements
Angela Kilsdonk [Mon, 10 Jun 2013 20:17:08 +0000 (16:17 -0400)]
Documentation for Binary MARC21 Feeds and search enhancements

Documentation for Binary MARC21 Feeds and Bibliographic Search Enhancements added to opac/advanced_features.

Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com>
11 years agoDocumentation for MARC Import Remove Fields
Angela Kilsdonk [Mon, 10 Jun 2013 19:29:20 +0000 (15:29 -0400)]
Documentation for MARC Import Remove Fields

MARC Import Remove Field documentation added to docs/admin

Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com>
11 years agoStamping upgrade script for making state not required
Ben Shum [Fri, 7 Jun 2013 20:21:07 +0000 (16:21 -0400)]
Stamping upgrade script for making state not required

Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoLP1079041 - making state not required (continued)
Ben Shum [Wed, 5 Jun 2013 04:40:53 +0000 (00:40 -0400)]
LP1079041 - making state not required (continued)

The last commit did not add the default YAOUS to the seed data. Also, some
wording tweaks to bring the content in line with the existing entries for
consistency.

Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoMake the "state" field in registration a togglable YAOUS
Michael Peters [Thu, 15 Nov 2012 17:49:05 +0000 (12:49 -0500)]
Make the "state" field in registration a togglable YAOUS

Some countries do not use "State" therefore we need to create
a YAOUS to make it non-required/displaying.  This also requires
that we no longer force a "not null" on state in actor.usr_address.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
11 years agoStamping upgrade script for purge circs fixes
Dan Wells [Fri, 7 Jun 2013 19:58:55 +0000 (15:58 -0400)]
Stamping upgrade script for purge circs fixes

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoAdd srfsh script to call action.purge_circulations().
Jason Stephenson [Mon, 25 Mar 2013 13:10:40 +0000 (09:10 -0400)]
Add srfsh script to call action.purge_circulations().

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoReturn count purged
Thomas Berezansky [Wed, 19 Sep 2012 15:30:40 +0000 (11:30 -0400)]
Return count purged

Because postgres dislikes functions that don't return.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoFix rentention typo
Thomas Berezansky [Mon, 10 Sep 2012 16:14:09 +0000 (12:14 -0400)]
Fix rentention typo

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoPurge Circulations: Unwrapped Upgrade Script
Thomas Berezansky [Mon, 18 Jun 2012 17:45:21 +0000 (13:45 -0400)]
Purge Circulations: Unwrapped Upgrade Script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoPurge Circulations: Allow global age as forced min
Thomas Berezansky [Mon, 18 Jun 2012 17:29:58 +0000 (13:29 -0400)]
Purge Circulations: Allow global age as forced min

This allows a library to keep all circs in the last Y interval, regardless
of user settings that may otherwise cause an earlier purging.

Another global flag that defaults to off controls this behavior.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoPurge Circulations: Remove extra delete loop
Thomas Berezansky [Mon, 18 Jun 2012 17:19:18 +0000 (13:19 -0400)]
Purge Circulations: Remove extra delete loop

A trigger on action.circulation purges upwards through the circ chain. Thus
we don't need to do the loop ourselves.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoPurge Circulations: Better selection logic
Thomas Berezansky [Mon, 18 Jun 2012 17:07:56 +0000 (13:07 -0400)]
Purge Circulations: Better selection logic

This attempts two things:

1 - Keep the number of circs the library wants based on the most recent
    circulations, regardless of user prefs and such.

    This is accomplished by changing the circ fetching query to use a
    window function in a subquery so we can filter on it easily.

    This also allowed removal of the purge position counter.

2 - Allow removal of circs that are between kept circs if they meet all
    other removal criteria.

    This is accomplished by using CONTINUE instead of EXIT in the loop.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoPurge Circulations: Support last xact_finished use
Thomas Berezansky [Mon, 18 Jun 2012 17:00:30 +0000 (13:00 -0400)]
Purge Circulations: Support last xact_finished use

Based on a new (off by default) global flag change between the xact_finish
on the last circ in the chain and the most recent one.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoPurge Circulations: Skip partially complete chains
Thomas Berezansky [Mon, 18 Jun 2012 16:52:04 +0000 (12:52 -0400)]
Purge Circulations: Skip partially complete chains

Billings in earlier portions of the chain may leave them open. Thus, look
for any circulations in the chain with a null xact_finish.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoCirc Chain Functions should take BIGINTs
Thomas Berezansky [Mon, 18 Jun 2012 16:49:39 +0000 (12:49 -0400)]
Circ Chain Functions should take BIGINTs

Because INTEGER isn't suitable for circ IDs.

This only requires editing the input definitions.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoStamping upgrade script for purge holds functionality
Dan Wells [Fri, 7 Jun 2013 19:31:37 +0000 (15:31 -0400)]
Stamping upgrade script for purge holds functionality

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoUpdate the purge_holds.txt release notes.
Jason Stephenson [Wed, 10 Apr 2013 21:29:28 +0000 (17:29 -0400)]
Update the purge_holds.txt release notes.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoAdd table, view and trigger for "aging" hold requests on delete.
Jason Stephenson [Thu, 4 Apr 2013 15:30:25 +0000 (11:30 -0400)]
Add table, view and trigger for "aging" hold requests on delete.

This creates the action.aged_hold_request table, the
action.all_hold_request view, the action.age_hold_on_delete
function, and the action_hold_request_aging_tgr on action.hold_request.

Add fieldmapper entries for action.all_hold_request view and
action.aged_hold_request table.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoAdd a purge_holds.srfsh script so it can be run from cron.
Jason Stephenson [Mon, 1 Apr 2013 20:59:59 +0000 (16:59 -0400)]
Add a purge_holds.srfsh script so it can be run from cron.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoFix typo in purge holds function
Thomas Berezansky [Tue, 2 Apr 2013 14:18:55 +0000 (10:18 -0400)]
Fix typo in purge holds function

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoRelease notes for Purge Holds routine
Thomas Berezansky [Wed, 13 Feb 2013 21:08:01 +0000 (16:08 -0500)]
Release notes for Purge Holds routine

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoFix seed values and upgrade script
Thomas Berezansky [Wed, 13 Feb 2013 20:41:44 +0000 (15:41 -0500)]
Fix seed values and upgrade script

enabled and label were out of order.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoMake user visible holds based on fill/cancel time
Thomas Berezansky [Thu, 21 Jun 2012 13:55:05 +0000 (09:55 -0400)]
Make user visible holds based on fill/cancel time

Instead of request time. That way holds don't vanish after filling when
keeping history was turned on after hold placement.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoAdd purge_holds DB function
Thomas Berezansky [Thu, 21 Jun 2012 13:44:11 +0000 (09:44 -0400)]
Add purge_holds DB function

This allows removing of holds based on patron and library preferences.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
11 years agoWe still don't support Z30.59 or Z39.59
Dan Wells [Fri, 7 Jun 2013 19:07:30 +0000 (15:07 -0400)]
We still don't support Z30.59 or Z39.59

Actually, just fix a few typos :)

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoStamping upgrade script for batch z39.50 search, match, overlay
Dan Wells [Fri, 7 Jun 2013 18:57:48 +0000 (14:57 -0400)]
Stamping upgrade script for batch z39.50 search, match, overlay

Signed-off-by: Dan Wells <dbw2@calvin.edu>
11 years agoZ39.50 Batch Search/Overlay : SQL / IDL
Bill Erickson [Tue, 5 Mar 2013 14:20:43 +0000 (09:20 -0500)]
Z39.50 Batch Search/Overlay : SQL / IDL

Copied some missing pieces from the upgrade scripts into the seed schema
/ data files.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay Release Notes
Bill Erickson [Mon, 25 Feb 2013 16:37:28 +0000 (11:37 -0500)]
Z39.50 Batch Search/Overlay Release Notes

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay TPAC my-list entry point
Bill Erickson [Mon, 25 Feb 2013 18:17:59 +0000 (13:17 -0500)]
Z39.50 Batch Search/Overlay TPAC my-list entry point

Similar to the staff client bucket UI, this adds a button which allows
staff to access the batch Z39 search-and-queue operation directly from
the TPAC my-lists UI.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay Z-Index Admin UI
Bill Erickson [Mon, 25 Feb 2013 15:37:11 +0000 (10:37 -0500)]
Z39.50 Batch Search/Overlay Z-Index Admin UI

Admin -> Server Admin -> Z-Index Field Maps

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay minor IDL repairs
Bill Erickson [Mon, 25 Feb 2013 15:36:54 +0000 (10:36 -0500)]
Z39.50 Batch Search/Overlay minor IDL repairs

Added some missing reporter:selector attributes and repaired an invalid
link class.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay Z-Search UI
Bill Erickson [Mon, 18 Feb 2013 15:41:01 +0000 (10:41 -0500)]
Z39.50 Batch Search/Overlay Z-Search UI

Adds a new "Find Z39.50 Matches" option to Cataloging -> Manage Record
Buckets.  When selected, the user chooses the Z39 fields, the Z39
sources, the destination queue, and the queue match set.  The user then
submits the search.  Basic progress info is reported to the user.
Once complete, the user can open the destination queue, from which
regular vandelay import, etc. actions may be performed on the newly
found records.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay Seed Data
Bill Erickson [Wed, 13 Feb 2013 19:07:29 +0000 (14:07 -0500)]
Z39.50 Batch Search/Overlay Seed Data

Org unit setting seed data:
* cat.z3950.batch.max_parallel
* cat.z3950.batch.max_parallel

Stock / sample seed data entries for config.z3950_index_field_map, with
room added for future stock data.

Vandelay bib attribute seed data for Z39.50 source (901z), which is
stamped during the Z39.50 batch search-and-queue operation.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoVandelay : sort queued records by matches
Bill Erickson [Wed, 13 Feb 2013 17:16:24 +0000 (12:16 -0500)]
Vandelay : sort queued records by matches

Sort queued records by their matches (based on the first match) so that
like records are grouped in the queue interface.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoVandelay record bucket-limited matching
Bill Erickson [Thu, 31 Jan 2013 17:37:44 +0000 (12:37 -0500)]
Vandelay record bucket-limited matching

Provides the option to link record buckets to vandelay queues.  When
linked, vandelay imports where a match set is specified will limit
matches to records within the selected bucket.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay API
Bill Erickson [Wed, 30 Jan 2013 22:44:30 +0000 (17:44 -0500)]
Z39.50 Batch Search/Overlay API

New API for performing Z39.50 queries for a set of bib records across a
set of Z39 sources.  Searches are performed in parallel (up to a
configurable maximum number of active searches and maximum results) and
results are stored in a vandelay MARC Import/Export queue.

Search fields and values are determined by Z39 index field maps.  At
search time, the caller provides a set of field maps to use for the
search. Search values for each bib record are found by following the
index maps to the indexed values in metabib.*_field_entry or
metabib.record_attr.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoZ39.50 Batch Search/Overlay : SQL / IDL
Bill Erickson [Wed, 30 Jan 2013 20:08:47 +0000 (15:08 -0500)]
Z39.50 Batch Search/Overlay : SQL / IDL

 * DB table for Z39.50 index field maps, which link Z39 search fields to
   indexed bib data via metabib fields and record attributes (svf)

 * Seed data for Z39.50 batch search org unit settings
  ** cat.z3950.batch.max_parallel
  ** cat.z3950.batch.max_results

 * Stock seed data for config.z3950_index_field_map entries

Signed-off-by: Bill Erickson <berick@esilibrary.com>
11 years agoRepair SIP start/end list ranges
Bill Erickson [Fri, 5 Apr 2013 17:28:08 +0000 (13:28 -0400)]
Repair SIP start/end list ranges

SIP supports paging of certain lists (holds, fines, etc.) by allowing
the SIP client to provide start and end points for lists.  This patch
repairs how Evgreen extracts the list ranges from arrays.

When using Perl array ranges, the array variable should be accessed via
'@' and not '$'.  Prior to this change, all ranged lists resulted in
returning the first item in the list instead of the full range.

This change affects lists of holds, overdues, fines, and charges.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
11 years agoMake Force/Recall holds always return as nearest
Thomas Berezansky [Thu, 26 Jul 2012 14:25:32 +0000 (10:25 -0400)]
Make Force/Recall holds always return as nearest

Without even running the hold rules.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

(Just whitespace conflicts on tab vs space -- repaired by hand.)

11 years agoTPAC - set autofocus to user input when placing holds in staff client
Ben Shum [Sat, 2 Mar 2013 07:21:58 +0000 (02:21 -0500)]
TPAC - set autofocus to user input when placing holds in staff client

When placing holds in TPAC via the staff client, the focus had been on the
basic search field above. Change this to have autofocus on the input field
for the hold user by default.

This can potentially save staff from having to perform an extra click to
select the input field. Now they can immediately begin entering the barcode
of the user they plan to create a hold on behalf of.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoSIP renew-all; reset renewal statuses
Bill Erickson [Mon, 7 Jan 2013 14:35:55 +0000 (09:35 -0500)]
SIP renew-all; reset renewal statuses

Reset the list of renewed and unrenewed items for each instance of the
RenewAll transactions.  Otherwise, items from previous transactions will
bleed into the current transaction.

While we're in there, fix a couple of tabs.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
11 years agoSIP RenewAll
Bill Erickson [Mon, 26 Nov 2012 19:51:27 +0000 (14:51 -0500)]
SIP RenewAll

Adds SIP plugin support for SIP message types 65/66 (Renew All).  When
requested, the plugin performs a renewal on all items currently checked
out for the user.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>