]> git.evergreen-ils.org Git - working/Evergreen.git/log
working/Evergreen.git
12 years agoAdd basic unit tests for AuthProxy + associated fixes
Dan Scott [Fri, 10 Feb 2012 03:24:03 +0000 (22:24 -0500)]
Add basic unit tests for AuthProxy + associated fixes

The basic "will it load?" unit tests for AuthProxy* turned up a few
requirements:

1. Add install of Net::LDAP to Makefile.install
2. Initialize the OpenSRF cache after bootstrapping

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoSync AuthProxy config values with opensrf.xml.example
Dan Scott [Fri, 10 Feb 2012 02:55:51 +0000 (21:55 -0500)]
Sync AuthProxy config values with opensrf.xml.example

The open-ils.auth/app_settings/auth_limits section of
opensrf.xml.example offers different settings than O:A:AuthProxy looks
up, which would typically lead to the default fallbacks. Also,
O:A:AuthProxy appears to mistakenly use seed_timeout instead of
block_timeout.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoWhitespace fixup
Dan Scott [Fri, 10 Feb 2012 02:42:25 +0000 (21:42 -0500)]
Whitespace fixup

Fix the vim "noet" directive to avoid inadvertent introduction of tabs.

Wrap a comment over multiple lines instead of creating a super-long
line.

Use one statement per line.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoTie AuthProxy.pm to brute-force prevention setup
Dan Wells [Mon, 16 Jan 2012 20:13:43 +0000 (15:13 -0500)]
Tie AuthProxy.pm to brute-force prevention setup

Attempts to authenticate using either normal auth or
AuthProxy.pm will now reference the same counter for
the purposes of preventing brute-force password attacks.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoInitial external authentication support via proxy
Dan Wells [Thu, 3 Nov 2011 18:17:24 +0000 (14:17 -0400)]
Initial external authentication support via proxy

This is the initial commit to support an authentication proxy module
to facilitate external authentication.  It is a work in progress.

What is does so far:
  - Optionally redirects all JSOPAC login requests over SSL by building
    on the 'forceLoginSSL' configuration bool (you MUST enable this
    option for proper use of the auth proxy)
  - Provides a basic plug-in framework for external authentication
    implementations, including configuration options for segregating
    authenticators based on login type or org_unit
  - Allows for multiple cascading authentication tests, including
    simultaneous support for external and internal (EG 'native')
    authentication
  - Provides a 'master switch' to easily revert to using the native EG
    authentication routines only
  - Includes an example LDAP plug-in which supports bind-style auth
    checks

Biggest outstanding known needs:
  - TTOPAC integration, including SSL redirection
  - Tying of login attempts to current brute-force prevention setup
  - Treatment of end-user 'change password' interfaces
  - Support TT/Conifer style authentication prompt

Missing but desirable feature:
  - Allow for manual selection of authenticator by end-user, including
    localization support

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix OU Editor save bug
Mike Rylander [Wed, 22 Feb 2012 17:48:55 +0000 (12:48 -0500)]
Fix OU Editor save bug

The OU Editor has been flashing red and pretending that id didn't
save your changes for ... quite some time.  This fixes that, which
was caused by a change in the way the openils.PermaCrud dojo module
passed results to the user-supplied oncomplete handler.

Also, some unrelated whitespace changes.  Sorry, Dan.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoStamping User Activity Upgrade Script
Thomas Berezansky [Thu, 8 Mar 2012 20:52:18 +0000 (15:52 -0500)]
Stamping User Activity Upgrade Script

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity : only delete transient activity for user/type
Bill Erickson [Thu, 8 Mar 2012 18:13:25 +0000 (13:13 -0500)]
User activity : only delete transient activity for user/type

Repairs a bug spotted by Thomas Berezansky where the addition of a new
activity for a transient type would delete all existing activity
entries.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser Activity : SIP activity tracking
Bill Erickson [Tue, 28 Feb 2012 19:28:14 +0000 (14:28 -0500)]
User Activity : SIP activity tracking

1. Log user activity for all patron-related SIP actions, regardless of
whether the SIP server verifies the user password.

2. Determine the "ewho" (i.e. 3rd-party) value from configuration.  Each
SIP login <account> can now specify its own "activity_who" value.
Additionally, a fall-through <activity_who> element can be added to the
institution config.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking : staff client last activity display
Bill Erickson [Mon, 27 Feb 2012 21:26:48 +0000 (16:26 -0500)]
User activity tracking : staff client last activity display

This adds the Last Activity date to the patron summary (horizontal and
vertical) just below the Expires date.  The Last Activity value will
come from the most recent activity of any type which is configured to be
tracked.  A tooltip on the field will show the activity type.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking : user usr_activity field
Bill Erickson [Mon, 6 Feb 2012 17:31:23 +0000 (12:31 -0500)]
User activity tracking : user usr_activity field

Added a new virtual field to actor.usr called "usr_activity".  When
fleshed, the value contains the most recent activities logged for the
user.  By default, only the most recent activity entry is fetched,
however this commit also adds an org unit setting
"circ.patron.usr_activity_retrieve.max" to control the number of entries
returned for standard patron fleshing calls.

Activity entries are fleshed in the calls:

open-ils.actor.user.fleshed.retrieve
open-ils.actor.user.fleshed.retrieve_by_barcode

This change also updates the permacrud <retrieve> permission for
usr_activity form VIEW_USER to RUN_REPORTS, with the assumption that
any activity data beyond the configured amount (above) should be
considered historical data that is not as readily accessable.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking : activity type admin UI
Bill Erickson [Mon, 6 Feb 2012 16:23:44 +0000 (11:23 -0500)]
User activity tracking : activity type admin UI

Admin UI for managing user activit types.  Access under Admin -> Server
Admin -> User Activity Types.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking: ingress, auth.verify, and login agent
Bill Erickson [Mon, 16 Jan 2012 21:24:54 +0000 (16:24 -0500)]
User activity tracking: ingress, auth.verify, and login agent

Pile of user activity related additions:

* Set the global default Apache ingress value to 'apache'.  Overridable.
* Set the ingress value for remoteauth.cgi to 'remoteauth'
* Change remoteauth.cgi to use auth verify instead of true login
* Set ingress value for SIP to 'sip2'
* Set the ingress value for XMLRPC to 'xmlrpc'
* Set auth agent (ewho) to 'opac' for TPAC and JSPAC
* Set auth agent to 'staffclient' for staff client logins
* Set auth agent to 'authproxy' to the mod_perl Auth proxy
* Added support to the openils.User dojo class for auth verify and
  the login/verify "agent" parameter
