8 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 <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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

Signed-off-by: Dan Scott <>
8 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 <>
Signed-off-by: Michael Peters <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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 <>
8 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 <>
8 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 <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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.

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 <>
Signed-off-by: Dan Scott <>
8 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 <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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

Signed-off-by: Dan Scott <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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 <>
Signed-off-by: Jason Stephenson <>
Signed-off-by: Dan Wells <>
8 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 <>
Signed-off-by: Jason Stephenson <>
8 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 <>
8 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

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

Signed-off-by: Bill Erickson <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Jason Stephenson <>
Signed-off-by: Mike Rylander <>
8 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 <>
8 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 <>
Signed-off-by: Jason Stephenson <>
Signed-off-by: Mike Rylander <>
8 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

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 <>


Signed-off-by: Jason Stephenson <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Bill Erickson <>
8 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 <>
8 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 <>
Signed-off-by: Bill Erickson <>
8 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 <>
Signed-off-by: Ben Shum <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Mike Rylander <>
8 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

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

Signed-off-by: Lebbeous Fogle-Weekley <>
Signed-off-by: Mike Rylander <>
8 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 <>
8 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 <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Mike Rylander <>
8 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

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 <>
Signed-off-by: Mike Rylander <>
8 years agoAutoSuggest
Lebbeous Fogle-Weekley [Fri, 27 Jan 2012 19:15:26 +0000 (14:15 -0500)]

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

Managing the little stuff
CSS classes that affect the look of suggestions are in this file for the TPAC:

and in this file for the JSPAC:

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 <>
Signed-off-by: Mike Rylander <>
8 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.:


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


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

Signed-off-by: Dan Wells <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Thomas Berezansky <>
8 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.


The proximate symptom was this error message:

    Error: Invalid item argument.
    Source File:
    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 <>
Signed-off-by: Bill Erickson <>
8 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 <>
8 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 <>
8 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 <>
Signed-off-by: Dan Scott <>
8 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 <>
Signed-off-by: Jason Stephenson <>
Signed-off-by: Mike Rylander <>
8 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 <>
Signed-off-by: Mike Rylander <>
8 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). is updated to handle the stream.

Signed-off-by: Bill Erickson <>
Signed-off-by: Galen Charlton <>
8 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 <>
8 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 <>
Signed-off-by: Bill Erickson <>
8 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:

Signed-off-by: Lebbeous Fogle-Weekley <>
Signed-off-by: Bill Erickson <>
8 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 <>
Signed-off-by: Dan Wells <>
8 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 <>
Signed-off-by: Dan Wells <>
8 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 <>
Signed-off-by: Bill Erickson <>
8 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

Signed-off-by: Lebbeous Fogle-Weekley <>
Signed-off-by: Thomas Berezansky <>
8 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 <>
Signed-off-by: Bill Erickson <>
8 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 <>
8 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 <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 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 <>
8 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 <>
8 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 <>
Signed-off-by: Jason Etheridge <>
8 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
Add restrict_delete as essential column to config.copy_status in

Signed-off-by: Jason Stephenson <>
Signed-off-by: Jason Etheridge <>
8 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 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 <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 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 <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 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

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/ line 192.

Signed-off-by: Bill Erickson <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 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

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

Signed-off-by: Bill Erickson <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 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 <>
8 years agoACQ: remove piles of unused cancel_reasons
Bill Erickson [Thu, 20 Oct 2011 13:06:20 +0000 (09:06 -0400)]
ACQ: remove piles of unused cancel_reasons

There is a large set of of acq.cancel_reason's in Evergreen that come
from the EDI spec and will never be used in practice.  Since there are
scenarios where cancel reasons are manually chosen by staff, let's
remove all of the extras so the process of selecting a cancel reason is
not so fraught with "Poultry" and "Airline attendants", etc.

Signed-off-by: Bill Erickson <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 years agoTPAC: Cleaner title display in simple and detailed views
Dan Scott [Sun, 22 Jan 2012 21:34:31 +0000 (16:34 -0500)]
TPAC: Cleaner title display in simple and detailed views