* Set the auth agent to 'selfcheck' for the Selfcheck UI.  Also now using
  auth verify instead of login to check the patron username/barcode +
  password combination (when enforced).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking : auth verify test for srfsh.py
Bill Erickson [Mon, 16 Jan 2012 21:24:01 +0000 (16:24 -0500)]
User activity tracking : auth verify test for srfsh.py

Added a handler for auth_verify, which calls
open-ils.auth.authenticate.verify.

Added here (srfsh.py) instead of srfsh(.c) because a) it's quick and b)
srfsh(.c) already has too much open-ils in it.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking: open-ils.auth additions
Bill Erickson [Mon, 16 Jan 2012 21:19:41 +0000 (16:19 -0500)]
User activity tracking: open-ils.auth additions

* Creates usr_activity entries for login and authentication verification
  requests

* Adds a new parameter to open-ils.auth.authenticate.[complete|verify]
  methods called "agent" which maps to the usr_activity column for "ewho"
  (the UI or 3rd-party that initiated the action).

* Adds a new API call "open-ils.auth.authenticate.verify", which behaves
  almost identically to authenticate.complete, with the exception that it
  does not "log in" (i.e. create an auth token and cache the user object).
  Instead, it simply returns a SUCCESS event if the username/barcode and
  password combination are valid.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoUser activity tracking: schema and IDL
Bill Erickson [Mon, 16 Jan 2012 21:18:49 +0000 (16:18 -0500)]
User activity tracking: schema and IDL

* Adds 2 new tables and IDL classes.  The first is a configuration table
  used for defining activity types (config.usr_activity_type).  The
  second is for tracking activity events.  A user activity event is
  defined as a combination of user, action (e.g. login), the interface
  or 3rd-party responsible for the action (e.g. opac, staffclient,
  libraryelf), and the OpenSRF ingress (i.e. the mechanism through which
  the action was delivered: e.g. gateway, translator, xmlrpc).

* Includes a front-facing stored procedure (actor.insert_usr_activity),
  used for creating new activity entries.

* Adds seed data for some default activity types and reserves the first
  1000 IDs for system use.

Current default values for "ewho":

opac
staffclient
selfcheck
authproxy
ums
libraryelf
ezproxy

Current default values for "ehow" (ingress, some inherited from
opensrf):

opensrf (default)
gateway-v1
translator-v1
srfsh
--
sip2
xmlrpc
remoteauth
apache (default mod_perl/apache mod entry point)

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoACQ MARC upload barcode extraction
Bill Erickson [Tue, 6 Mar 2012 13:54:55 +0000 (08:54 -0500)]
ACQ MARC upload barcode extraction

Using "barcode" as the key, it's now possible to extract copy barcodes,
in addition to price, quantity, fund, etc., during ACQ vendor MARC file
upload.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoRemove Z39.50 server definitions from opensrf.xml.example user/bshum/byebyez3950
Dan Scott [Thu, 8 Mar 2012 16:33:20 +0000 (11:33 -0500)]
Remove Z39.50 server definitions from opensrf.xml.example

Point to the Release Notes for a description of how to map old entries
to the database tables. Maybe later someone enterprising will write up a
script that parses the XML and generates reasonable default entries in
the database tables.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoDecode the string to UTF8, always
Dan Scott [Sun, 4 Mar 2012 08:00:49 +0000 (03:00 -0500)]
Decode the string to UTF8, always

Even if you know that the caller is passing you a decoded UTF8 string,
you can and should decode it yourself, because some day a caller isn't
going to decode it first and you're going to wind up in misery trying to
figure out why you're broken.

In this case, it resolves the mystery of why the unit tests failed when
Vandelay seemed to be ticking along fine. As the comment in clean_marc()
mentioned, "assume input is already in UTF8" - but as soon as it isn't,
boom.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoFix Unicode mangling in clean_marc function
Dan Scott [Sun, 4 Mar 2012 07:41:11 +0000 (02:41 -0500)]
Fix Unicode mangling in clean_marc function

Calling s/\p{Cc}//go; before entityize() was resulting in all xFFFD
entities being returned for the upper case diacritic characters, which
in turn caused the new unit test to fail (yay unit tests). I added a
corresponding unit tese for entityize() to ensure that the problem
wasn't coming from that function. Switching the order in which the p{Cc}
regex and entityize() calls resolved the corruption in the unit test.

This suggests that Vandelay may be introducing significant corruption to
imported records and that backporting of this commit to the inline
Vandelay variants from previous releases may be warranted.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoAdd clean_marc function to OpenILS::Utils::Normalize.
Jason Stephenson [Wed, 9 Nov 2011 20:34:27 +0000 (15:34 -0500)]
Add clean_marc function to OpenILS::Utils::Normalize.

Add a library function to clean up MARC records for how we like to
store them in the biblio.record_entry table. Having this in a library
will reduce code duplication.

Also, replace nearly identical code in OpenILS::Application::Vandelay
and OpenILS::Application::Acq::Order with calls to this new function.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agolp944947, receipt template per hold list interface
Jason Etheridge [Fri, 2 Mar 2012 16:45:53 +0000 (11:45 -0500)]
lp944947, receipt template per hold list interface

Spec as follows:

Individual screens use its own settings for receipt templates

There are several XUL-based holds list that are all implemented with the same
holds.js file:

Actions for this Record -> View Holds
Patron Display -> Holds
Circulation -> Browse Hold Shelf
Circulation -> Pull List for Hold Requests

The main Print action (from the “Print” button next to the List Actions menu)
uses the same template, “holds”, for all incarnations of the interface.  We will
change this behavior in holds.js (specifically in the cmd_holds_print method)
such that each interface variation will use its own template.  The new templates
will be:

holds_on_bib
holds_for_patron
holds_shelf
holds_pull_list

We will keep the “holds” template for backwards compatibility and as a fallback
for when these new templates have not yet been configured.  These new templates
will be stubbed in data.js (in the print_list_defaults method) so that they will
appear in the Receipt Template Editor, but by default they will not have any
defined content for their headers, footers, and line items.  Instead, we will
use a new field called “inherit”, and have each new template use “holds”
(referring to the original template) as the value for their inherit fields.

So, for example, the current default ‘holds’ template is defined like this:

'holds' : {
  'type' : 'holds',
  'header' : 'Welcome to %LIBRARY%!<br/>\r\nYou have the following titles on hold:<hr/><ol>',
  'line_item' : '<li>%title%\r\n',
  'footer' : '</ol><hr />%SHORTNAME% %TODAY_TRIM%<br/>\r\nYou were helped by %STAFF_FIRSTNAME%<br/>\r\n<br/>\r\n'
},

The new ‘holds_for_patron’ template will be defined as a peer like this:

'holds_for_patron' : {
  'type' : 'holds',
  'inherit' : 'holds'
},

We will modify the _print_tree method in list.js and the post_init method in
print_list_template_editor.js such that they will react to any value in a
template’s inherit field and allow it to redirect them to use the contents of
the inherited template.  For this particular use-case, we only need to support
one level of indirection, but we may opt to support chains of inheritance for
future use.

We will modify the save_template method in print_list_template_editor.js so that
the inherit field for a given template will be cleared if that specific template
is saved, breaking the link and associating the displayed (and possibly edited)
header, footer, and line item with the template.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoRemove Browse Unfulfilled Holds interface
Jason Etheridge [Fri, 2 Mar 2012 16:44:04 +0000 (11:44 -0500)]
Remove Browse Unfulfilled Holds interface

Which never left Admin->For Developers and doesn't work as advertised

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agolp945091 save columns independently for hold lists
Jason Etheridge [Fri, 2 Mar 2012 19:57:31 +0000 (14:57 -0500)]
lp945091 save columns independently for hold lists

Teaches util.list.init a new parameter, columns_saved_under, which effectively
replaces the tree/list id attribute when used to construct a filename for saving
and retrieving column settings.

Use this technique with holds.js so that each XUL-based hold list interface can
save column configurations independently.

Specifically, these interfaces:

Actions for this Record -> View Holds
Patron Display -> Holds
Circulation -> Browse Hold Shelf
Circulation -> Pull List for Hold Requests

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoRestore autofocus to the searchbar in TPAC
Dan Scott [Mon, 5 Mar 2012 04:15:58 +0000 (23:15 -0500)]
Restore autofocus to the searchbar in TPAC

The switch to autosuggest gave us great functionality, but we lost
autofocus for effortless initial searching. Restore it, with and without
Dojo. For the latter case, just use HTML5's autofocus attribute to begin
with; later on we can use something like Modernizr to detect browsers
that don't support this attribute and prop them up with additional
JavaScript, but let's not let that prevent us from getting a good bang
for our attribute buck in the short term.

Note the slightly painful workaround required to get the cursor to
position itself at the end of the input value of the Dojo autosuggest
widget on page load. This is what we get for stepping back into the
world of JavaScript :)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoRefresh PO activatable state after all prices entered
Bill Erickson [Tue, 14 Feb 2012 18:14:40 +0000 (13:14 -0500)]
Refresh PO activatable state after all prices entered

After all lineitems within a PO have a price, re-test whether the PO can
be activated.  This allows the activation of PO's without having to
refresh the page after the last price is entered.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoGive copy table in search results some style user/bshum/copy_table_style
Dan Scott [Tue, 6 Mar 2012 21:33:24 +0000 (16:33 -0500)]
Give copy table in search results some style

Bold text with grey background for headers, and some space above and
below.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 years agoSpeed up autosuggest in large data environments
Mike Rylander [Tue, 6 Mar 2012 18:24:51 +0000 (13:24 -0500)]
Speed up autosuggest in large data environments

The autosuggest infrastructure was assuming the the Postgres query planner
would be able to cope with large datasets without any additional fiddling.
Unfortunately, that proved to be untrue.  We also needed a few indexing
changes.

 * At the suggestion of Ben Shum, ignore the identifier search class for
   autosuggest.
 * Added indexes to all joined columns of metabib.browse_entry_def_map.
 * Switched from GIST to GIN indexing of metabib.browse_entry.index_vector
   because GIN, being an inverted index, is /much/ better for prefix matching
   which, in turn, is extremely important for browse and autosuggest.
 * Apply some reasonable sanity-checking limits on suggest queries.  This
   means you can't use autosuggest as a reporting tool -- but that's OK
   because it's not one.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agolp948051 new tab button
Jason Etheridge [Tue, 6 Mar 2012 14:39:05 +0000 (09:39 -0500)]
lp948051 new tab button

Adds a new tab button to the right of the last tab in the main window.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd default preference for max tabs in staff client.
Ben Shum [Tue, 14 Feb 2012 19:54:43 +0000 (14:54 -0500)]
Add default preference for max tabs in staff client.

By default, this is set to 0 for unlimited tabs. Including this setting
will allow staff client packagers to more easily assign a limit if desired.

Some reasons for adding a tab limit include:

  1) avoiding memory exhaustion - opening too many tabs can be bad
  2) preserving staff sanity - do not have too many tabs open at once

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd locale-aware menu sort, use it for admin menu
Thomas Berezansky [Mon, 5 Mar 2012 21:14:43 +0000 (16:14 -0500)]
Add locale-aware menu sort, use it for admin menu

Sort function can do recursive sorting and is menuseparator aware, sorting
within blocks defined by menuseparators.

Note: If a menu item has forceFirst set as an attribute it will be put in
front of the current sort group. So far this is only used to keep the
operator change menu item at the top of the admin menu.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoRename sample patron file for clarity/consistency
Bill Erickson [Fri, 10 Feb 2012 20:32:51 +0000 (15:32 -0500)]
Rename sample patron file for clarity/consistency

We now have users_patrons_* and users_staff_*

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoSample staff user data
Bill Erickson [Fri, 10 Feb 2012 20:30:35 +0000 (15:30 -0500)]
Sample staff user data

134 staff users

* Each user has 1 address and one card
* Barcodes take the form 99999 + 6 random digits
* Usernames == lowercase(work_org_shortmae + first initial + last name)
* Passwords = lowercase(firstname + last initial + 1234)
* There are 2 staff for each can_have_users org unit for each staff
profile, minus Global Admin.
* There are two Global Admin staff in total, at orgs 4 and 6