The TPAC uses a simple 245a display for the "simple view" in search
results, so records like the concerto.sql "Violin concerto no. 3 in G,
K. 216 ;" display with a trailing semicolon that is rather

Similarly, the subfields in the extended title as displayed in the
record detail view was simply concatenating subfields together. This
resulted in titles like:

Violin concerto no. 3 in G, K. 216 ;Sinfonia ...

rather than:

Violin concerto no. 3 in G, K. 216 ; Sinfonia ...

This commit strips trailing punctuation that suggests a continuation
(:;/) from the brief title and joins the subfields with a space for the
extended title.

Also, enable the detailed view in search results to display the complete

Signed-off-by: Dan Scott <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 years agoIncrease the year in copyright statements to 2012
Michael Peters [Mon, 30 Jan 2012 18:39:45 +0000 (13:39 -0500)]
Increase the year in copyright statements to 2012

Signed-off-by: Michael Peters <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 years agoFix fm_IDL.xml validation errors
Thomas Berezansky [Tue, 24 Jan 2012 15:13:37 +0000 (10:13 -0500)]
Fix fm_IDL.xml validation errors

From 80+ errors to 0!

Remove empty permacrud blocks (and pcrud controllers).

Adds missing attributes, updates xsd to include in-use attributes.

Fixes incomplete attribute names and the occasional typoed name.

Also re-orders some chunks that are controlled by xs:sequence.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Lebbeous Fogle-Weekley <>
8 years agoFix "prefered_language" typo that blocked preferred language
Dan Scott [Sun, 22 Jan 2012 16:42:08 +0000 (11:42 -0500)]
Fix "prefered_language" typo that blocked preferred language

"preferred_language" is used everywhere else, but in the crucial core of the "prefered_language" variant is used to check on the value
- hence, nothing other than the default "eng" is being used. Fix that.

Signed-off-by: Dan Scott <>
Signed-off-by: Mike Rylander <>
8 years agoFix "Add Volumes" entry in "Actions for this Record" menu
Jason Stephenson [Mon, 30 Jan 2012 21:38:34 +0000 (16:38 -0500)]
Fix "Add Volumes" entry in "Actions for this Record" menu

A typo in Open-ILS/xul/staff_client/chrome/content/cat/opac.js (cbdObj
instead of cbsObj) led to the exception "Reference error: cbdObj is not
defined" being thrown any time the "Add Volumes" entry was chosen.

Signed-off-by: Jason Stephenson <>
Signed-off-by: Dan Scott <>
8 years agoMerge remote branch 'working/user/dbs/fix-nonfiling-titles'
Lebbeous Fogle-Weekley [Mon, 30 Jan 2012 22:16:08 +0000 (17:16 -0500)]
Merge remote branch 'working/user/dbs/fix-nonfiling-titles'


Signed-off-by: Lebbeous Fogle-Weekley <>
8 years agoFix "Clear Shelf Expired Holds" checkin modifier
Thomas Berezansky [Mon, 30 Jan 2012 15:09:17 +0000 (10:09 -0500)]
Fix "Clear Shelf Expired Holds" checkin modifier

By not looking up empty arrays there either.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Bill Erickson <>
8 years agoFix SIP2 "unavailable holds" check
Thomas Berezansky [Mon, 30 Jan 2012 13:52:37 +0000 (08:52 -0500)]
Fix SIP2 "unavailable holds" check

If no IDs, don't look up an empty array of IDs.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Bill Erickson <>
8 years agoMerge branch 'master' of
Dan Wells [Fri, 20 Jan 2012 22:58:01 +0000 (17:58 -0500)]
Merge branch 'master' of

8 years agoModifications to the TTPac color scheme to be more with logo guidelines
Michael Peters [Fri, 20 Jan 2012 22:49:16 +0000 (17:49 -0500)]
Modifications to the TTPac color scheme to be more with logo guidelines

Tweaked the buttons, gradients, etc. in TTPac to eradicate the blue/grey elements.
Began with the Evergreen Logo's official color (Pantone 340 as found at
and complimented the colors accordingly, replacing dark blues with dark greens, light blues with light greens, etc.