See also LP #926281

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoSample patron data
Bill Erickson [Thu, 9 Feb 2012 17:52:11 +0000 (17:52 +0000)]
Sample patron data

100 Patron users

* Each user has 1 address and one card
* Barcodes take the form 99999 + 6 random digits
* Usernames == barcodes
* Passwords = lowercase(firstname + last initial + 1234)
* Home org units were randomly set.  Each can_have_users org unit should have several patrons

See also LP #926281

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agolp948012 double-clicking on list rows
Jason Etheridge [Tue, 6 Mar 2012 13:42:36 +0000 (08:42 -0500)]
lp948012 double-clicking on list rows

Teaches util.list how to handle double-clicks, and Patron Search to use
double-clicks for patron retrieval, and Holdings Maintenance to use
double-clicks for item editing.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoNumber the autosuggest normalization upgrade script
Dan Scott [Sun, 4 Mar 2012 17:28:51 +0000 (12:28 -0500)]
Number the autosuggest normalization upgrade script

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAddress "bouyancy" typo (should be "buoyancy")
Dan Scott [Sun, 4 Mar 2012 17:06:47 +0000 (12:06 -0500)]
Address "bouyancy" typo (should be "buoyancy")

Let us avoid a typo making it into a major release and condemning us to
the hell of having to remember to misspell this thing until we can break
backwards compatibility...

Drop metabib.suggest_browse_entries() in the upgrade script, as the OUT
parameters have changed and a mere "CREATE OR REPLACE" will not suffice.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAutoSuggest: suggest "josé" when the user types "jose"
Lebbeous Fogle-Weekley [Wed, 29 Feb 2012 19:30:59 +0000 (14:30 -0500)]
AutoSuggest: suggest "josé" when the user types "jose"

"josé" will serve as my example of a term with diacritics in it.  I
don't mean that there is special handling just for the word "josé" per se.

Before now, the user could type "josé" and see suggestions containing
exactly that.  You could not type "jose" and expect to see "josé".  Now
you can.

In other words, typing "jose" and "josé" should now produce the exact same
set of suggestions.  Only the version you actually typed will be
*highlighted* in the suggestions, however.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAdd the CC-BY-SA license footer from the Release Notes
Dan Scott [Sun, 4 Mar 2012 06:55:08 +0000 (01:55 -0500)]
Add the CC-BY-SA license footer from the Release Notes

Making sure everything is consistent on the documentation licensing
front.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix sorting by pubdate for records migrated to 2.1
Dan Scott [Sun, 22 Jan 2012 19:29:16 +0000 (14:29 -0500)]
Fix sorting by pubdate for records migrated to 2.1

The 'pubdate' attribute is necessary for sorting by publication date to
work correctly. It was not populated in the 2.0-2.1 upgrade script, so
populate it now based on the 'date1' attribute.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
12 years agoTPac: load config.tt2 from header.tt2
Bill Erickson [Thu, 5 Jan 2012 15:06:20 +0000 (10:06 -0500)]
TPac: load config.tt2 from header.tt2

Instead of loading config.tt2 on an as-needed basis, load it globally
within header.tt2, since it's used on every page.

Removed a redundant "USE POSIX" import while I was in there.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoRemove reference to CentOS and RHEL from the README
Dan Scott [Sun, 4 Mar 2012 05:46:38 +0000 (00:46 -0500)]
Remove reference to CentOS and RHEL from the README

Until we have a known working install for CentOS and RHEL in
Makefile.install again, let's not advertise a known non-working install.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoDefault to table of contents & numbering for README
Dan Scott [Sun, 4 Mar 2012 05:43:29 +0000 (00:43 -0500)]
Default to table of contents & numbering for README

A tiny decrease in the legibility of the raw text format of the README
is traded off for consistent output formatting.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoBe more precise about Ubuntu Precise in the README
Dan Scott [Sun, 4 Mar 2012 05:37:46 +0000 (00:37 -0500)]
Be more precise about Ubuntu Precise in the README

Avoid ambiguous references to Ubuntu when there is a need to distinguish
between Lucid and Precise.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoUpdate PGSQL 9.1 server install for Debian/Ubuntu.
Jason Stephenson [Wed, 11 Jan 2012 20:09:11 +0000 (15:09 -0500)]
Update PGSQL 9.1 server install for Debian/Ubuntu.

Use install_pgsql_server_backport_debs_91 on Debian.

Use install_pgsql_server_debs_91 on Ubuntu.

Update the README to reflect this.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAdd Business::OnlinePayment::PayPal CPAN dependency in Makefile.install.
Jason Stephenson [Wed, 11 Jan 2012 19:30:35 +0000 (14:30 -0500)]
Add Business::OnlinePayment::PayPal CPAN dependency in Makefile.install.

Add it to FEDORA_CPAN, CPAN_MODULES, and CPAN_MODULES_PRECISE, to install
it everywhere but Centos and RHEL 5.  I'm not certain about Centos because
it may need a force on that platform as AuthorizeNet does.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoProceed with caution on the Squeeze backport repo
Dan Scott [Tue, 10 Jan 2012 21:02:24 +0000 (16:02 -0500)]
Proceed with caution on the Squeeze backport repo

When installing on Debian Squeeze, use the same "-P" flag to prompt for
removal of the PostgreSQL 8.* packages now that we're pointing at the
9.1 backport. Create a new target to avoid trampling on Precise
Pangolin's nice, clean 9.1 target.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoUse Postgres 9.1 on Debian Squeeze, as it is now available via backports
Mike Rylander [Tue, 10 Jan 2012 16:21:14 +0000 (11:21 -0500)]
Use Postgres 9.1 on Debian Squeeze, as it is now available via backports

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoImprove Fedora instructions in README
Dan Scott [Thu, 5 Jan 2012 20:41:52 +0000 (15:41 -0500)]
Improve Fedora instructions in README

A few steps required for successful installation on Fedora 16 were
missing from the README; in particular, pointing to /etc/httpd in the
Apache configuration files and initializing the PostgreSQL database
cluster.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAdd tests for TPAC Perl modules
Dan Scott [Wed, 4 Jan 2012 04:30:19 +0000 (23:30 -0500)]
Add tests for TPAC Perl modules