This also adds two new selectors in styles.css to control the logo placement.  Logos were also centered on the page, rather than being crowded
into neighboring elements.

Signed-off-by: Michael Peters <>
Fixed Conflicts:


Signed-off-by: Dan Wells <>
8 years agoFix self-fetching callnumber columns
Jason Etheridge [Mon, 9 Jan 2012 20:18:15 +0000 (15:18 -0500)]
Fix self-fetching callnumber columns

The callnumber (and related) columns from circ.util.columns() is meant to
retrieve call number objects if given call number id's instead of objects,
but there was a bug preventing that.

This fixes LP#906523, no call number information in billing interface

Signed-off-by: Jason Etheridge <>
Signed-off-by: Bill Erickson <>
8 years agoAcq fix for LP#901378
James Fournie [Wed, 7 Dec 2011 19:27:45 +0000 (11:27 -0800)]
Acq fix for LP#901378

Proratable invoice charges do not have a fund_debit, we need to check for
this before attempting to delete the charge.  If there's no fund_debit
we can generally assume that there's no corresponding debit to this charge
and skip trying to delete it.

Signed-off-by: James Fournie <>
Signed-off-by: Bill Erickson <>
8 years agoStamping upgrade for copy_location_alert
Bill Erickson [Fri, 20 Jan 2012 20:07:25 +0000 (15:07 -0500)]
Stamping upgrade for copy_location_alert

Signed-off-by: Bill Erickson <>
8 years agoAdd Checkin Alert to Copy Locations
Thomas Berezansky [Wed, 18 Jan 2012 16:28:13 +0000 (11:28 -0500)]
Add Checkin Alert to Copy Locations

If enabled bring up a ROUTE TO prompt for the location at reshelving time.

Also, while at it, add Prefix/Suffix to the "new" section of the editor.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Bill Erickson <>
8 years agoRemove RELEASE_NOTES reference from README
Bill Erickson [Fri, 20 Jan 2012 19:58:05 +0000 (14:58 -0500)]
Remove RELEASE_NOTES reference from README

...pending further discussion

Signed-off-by: Bill Erickson <>
8 years agoRelease Notes: Add CC-BY-SA 3.0 license to footer
Dan Scott [Fri, 23 Dec 2011 17:57:37 +0000 (12:57 -0500)]
Release Notes: Add CC-BY-SA 3.0 license to footer

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoRelease notes: document copy location display option
Dan Scott [Fri, 23 Dec 2011 17:55:34 +0000 (12:55 -0500)]
Release notes: document copy location display option

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoRelease notes: document new reporting views
Dan Scott [Wed, 21 Dec 2011 16:56:55 +0000 (11:56 -0500)]
Release notes: document new reporting views

Introduce 'Last Circulation or Creation Date' and 'Hold/Copy Ratio per Bib
and Pickup Library' reporting sources.

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoMove RELEASE_NOTES into the docs subdirectory
Dan Scott [Tue, 20 Dec 2011 16:54:30 +0000 (11:54 -0500)]
Move RELEASE_NOTES into the docs subdirectory

We will begin maintaining release notes inside the source directory,
with one RELEASE_NOTES.txt file per major release series (2.2, 2.3,
etc). The release notes will primarily consist of an overview of new
features and important behaviour changes in that particular release
series, as well as a cumulative list of bugs that have been fixed in the
point releases for that series.

Also, mention the existence of the release notes in the top-level

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoRelease notes: "cbs prevents records from having copies"
Dan Scott [Mon, 5 Dec 2011 18:56:36 +0000 (13:56 -0500)]
Release notes: "cbs prevents records from having copies"

The new "can_have_copies" column on config.bib_source prevents
associated records from having copies or MFHD records attached via the
staff client.

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoNote located URI changes in Release Notes
Dan Scott [Tue, 29 Nov 2011 20:11:55 +0000 (15:11 -0500)]
Note located URI changes in Release Notes

Located URIs now define what org unit and below in the hierarchy will be
matched for a given search scope, rather than the copy-like behaviour
from before; for example, a located URI at BR1 will no longer be found
in a SYS1 search scope; rather, a located URI at SYS1 will be found with
either a SYS1 or a BR1 search scope.

Put some info and rough suggested fix into the release notes.

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoMake Delete User failure overridable
Jason Etheridge [Wed, 11 Jan 2012 03:15:31 +0000 (22:15 -0500)]
Make Delete User failure overridable

Make mrpeter's new ACTOR_USER_DELETE_OPEN_XACTS event overridable to preserve
existing functionality (the delete user code will wipe out all transactions if
allowed to, and will leave copy statuses as "Checked Out" if needed, which is
okay in EG even if there aren't corresponding circ records--some libraries
migrate data like this if the information available is sparse).

So if you want to be able to do this without a super user, you'll need to create
an ACTOR_USER_DELETE_OPEN_XACTS.override perm and assign it to perm groups
and/or users.

Signed-off-by: Jason Etheridge <>
Signed-off-by: Bill Erickson <>
8 years agowhitespace
Jason Etheridge [Wed, 11 Jan 2012 02:54:37 +0000 (21:54 -0500)]

Signed-off-by: Jason Etheridge <>
Signed-off-by: Bill Erickson <>
8 years agoLP872862, delete user function and open xacts
Michael Peters [Wed, 12 Oct 2011 15:46:12 +0000 (11:46 -0400)]
LP872862, delete user function and open xacts

Prevent deletion of a user with open circulations or unpaid bills
Link up an error message on attempt to delete a patron with open xacts

Signed-off-by: Michael Peters <>
Signed-off-by: Jason Etheridge <>
Signed-off-by: Bill Erickson <>
8 years agoPrevent extra closing tag in TPAC results list
Dan Wells [Thu, 19 Jan 2012 19:05:15 +0000 (14:05 -0500)]
Prevent extra closing tag in TPAC results list

Trivial change to prevent an extra yet currently harmless </tr>
closing tag from appearing when ChiliFresh is enabled.

Signed-off-by: Dan Wells <>
8 years agoTPAC: Regular justification of columns in search result
Dan Scott [Mon, 9 Jan 2012 02:04:37 +0000 (21:04 -0500)]
TPAC: Regular justification of columns in search result

The search results page was constituted via a table, enclosing one table
per row for each result, enclosing one further table per result for the
attributes such as call number / publisher / edition that have been
chosen to be displayed in the simple and detailed views.

The column widths for each search result row were being calculated per
result, with the effect that title columns were starting at different
offsets - a rather unpolished effect.

By eliminating the middle table, we can let the widths be determined by
all of the search result rows together, providing a normalized result as
the HTML deities intended.

We also move some inline CSS into style.css.

Note that IE 7, at least, ignores the :nth-child() usage to deliver the
borders; because we no longer wrap the set of rows (including optional
Content Cafe and ChiliFresh rows) in an intermediate table, we had to
switch to a border-top attribute. We could have gone with a straight "tr
> td" approach, but that would have added a line at the top of the first
result, which looked weird. Still an option if one really wants to.

Signed-off-by: Dan Scott <>
Signed-off-by: Dan Wells <>
8 years agoTPAC: Simply record summary navigation markup
Dan Scott [Sun, 8 Jan 2012 22:53:03 +0000 (17:53 -0500)]
TPAC: Simply record summary navigation markup

Currently we have the next / previous links on the far right side of the
record summary page, whereas the "Showing item # of #" is on the left
hand side of the page. On wide screens, this leads to a large gap
between the two informational elements. In addition, as the elements are
floated, the vertical alignment is thrown off if you attempt to bring
them together.

The solution is to group the elements inside a SPAN with inline-block
displays for the embedded DIVs. This enables the elements to reflow
appropriately on mobile sized screens while keeping the alignment clean.
In addition, some inline style gets moved to style.css and some
unnecessary elements are removed.

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoTPAC: Improve copy display in record summary
Dan Scott [Sun, 8 Jan 2012 21:14:29 +0000 (16:14 -0500)]
TPAC: Improve copy display in record summary