Just basic tests, but they should catch syntax problems at least.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAdd perl-Locale-Codes to Fedora prereq installer
Dan Scott [Wed, 4 Jan 2012 04:26:58 +0000 (23:26 -0500)]
Add perl-Locale-Codes to Fedora prereq installer

Locale::Country isn't bundled in Fedora's core Perl modules so add it to
the RPM list.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoTPac: Make subjects less confusing
Thomas Berezansky [Thu, 26 Jan 2012 21:10:35 +0000 (16:10 -0500)]
TPac: Make subjects less confusing

The mdash can (and has) been interpreted as being a splitter between fully
unrelated subjects. Change it to a gt to make the relationship obvious.

Credit goes to other MassLNC members for the suggestion.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoTPac: Make view changing more patron-friendly
Thomas Berezansky [Thu, 26 Jan 2012 21:19:51 +0000 (16:19 -0500)]
TPac: Make view changing more patron-friendly

Instead of calling them "Detailed View" and "Simple View" label them as
"Show More Details" and "Show Fewer Details", to make it obvious that
clicking will change the view.

Credit goes to other MassLNC members for the initial idea, and those in
IRC for hashing out the wording.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoImprove the readability of the rdetail_extras headers in TTPAC
Michael Peters [Fri, 2 Mar 2012 16:31:35 +0000 (11:31 -0500)]
Improve the readability of the rdetail_extras headers in TTPAC

The previous version included green text, on a light green background, which
was very difficult to read, especially for visually impaired patrons.
This commit serves to change the header background to a darker green, along
with a high contrast white text.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoSpeed up 0663 upgrade script
Thomas Berezansky [Mon, 9 Jan 2012 18:58:07 +0000 (13:58 -0500)]
Speed up 0663 upgrade script

Move update to the end

This ensures most of the rest goes without error first

Disable triggers on the table before doing update

This speeds the update up significantly as we don't need to re-calc the
additional column's new data.

Allow new column to be null (at first) with no default

This allows the column to be added *without* re-writing every row. We still
re-write every row with the update, but at least we aren't doing that
*twice* this way.

And add the not null/default to new column and re-enable triggers as our
last action.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoStamping default-merge-profiles upgrade script
Mike Rylander [Tue, 28 Feb 2012 19:58:38 +0000 (14:58 -0500)]
Stamping default-merge-profiles upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoDefault Vandelay merge profiles
Bill Erickson [Thu, 19 Jan 2012 16:03:44 +0000 (11:03 -0500)]
Default Vandelay merge profiles

Adds 2 default vandelay merge profiles, in part so users will have some
useful sample data, but also so the community can have some
basic/consistent profiles for documentation purposes.

1. Match-Only Merge

This is a no-op merge.  It's only purpose is to allow Vandelay, which
requires a profile of some sort to do anything, to find matching
records.  This is useful for importing holdings when the MARC from the
source record is not desired.  It will also be useful in the
(forthecoming) Vandelay-driven Acquisitions lineitem linking (LP
pending).

The target/incumbent record is not affected.

2. Full Overlay

Used for overlaying an entire inbound MARC record over its target
record.  The target/incumbent record is completely replaced by the
inbound record.

For both, 901c is used because it's automatically updated on the target
record to match the internal ID, regardless of any field
preservation/stripping.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoVandelay: refresh upload and inspect queue pages
Bill Erickson [Mon, 19 Dec 2011 22:08:12 +0000 (17:08 -0500)]
Vandelay: refresh upload and inspect queue pages

Vandley sub-pages are currently managed as hidden divs that come into
view when the requested tab is selected.  This creates two types of
problems in the interface.  The first is that newly created data (e.g. a
new queue) is not available in the UI, because it's not getting
re-fetched from the server when the tab is opened (or added to local
data stores).  Second, certain form elements misbehave when the form is
re-rendered without a refresh.  Elements, typically checkboxes, will
appear to be selected when they are not.  (Or, perhaps they are, and the
method to detect their selection is not sufficient).  The simplest
solution to both problems is to simply reload the page....

This patch changes the tabs for Import Records and Inspect Queue so that
they reload the page (focused on the selected tab) instead of just
showing the hidden div.  These pages were chosen because they are the
only interfaces that don't automatically refresh their own data and (for
Import Record) have forms that need refreshing.

Additionally, since the user may spend more time loading Vandelay
pages, this also fixes the long-standing annoyance of seeing the
Vandelay UI partially render while waiting for the page to load.  Now,
it all remains hidden, except for a brief "Loading..." message.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoStamping circ limits upgrade script
Mike Rylander [Tue, 28 Feb 2012 19:36:37 +0000 (14:36 -0500)]
Stamping circ limits upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAsciidoc documentation for circ limits
Thomas Berezansky [Tue, 7 Feb 2012 22:27:00 +0000 (17:27 -0500)]
Asciidoc documentation for circ limits

Because crappy documentation is better than no documentation ;)

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoNew Circ Limits
Thomas Berezansky [Tue, 7 Feb 2012 22:26:03 +0000 (17:26 -0500)]
New Circ Limits

Replace the old "Circ Mod Test" limit system with a more flexible system.

In addition to circ modifiers this system supports "Limit Groups" that are
automatically applied (by default) to any circulation checking them. This
can be overidden by setting the "Check Only" flag when linking a Limit
Group to a Limit Set.

Both the limit groups and circ modifiers are linked to "Limit Sets" that
act similarly to rules. Each Set can be attached to 0 or more circulation
matchpoints.

Each Limit set supports a number of items out (0 replaces infinite), depth
in the org tree to start counting at (0 for up to the top, 1 for 1 below,
etc), and a global flag (to check everywhere below the depth point, rather
than just those circulations that happend at ancestors/descendants).

When a Limit Set is linked to a Circulation Matchpoint it can be made
inactive and has a fallthrough flag. When the fallthrough flag is enabled
the Limit Set will be used whenever the matchpoint is involved with making
a decision. When it is disabled the Limit Set will only be used when the
matchpoint is the most specific matchpoint used in making the decision.

Limit Groups management can be found on the server administration menu.

Limit Sets management can be found on the local administration menu.

Limit Set -> Matchpoint linking is done via editing Circulation Policies.

The upgrade script does not remove the old tables in case something goes
wrong with migrating the information contained within them.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Conflicts:

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoFix inability to suspend holds
Thomas Berezansky [Tue, 31 Jan 2012 15:48:25 +0000 (10:48 -0500)]
Fix inability to suspend holds

The hold status code was being used for "has the hold been captured", but
the value for "frozen" was after the cutoff being assumed for "captured".

So check for the suspended code specifically in the if, and don't return
the suspended code if there is a capture time.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoCorrectly quote regexp-y characters in phrase quoting helper
Mike Rylander [Fri, 24 Feb 2012 18:40:06 +0000 (13:40 -0500)]
Correctly quote regexp-y characters in phrase quoting helper

There was one extra character that caused the use of quotemeta() to not
actually happen.  This broke two things:

  1) phrase searching when the phrase had certain special characters in it
        -- test case: "c++"
  2) use of relevance bumps in the same situation

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoRe-enable use of BAR_PATRON and UNBAR_PATRON perms
Thomas Berezansky [Wed, 15 Feb 2012 20:36:58 +0000 (15:36 -0500)]
Re-enable use of BAR_PATRON and UNBAR_PATRON perms

If you aren't allowed to bar/unbar at the patron's home library then:

1 - Disable the checkbox as appropriate
2 - Disallow on the backend too

The frontend only checks on page load. The backend checks the old patron on
update and the new patron on create.

This does not stop "change home library to me, bar/unbar, change back" if
otherwise able to change the patron's home library.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoStop targeter crash on empty metarecord with holds
Thomas Berezansky [Mon, 30 Jan 2012 18:34:53 +0000 (13:34 -0500)]
Stop targeter crash on empty metarecord with holds

By checking for 1 or more records before looking them up.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoUpdate pickup lib from holds shelf status test repair
Bill Erickson [Wed, 15 Feb 2012 22:07:24 +0000 (17:07 -0500)]
Update pickup lib from holds shelf status test repair

When determining whether a hold is getting updated while already on the
holds shelf, it's important to also treat hold status 5 as an on-shelf
status.  Status 5 comes into play when the circ.hold_shelf_status_delay
org unit setting is activated and acts as a virtual status indicating
the item is physically en route to the shelf.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAcq: minor usability improvements to receiving copies from invoice
Lebbeous Fogle-Weekley [Wed, 2 Nov 2011 16:23:47 +0000 (12:23 -0400)]
Acq: minor usability improvements to receiving copies from invoice

1) Show an "X out of Y copies received" message near the top of the
display.

2) Provide a button to return to the primary interface for invoice view.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoStamping autosuggest upgrade script
Mike Rylander [Mon, 20 Feb 2012 19:24:49 +0000 (14:24 -0500)]
Stamping autosuggest upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAutoSuggest: prevent building a bad tsquery when user types leading spaces
Lebbeous Fogle-Weekley [Mon, 13 Feb 2012 19:57:39 +0000 (14:57 -0500)]
AutoSuggest: prevent building a bad tsquery when user types leading spaces

The problem used to bubble up and manifest as an Apache 500 error for
the user.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAutoSuggest: more UI tweaks regarding typing after selecting
Lebbeous Fogle-Weekley [Mon, 13 Feb 2012 19:37:18 +0000 (14:37 -0500)]
AutoSuggest: more UI tweaks regarding typing after selecting

Avoid highlighting text in the textbox part of the autosuggest widget,
so that if the user wants to type more after selecting a suggestion with the
arrow keys, s/he doesn't clobber the existing part.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAutoSuggest: Make directly clicking a suggestion initiate search
Lebbeous Fogle-Weekley [Mon, 13 Feb 2012 17:53:20 +0000 (12:53 -0500)]
AutoSuggest: Make directly clicking a suggestion initiate search

Formerly, I thought it best not to do this, so that users could choose a
suggestion and refine their search term further, but that put the
widget's behavior at odds with that of certain ubiquitous search
engines.

Users can still highlight a suggestion and press tab to modify their
search further before submitting, if they wish (and if they know this or
figure it out somehow).

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAutoSuggest
Lebbeous Fogle-Weekley [Fri, 27 Jan 2012 19:15:26 +0000 (14:15 -0500)]
AutoSuggest

Get an autocompleting dialog underneath basic search boxes.

If activated, the dialog appears in both the JavaScript OPAC and the Template
Toolkit OPAC.

Mike Rylander and Bill Erickson largely designed and spec'ed out this
feature, especially at the database level.  Lebbeous Fogle-Weekley and
Mike Rylander did the programming.

How it works, for site administrators
-------------------------------------

Once the code is installed, including database stored procedures,
(re)ingesting your bibliographic records will populate two new tables
needed by AutoSuggest: metabib.browse_entry and metabib.browse_entry_def_map.

Yes, for now this means that the size of your database in per-record terms
will be greater.  The browse_entry data we generate is extremely similar to
facet data, so it's possible that in the future we can blend them into the
same thing at the database level, and save some space.

To control what gets indexed in the metabib.browse_* tables, set the
boolean 'browse_field' column for each row in config.metabib_field as desired
Numbers 15 (keyword|keyword) and 16 (subject|complete) should generally be set
to false.

The config.metabib_class  table has a new 'bouyant'
column.  Setting this to true means that when a user is typing in the OPAC
search box with a search class selector set to, say, 'Subject', and the cmc row
for 'Subject' has 'bouyant' set to true, the top suggestions will definitely
come from the Subject fields of MARC records (if any).  'restrict' is like
'bouyant', only stronger.  In that case suggestions /only/ come from the
selected class.

This is the idea behind the 'restrict' column (in both the
config.metabib_class table and the config.metabib_field table):
For any given class or field, if restrict is true AND the user at the OPAC
has selected that same class or field from the search class dropdown, then
autosuggestions will only come from that class or field in the record.