In the copy counts, offer a link to display the copies at parent
libraries that have available copies. For example, if you are browsing
at BR1 and there are no available copies, but you see that SYS1 has
available copies, clicking "(Show)" beside the SYS1 available copy count
will change the search scope to SYS1 and display the copies for BR1 and

Also, avoid displaying the copy table header if there are no physical
copies to display (for example, if there are located URIs that make the
copy show up in search results).

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoPrevent expand and cnoffset params from propagating
Dan Scott [Mon, 9 Jan 2012 02:43:58 +0000 (21:43 -0500)]
Prevent expand and cnoffset params from propagating

The expand and cnoffset params in record summary might result in
unexpected behaviour if allowed to propagate by default, as mkurl()
enables, so stop them in their tracks.

Also, fix an overenthusiastic URI-encoding of subjects that led to a
space getting doubly-encoded (and thereby breaking searches).

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoTPAC: Preserve loc, query, qtype, and sort params
Dan Scott [Fri, 6 Jan 2012 03:51:00 +0000 (22:51 -0500)]
TPAC: Preserve loc, query, qtype, and sort params

In some cases, mkurl() is not enough to preserve our desired CGI params
- such as when redirects are triggered from within a Perl module, or
forms are submitted. Accordingly, the following changes address these
cases where the chosen location / query / query type was being dropped:

* Switching between account preferences
* Creating / deleting / sharing / editing bookbags
* Moving items from temporary list to bookbags
* Adding notes to items in a bookbag
* Placing holds

The primary mechanism for forms is the "preserve_params.tt2" block that
can accept a "params" list of the CGI params that you want to preserve,
but which defaults to location/query/qtype/sort. Similarly, we add the
same preservation steps to the OpenILS::WWW::EGCatLoader::Account module
for most actions.

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoTPAC: Propagate CGI params via mkurl()
Dan Scott [Thu, 29 Dec 2011 05:11:25 +0000 (00:11 -0500)]
TPAC: Propagate CGI params via mkurl()

Fix many instances where params such as "loc" are dropped during a
normal workflow, resulting in unexpected changes to the user's chosen
search scope. mkurl() preserves the existing CGI params by default
and passes them on to the created URL; for now we err on the side of
caution (preserving all params) rather than filtering any out. Manual
testing suggests this does not introduce any problems, and resolves

Signed-off-by: Dan Scott <>
Signed-off-by: Bill Erickson <>
8 years agoDon't show estimated wait for negative estimates
Thomas Berezansky [Tue, 17 Jan 2012 16:13:15 +0000 (11:13 -0500)]
Don't show estimated wait for negative estimates

JSPac code was just checking for the truth of the estimated_wait return,
but the estimated_wait return can be -1 under some circumstances.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Bill Erickson <>
8 years agoRepaired JS syntax errors in nls/selfcheck.js
Bill Erickson [Tue, 17 Jan 2012 16:53:03 +0000 (11:53 -0500)]
Repaired JS syntax errors in nls/selfcheck.js

Fixed errors introduced by a727a91b26716a0df36c93c7962240bec231c180

Signed-off-by: Bill Erickson <>
8 years agoTPac: Easy access to item status
Thomas Berezansky [Sat, 14 Jan 2012 16:42:55 +0000 (11:42 -0500)]
TPac: Easy access to item status

Change item barcodes into item status links in TPac listings.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Bill Erickson <>
8 years agoAllow choice of placing hold despite age protect
Thomas Berezansky [Tue, 20 Sep 2011 14:27:51 +0000 (10:27 -0400)]
Allow choice of placing hold despite age protect

This alters the backend to watch when so much as one copy failed only due
to age protection. If so, a flag is set and returned back up the calling
tree for examination.

In JSPac when the flag is set an alternate confirm message is shown.

In TTPac when the flag is set the failure message is changed and override
is always allowed for the hold in question.

Signed-off-by: Thomas Berezansky <>
Signed-off-by: Mike Rylander <>