You never want this column to be true for keyword, because we don't index
keywords for browse/autosuggest purposes (we would get giant blobs of
information as autosuggestions, and you don't want that (really)).

You don't really want it to be true for most classes and fields.
If the user sets the dropdown to "subject" and start typing "harry potter",
the user really wants matches from the "title" class too (although other
things being equal, matches from the "subject" class will rise to the top).

If you have a speciality index, you *may* want to set restrict to true
for that particular field.  For a song title index, for example.  To take
advantage of this, you would also have to customize your OPAC to have an
entry in the search class dropdown for 'title|songtitle' (or whatever's
appropriate for your specialty index).  This is easy to do and should be
covered somewhere in documentation for both the JSPAC and the TPAC.

The order of suggestions otherwise has mostly to do with how well what users
have typed matches what's in your bib records, and the value of the weight
column of the relevant config.metabib_field row.  Examine the code if you're
curious to know more or want to make adjustments.

The master on/off switch for AutoSuggest is a new row in in config.global_flag
named 'opac.use_autosuggest'.  Set its 'enabled' column to false to turn
off AutoSuggest.  If you don't want your suggestions to be limited to whatever's
OPAC visible at the search org, set the 'value' column to anything that
does not contain the string 'opac_visible'.  This could be a good idea
if AutoSuggest seems slow on a large site.

Turning this on means introducing Dojo in your TPAC.  I tried to
keep it minimal, for load time's sake.  There's no fieldmapper or IDL stuff
play.  For now, turning this feature off will avoid loading Dojo in your
TPAC.

Managing the little stuff
-------------------------
CSS classes that affect the look of suggestions are in this file for the TPAC:
    Open-ILS/web/css/skin/default/opac/style.css

and in this file for the JSPAC:
    Open-ILS/web/opac/skin/default/css/layout.css

At bottom, autosuggest is shaped by PostgreSQL's Full Text Search features.
Some of the arguments that are passed to TS_RANK_CD() and TS_HEADLINE() are
expoposed via options to the openils.widget.AutoSuggest and
openils.AutoSuggestStore modules, which have comments.  You can customize your
OPAC files to invoke these with your desired options without touching much
actual code.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoCorrect special winter handling in predictions
Dan Wells [Tue, 14 Feb 2012 16:09:41 +0000 (11:09 -0500)]
Correct special winter handling in predictions

The current serials prediction code has an exception for handling
cases where 'Winter 2010' is followed by 'Spring 2010' rather than
'Spring 2011'.  This exception assumed the more common case of a
combined subfield $y, e.g.:

$yps21,22,23,24

In doing so, it incorrectly handled less common cases where the $y
is listed separately:

$yps21$yps22$yps23$yps24

This change (with test data) ensures we only check the first $y
for our 'early winter' exception.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoEscape content when generating DTD for fieldmapper
Dan Scott [Thu, 16 Feb 2012 17:49:54 +0000 (12:49 -0500)]
Escape content when generating DTD for fieldmapper

Noticed by Thomas Berezansky, if a translation in a PO or POT file
contains an unescaped left angle bracket, a DTD will be generated that
contains the unescaped left angle bracket - and that isn't valid.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoVandelay record match sets: fix bug loading some trees
Lebbeous Fogle-Weekley [Tue, 14 Feb 2012 16:18:27 +0000 (11:18 -0500)]
Vandelay record match sets: fix bug loading some trees

Reported to me by Bill Erickson.  The Vandelay Record Match Sets
interface was failing to load some simple trees of match set points.

Example: http://pastesite.com/31643

The proximate symptom was this error message:

    Error: dojo.data.ItemFileReadStore: Invalid item argument.
    Source File: http://dev198.esilibrary.com/js/dojo/dojo/dojo.js
    Line: 119

but the root cause was a problem in dojoize_match_set_tree(), which
was failing to generate unique identifiers for each item in the data
store it's responsible for generating.

Since that function is only ever used to deal with trees where all the
nodes come from the database and have actual IDs, that function now uses
the database IDs as is rather than attempting to generate new ones.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoFix typos in lp820006 that broke clean schema creation user/dbs/cleanup_default_at_notices
Dan Scott [Tue, 14 Feb 2012 16:45:18 +0000 (11:45 -0500)]
Fix typos in lp820006 that broke clean schema creation

Backslashes to escape single quotes in SQL aren't cool.

Also, lists of rows to insert need commas as delimiters.

Also, needed a trailing "]" on the 90-day lost notice template.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix up 3-day courtesy notice with better title / author too
Dan Scott [Tue, 14 Feb 2012 16:12:19 +0000 (11:12 -0500)]
Fix up 3-day courtesy notice with better title / author too

Use the helper function to get better quality title/author out of the
target copy for pre-due notices.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoLP#820006: Action trigger notices fixes
Steven Callender [Tue, 2 Aug 2011 19:38:42 +0000 (19:38 +0000)]
LP#820006: Action trigger notices fixes

Cleaned up action triggers a little bit.

1. Added the editor param to the auto lost, because triggers will fail
without this.

2. Also removed the use of simple_records in some of the notices and
changed it to something more efficient.

3. Changed the use of total money owed to balance owed.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoTPac: facet display filtering and sorting
Bill Erickson [Wed, 4 Jan 2012 18:03:01 +0000 (13:03 -0500)]
TPac: facet display filtering and sorting

Provides the ability (via config.tt2) to define which facets should
display and the order of facet display.  The behavior is consistent with
the openils.widget.FacetSidebar Dojo class, used in JSPAC.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoBooking: make pick up interface show resources captured for reservation ...
Lebbeous Fogle-Weekley [Wed, 1 Feb 2012 23:11:52 +0000 (18:11 -0500)]
Booking: make pick up interface show resources captured for reservation ...

... even beyond the first day of the reservation.  I can think of no
reason why this limitation existed in the first place.

Also, just replace naive_start_of_day() with "today"

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoStream results from targetable holds list retrieval
Mike Rylander [Mon, 17 Oct 2011 16:27:04 +0000 (12:27 -0400)]
Stream results from targetable holds list retrieval

Tested and slightly modified patch from Mike R. to improve multi-session
hold targeting.  This patch includes an update to the targetable holds
API call to stream results instead of returning them in 1 big chunk,
which has been known to result in messages too large for jabber
(max_stanza_size).  hold_targer.pl is updated to handle the stream.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
12 years agoStamping upgrade for LP#928896
Bill Erickson [Wed, 8 Feb 2012 15:32:44 +0000 (10:32 -0500)]
Stamping upgrade for LP#928896

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoLP#928896 improve row estimate for action.usr_visible_circ_copies()
Galen Charlton [Wed, 8 Feb 2012 15:01:24 +0000 (10:01 -0500)]
LP#928896 improve row estimate for action.usr_visible_circ_copies()

Fixes problem where use of this function by the tagging circs in search
results feature can result in sequential scans of asset.call_number.

Thanks to Mike Rylander for the suggestion.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoJSON_v0 has been superseded, and it has insidious bugs anyway.
Lebbeous Fogle-Weekley [Fri, 27 Jan 2012 14:09:08 +0000 (09:09 -0500)]
JSON_v0 has been superseded, and it has insidious bugs anyway.

For example, you cannot round-trip this through JSON2js() and js2JSON()
in IE8: http://paste.lisp.org/display/127338

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTweak the opac-button elements to avoid blending with backgrounds
Michael Peters [Thu, 2 Feb 2012 16:58:01 +0000 (11:58 -0500)]
Tweak the opac-button elements to avoid blending with backgrounds

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoTweak style.css to bring facet headers into sync with color scheme
Michael Peters [Thu, 2 Feb 2012 15:27:35 +0000 (10:27 -0500)]
Tweak style.css to bring facet headers into sync with color scheme

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
12 years agoFix HoldIsAvailable validator
Thomas Berezansky [Wed, 1 Feb 2012 19:16:53 +0000 (14:16 -0500)]
Fix HoldIsAvailable validator

Depending on the environment some things may be ids or references.

Comparisons should try and use the IDs only, so pull the IDs out.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTPAC: Avoid hold placement problems à la 80d5c4a4
Lebbeous Fogle-Weekley [Wed, 1 Feb 2012 21:58:45 +0000 (16:58 -0500)]
TPAC: Avoid hold placement problems à la 80d5c4a4

A commit written in October and merged quickly (80d5c4a4) was designed
to avoid problems with a middle layer method that sometimes returns hash
refs and sometimes returns array refs.

A commit written in September but not merged until January (a663dfed)
affected neighboring code, but was not aware of the other code to dance
around hash refs and array refs (just read the commit messages of each
to see what I mean, with attention to the changes in
WWW/EGCatLoader/Account.pm).

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoRe-teach the clear shelf process "one copy"
Thomas Berezansky [Mon, 30 Jan 2012 22:15:44 +0000 (17:15 -0500)]
Re-teach the clear shelf process "one copy"

It got lost when fetching holds was abstracted out.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoUpgrade script finalization, adding new perm to database
Lebbeous Fogle-Weekley [Tue, 31 Jan 2012 19:56:56 +0000 (14:56 -0500)]
Upgrade script finalization, adding new perm to database

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoremove this old speedbump, which now lies
Jason Etheridge [Thu, 5 Jan 2012 22:40:48 +0000 (17:40 -0500)]
remove this old speedbump, which now lies

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoImprove COPY_DELETE_WARNING event handling
Jason Etheridge [Thu, 5 Jan 2012 22:26:06 +0000 (17:26 -0500)]
Improve COPY_DELETE_WARNING event handling

Make it overridable in copy buckets, and let Cancel on perm denied dialog fail gracefully.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoUse the restrict_copy_delete field on copy status
Jason Etheridge [Thu, 5 Jan 2012 22:23:39 +0000 (17:23 -0500)]
Use the restrict_copy_delete field on copy status

to determine when to throw a COPY_DELETE_WARNING event

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoAdd upgrade script for config.copy_status.restrict_copy_delete.
Jason Stephenson [Wed, 12 Oct 2011 13:38:53 +0000 (09:38 -0400)]
Add upgrade script for config.copy_status.restrict_copy_delete.

Adds the column to the config.copy_status table.

Updates the "magical" statues (1,3,6,8) to have restrict_copy_delete
set to TRUE.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoAdd restrict_copy_delete field to config.copy_status.
Jason Stephenson [Wed, 12 Oct 2011 13:19:49 +0000 (09:19 -0400)]
Add restrict_copy_delete field to config.copy_status.

Add the column definition in 002.schema.config.sql.
Add the field to the class ccs in fm_IDL.xml.
Set the restrict_copy_delete column to true for the "magical"
statuses (1,3,6,8) in 950.data.seed-values.sql.
Add restrict_delete as essential column to config.copy_status in
OpenILS::Application::Storage::CDBI::config

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
12 years agoHandle search timeouts more gracefully
Jason Etheridge [Thu, 19 Jan 2012 22:01:22 +0000 (17:01 -0500)]
Handle search timeouts more gracefully

Another tweak courtesy of berick

Returns 0 results if open-ils.storage timeouts instead of a nasty uncaught
undefined ARRAY exception resulting in an OPAC "spinning wheel of death"
(formerly the "green knight rider bar of death".

Note that in the event of storage timeouts, you should tune and/or beef-up
your database.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoExample Evergreen rsyslog configuration file
Bill Erickson [Wed, 23 Nov 2011 15:23:58 +0000 (10:23 -0500)]
Example Evergreen rsyslog configuration file

This differs from the OpenSRF sample configuration by adding a log file
for Postgres and by changing the log path to /var/log/evergreen

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoTPac: Avoid long-running, unintended empty searches
Bill Erickson [Mon, 23 Jan 2012 20:00:45 +0000 (15:00 -0500)]
TPac: Avoid long-running, unintended empty searches

If a page that executes a search is accessed with no viable search
query, cut the search short to avoid meaningless, long-running searches.
This primarily affects direct links to record detail pages.  For
example:

http://example.org/eg/opac/record/123

The RD page attempts to load the currrently active search (for paging) and,
if there is no query, will search for strings like 'site(BR1) depth(2)',
which are unintended and quite slow, which delays page rendering.

---

While we're in there, let's silence the following Apache error log
warning by ensuring that int() gets a value.

Use of uninitialized value in int at
/usr/local/share/perl/5.10.1/OpenILS/WWW/EGCatLoader/Search.pm line 192.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoTPac: avoid SMS org setting check for non-SMS pages
Bill Erickson [Mon, 23 Jan 2012 22:04:01 +0000 (17:04 -0500)]
TPac: avoid SMS org setting check for non-SMS pages

Avoid an unnecessary org unit setting lookup on a large swath of
(mostly myopac) pages.  Instead, check to see if the current page is the
SMS page in question and the lookup is necessary before making the
lookup.

This change also inserts the physical location as the first org unit to
use in the org setting test.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoMissed increment in 002.schema.config.sql for last commit
Lebbeous Fogle-Weekley [Tue, 31 Jan 2012 19:21:01 +0000 (14:21 -0500)]
Missed increment in 002.schema.config.sql for last commit

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>