working/Evergreen.git
12 years agoTpac: better "HTML view" for shared lists under "my lists" user/senator/tpac-bookbag-viewer
Lebbeous Fogle-Weekley [Tue, 15 Nov 2011 06:50:00 +0000 (01:50 -0500)]
Tpac: better "HTML view" for shared lists under "my lists"

From the "my lists" interface, you get a link labeled "HTML View" for
any shared lists, and this link, while meant to be shared, just
gives you a search results page where the only search term is simply "in
the given list."

This commit makes the search results page a little smarter in that case,
in order to
    a) show you the bookbag metadata, including name, description and
        item notes.
    b) allow you to keep searching *within* your list, until you don't
        want to anymore, at which point there's a checkbox you can uncheck.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoFix shelf_expire_time closed date overlap test
Jason Etheridge [Sat, 7 Jan 2012 02:02:06 +0000 (18:02 -0800)]
Fix shelf_expire_time closed date overlap test

One-liner courtesy of berick.

* Steps to test

This is time and timezone sensitive, so on the server:

Change your timezone to America/Los Angeles: sudo dpkg-reconfigure tzdata
Stop your NTP server: sudo /etc/init.d/ntp stop
Set the time to 5pm: sudo date --set 17:00:00

Stop Evergreen, Restart Postgres, Start Evergreen

On the client:

Make sure the timezone is set to Pacific time.

1) Change the Library Setting "Default hold shelf expire interval" in the Holds group to have a value of "7 days" (without the quotes) for org BR1 (or if there is an existing value, you can keep it).

2) Create a bib with one item: htest1  (Status of Available)

3) Place a title level hold on the bib

4) Check in htest1 (it should get captured for the hold)

5) Browse the Hold Shelf and note the Shelf Expire Time for the hold that captured htest1 (it should be a week from now, unless you already have a conflicting closed date configured)

6) Cancel the hold and re-check-in htest1 (to remove the Hold Shelf status)

7) In the Closed Dates Editor, Add Single Day Closing for the date noticed previously in the Shelf Expire Time for BR1.

8) Place a title level hold on the bib

9) Check in htest1 (it should get captured for the hold)

10) Browse the Hold Shelf and note the Shelf Expire Time for the hold that captured htest1 (now the bug is illustrated if you get the same date for Shelf Expire Time as you did before, since that day is now a Closed Date and should be skipped over.  The patch should fix this.)

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoMajor enhancements to openils.widget.PCrudFilterDialog
Lebbeous Fogle-Weekley [Mon, 9 Jan 2012 19:45:04 +0000 (14:45 -0500)]
Major enhancements to openils.widget.PCrudFilterDialog

openils.widget.PCrudFilterDialog is (now) a dijit that allows users to define
inclusionary filters based on any number of rows that specify a field
from a given fieldmapper class, an operator, and a value (or range of
values, for the [not] between operator).  The resulting filter is
suitable for use as the where clause of a pcrud search call.

AutoGrid has an option, showLoadFilter, that allows you to easily
provide a filter dialog in any AutoGrid-based interface, with some minor
caveats (see the comments at the top of the source for
openils.widget.PCrudFilterDialog).  AutoGrid will also pass along the
suppressFilterFields option, which works analagously to the
suppressEditFields option.  You can also build your own interfaces to
use this dijit without AutoGrid, if desired.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoMore aggressive recalc of standing penalties
Jason Etheridge [Tue, 3 Jan 2012 20:46:25 +0000 (15:46 -0500)]
More aggressive recalc of standing penalties

In the staff client, the Refresh button in the patron display will explicitly
ask the server to recalculate standing penalties for the patron. Other automatic
refresh-like behavior meant to synchronize parts of the patron display will not
do this.

This change tweaks the logic to ask for a recalculation with all refresh-like
behavior in the patron display, and will catch such things as staff changing the
user's permisssion profile.

An example of how you might test this:

Admin -> Local Administration -> Group Penalty Thresholds

New Penalty Threshold

Group: Volunteers
Org Unit: CONS
Penalty: PATRON_EXCEEDS_FINES
Threshold: 1

Save

Register user with Profile of Patrons

Load patron, Bills, Bill Patron, Amount: 5, Submit this Bill

Edit

Main (Profile) Permission Group: Volunteers, Save

The interface should refresh and show a Maximum Bills penalty in the patron
summary.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoSETVAL the permission.grp_tree sequence after adding pinned IDs
Dan Scott [Thu, 29 Dec 2011 18:46:24 +0000 (13:46 -0500)]
SETVAL the permission.grp_tree sequence after adding pinned IDs

If we do not update the associated sequence after adding pinned IDs,
sites will be unable to add new permission groups until enough attempts
have failed. Let's bypass that little bit of pain.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoPrevent permission group conflicts in 2.1 upgrade script
Dan Scott [Thu, 29 Dec 2011 18:33:38 +0000 (13:33 -0500)]
Prevent permission group conflicts in 2.1 upgrade script

The 2.0-2.1 upgrade script relies on pinned IDs for permission.grp_tree
entries, which might conflict with custom permission groups that a site
might have added previously. A little manipulation can make life safe
for the pinned IDs.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoMaking the user profile selector disabled rather than readonly
James Fournie [Wed, 16 Nov 2011 00:56:16 +0000 (16:56 -0800)]
Making the user profile selector disabled rather than readonly
in the case of a user editing their own account.  This prevents
a nasty bug whereby Dojo widgets with the readOnly flag set
become labels and therefore do not correctly hold a 'value'
like a normal form widget.  See LP#806625 for details.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoPrevent null 852 $a in marc_export
Dan Scott [Wed, 30 Nov 2011 04:09:47 +0000 (23:09 -0500)]
Prevent null 852 $a in marc_export

852 $a is supposed to correspond to the institution holding the item
from which access is given, according to the MARC Format for Holdings
Data specification. As the org unit shortnames typically don't
correspond to one of the MARC Code List for Organization entries, we've
assumed that users will define the --location parameter; however, if
that parameter isn't defined, the empty string is used and an empty
subfield is generated. This, in turn, makes other MARC-parsing tools
unhappy. So, only generate an 852 $a if we have an actual value for the
--location parameter.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoPlaceholder upgrade script for late-backport of a fix for 2.0
Mike Rylander [Mon, 9 Jan 2012 20:53:28 +0000 (15:53 -0500)]
Placeholder upgrade script for late-backport of a fix for 2.0

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoA/T Event Revalidation shouldn't change event states from complete to found
Lebbeous Fogle-Weekley [Thu, 5 Jan 2012 23:39:07 +0000 (18:39 -0500)]
A/T Event Revalidation shouldn't change event states from complete to found

Ideally, revalidation should be guaranteed not to change anything about
the event itself at the database level, but I'm not sure we're there
yet.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoStamping upgrade script for current_shelf_lib
Mike Rylander [Mon, 9 Jan 2012 18:49:40 +0000 (13:49 -0500)]
Stamping upgrade script for current_shelf_lib

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoMerge remote-tracking branch 'eg-working/user/berick/hold-current-shelf-lib'
Mike Rylander [Mon, 9 Jan 2012 18:44:16 +0000 (13:44 -0500)]
Merge remote-tracking branch 'eg-working/user/berick/hold-current-shelf-lib'

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoLP#845763 remote added content breaks
Jason Etheridge [Mon, 26 Sep 2011 18:40:19 +0000 (14:40 -0400)]
LP#845763 remote added content breaks

remote added content breaks when using locally served content

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoWrap upgrade script for archivable stat cats
Dan Scott [Thu, 5 Jan 2012 22:37:55 +0000 (17:37 -0500)]
Wrap upgrade script for archivable stat cats

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoCirc Statistical Archiving
Thomas Berezansky [Sat, 17 Sep 2011 18:49:16 +0000 (14:49 -0400)]
Circ Statistical Archiving

Copy Location

Instead of only archiving the copy location with aged circs, do so with all
circs, using the copy location at time of circ. This allows for running of
reports on the copy location even after the item is no longer in it.

Statistical Categories

Add a flag to statistical categories to allow them to be archived with all
circulations (at checkout). Reports can then be run on regular and aged
circulations based on the contents of the statistical categories.

This patch was inspired by Tim Spindler's submission to
https://bugs.launchpad.net/evergreen/+bug/798255 - thanks Tim!

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix summary.tt2 openurl block
Thomas Berezansky [Thu, 5 Jan 2012 19:24:16 +0000 (14:24 -0500)]
Fix summary.tt2 openurl block

The extra if was likely added to fix a problem with a missing ;

The missing ; was put back, but the extra if then became a problem.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoMerge remote-tracking branch 'working/user/artunit/resolver_resolver_timeout_2012_01_...
Dan Scott [Thu, 5 Jan 2012 17:01:27 +0000 (12:01 -0500)]
Merge remote-tracking branch 'working/user/artunit/resolver_resolver_timeout_2012_01_05' into dbs/resolver_resolver_timeout_2012_01_05

12 years agoTeach .gitignore about more built locale fileso
Dan Scott [Thu, 5 Jan 2012 05:45:19 +0000 (00:45 -0500)]
Teach .gitignore about more built locale fileso

Running a complete build of locales resulted in a lot of new, unwanted
files in "git status". Hide them.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoRemove vandelay.dtd from i18n Makefile and dirs
Dan Scott [Thu, 5 Jan 2012 05:49:10 +0000 (00:49 -0500)]
Remove vandelay.dtd from i18n Makefile and dirs

Back in 46e233722f9d1ccec1bd97816bb055caa12f8096, vandelay.dtd was
removed in favour of the inline Template Toolkit localizations - so pull
vandelay.dtd references out of the i18n Makfile to avoid corresponding
errors.

Remove vandelay POT and PO files as well.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAdd language update script for Launchpad -> Evergreen
Dan Scott [Thu, 5 Jan 2012 04:57:00 +0000 (23:57 -0500)]
Add language update script for Launchpad -> Evergreen

Launchpad uses different names for locales than we do in Evergreen, and
we want to only update translations that are actually new or have
changed in Launchpad, so dump some intelligence into a script that can
help us with that work.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoUpdate translations from Launchpad
Dan Scott [Thu, 5 Jan 2012 04:18:08 +0000 (23:18 -0500)]
Update translations from Launchpad

Created using the fancy new update_pofiles script. Huzzah!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoResolver: Fix method signature for deleting cache entries user/artunit/resolver_resolver_timeout_2012_01_05
Dan Scott [Thu, 22 Dec 2011 22:42:03 +0000 (17:42 -0500)]
Resolver: Fix method signature for deleting cache entries

The order of arguments was incorrect and also contained an unnecessary
entry for the open-ils.resolver.delete_cached_holdings method signature.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art <artrhyno@uwindsor.ca>
12 years agoOpenURL resolution in TPAC - further cleanup
Dan Scott [Thu, 22 Dec 2011 22:13:29 +0000 (17:13 -0500)]
OpenURL resolution in TPAC - further cleanup

We appear to be getting one null or empty value in the args.issns array,
which was causing spurious lookups of null ISSNs, so skip the entry if
it is an empty string.

Also, switch from the product-specific "sfx" variable name to the
product-neutral "openurls" as we have CUFTS in the mix these days.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art <artrhyno@uwindsor.ca>
12 years agoMake resolver HTTP timeout setting implementation neutral
Dan Scott [Thu, 22 Dec 2011 21:08:07 +0000 (16:08 -0500)]
Make resolver HTTP timeout setting implementation neutral

Rather than exposing the underlying mechanism (LWP) for the HTTP
request via the "lwp_timeout" setting, use "request_timeout" so that if
we switch to a different HTTP library the setting name doesn't
contradict it.

Also, add an example setting to opensrf.xml.example.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art <artrhyno@uwindsor.ca>
12 years agoTimeout for resolver interactions
Art Rhyno [Thu, 15 Dec 2011 01:13:30 +0000 (20:13 -0500)]
Timeout for resolver interactions

These changes add some timeout options for using the resolver
setup. For example:

request open-ils.resolver open-ils.resolver.resolve_holdings "issn", \
    "0013-0618", "http://sfx.scholarsportal.info/windsor", 10

where "10" is the number of seconds for a timeout. A default timeout can be
specified in the opensrf.xml file in the ResolverResolver section as well:

<lwp_timeout>30</lwp_timeout>

from TPAC, a request can be also include a timeout option:

[% IF openurl.enabled == 'true';
    FOR issn IN args.resolver_issns;
      resolver = ResolverResolver.resolve_issn(issn, openurl.baseurl,20);
          FOR res IN resolver;
%]

where "20" is the number of seconds for a timeout.

In working through this, I found some bugs in my resolver collection
code in misc_util.tt2 for isbns which I have addressed.

Signed-off-by: Art Rhyno <artrhyno@uwindsor.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Art <artrhyno@uwindsor.ca>
12 years agoUse hold current shelf lib to determine availability : opac sorting user/berick/hold-current-shelf-lib
Bill Erickson [Wed, 28 Dec 2011 20:44:36 +0000 (15:44 -0500)]
Use hold current shelf lib to determine availability : opac sorting

The availability of a hold can now be determined by
hold.current_shelf_lib == hold.pickup_lib.

This change uses the new hold availability test to sort available
holds to front/top of a patron's holds list (for the OPAC).

Affects open-ils.circ.holds[.canceled|id_list].retrieve

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTeach cstore et al about predicate-style truth tests in ORDER BY clauses
Mike Rylander [Wed, 4 Jan 2012 18:32:33 +0000 (13:32 -0500)]
Teach cstore et al about predicate-style truth tests in ORDER BY clauses

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoUse hold current shelf lib to determine availability : hold shelf browse
Bill Erickson [Wed, 28 Dec 2011 18:58:45 +0000 (13:58 -0500)]
Use hold current shelf lib to determine availability : hold shelf browse

The availability of a hold can now be determined by
hold.current_shelf_lib == hold.pickup_lib.

This change updates the staff client code to only display the "available
on" value (i.e. shelf_time) in the holds list when the current_shelf_lib
== pickup_lib and not just that it's captured and on a shelf.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoUse hold current shelf lib to determine availability : SIP
Bill Erickson [Wed, 28 Dec 2011 14:54:32 +0000 (09:54 -0500)]
Use hold current shelf lib to determine availability : SIP

The availability of a hold can now be determined by
hold.current_shelf_lib == hold.pickup_lib.

This change updates the unavailable holds count function for the patron
information SIP call(s).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoUse hold current shelf lib to determine availability : A/T validator
Bill Erickson [Tue, 27 Dec 2011 21:34:46 +0000 (16:34 -0500)]
Use hold current shelf lib to determine availability : A/T validator

The availability of a hold can now be determined by
hold.current_shelf_lib == hold.pickup_lib.

This change updates the HoldIsAvailable action/trigger validator to use
the new test.  I've left the original belt-and-suspenders checks in
place and marked them as redundant within the code for reference.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoUse hold current shelf lib to determine availability : opac hold count
Bill Erickson [Tue, 27 Dec 2011 21:20:08 +0000 (16:20 -0500)]
Use hold current shelf lib to determine availability : opac hold count

The availability of a hold can now be determined by
hold.current_shelf_lib == hold.pickup_lib.

This change updates the API call for open hold counts for a patron.

open-ils.actor.user.hold_requests.count

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoAlter hold pickup lib from shelf avoids transit
Bill Erickson [Tue, 27 Dec 2011 20:47:00 +0000 (15:47 -0500)]
Alter hold pickup lib from shelf avoids transit

When the pickup library for a hold is changed while the hold is on the
shelf, we no longer put the copy into transit to the new location.
Instead, we clear the shelf_expire_time (to prevent premature
expiration) and leave the hold and copy otherwise untouched.

This makes it possible for staff to identify items that are sitting on
the holds shelf that need to be put into transit to a new pickup
library.  The transit will be created when the item is checked in at the
originating library.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoNew hold status for "Wrong Shelf"
Bill Erickson [Wed, 28 Dec 2011 16:17:37 +0000 (11:17 -0500)]
New hold status for "Wrong Shelf"

Adds a new hold status code (8) to indicate when a hold is sitting on
the wrong holds shelf.

In the OPAC, a hold status of 8 is displayed as in-transit.  Neither
waiting-for-copy or in-transit are entirely accurate.  In-transit makes
slightly more sense, since the copy is captured and (slowly) making its
way to the correct shelf.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoHold current_shelf_lib for shelf browse API
Bill Erickson [Tue, 27 Dec 2011 20:55:33 +0000 (15:55 -0500)]
Hold current_shelf_lib for shelf browse API

Use the new current_shelf_lib column on hold requests to determine which
copies are on a given shelf.  This also removes the shelf_time filter
since shelf_time is guaranteed to be set if current_shelf_lib is set.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoHold current_shelf_lib API for setting/clearing.
Bill Erickson [Tue, 27 Dec 2011 18:18:08 +0000 (13:18 -0500)]
Hold current_shelf_lib API for setting/clearing.

Sets and clears the hold.current_shelf_lib value as appropriate during
hold capture, transit checkin, hold resetting, etc.

Also, we now create hold transits (instead of regular transits) when a
captured copy is (unexpectedly) found at the wrong branch and needs to
transit to the pickup lib.  This can happen if the captured copy simply
transits to the wrong place (existing behavior) or the pickup lib for
the hold was changed while the copy was on the shelf (new behavior).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoHold current_shelf_lib DB and IDL
Bill Erickson [Tue, 27 Dec 2011 17:19:05 +0000 (12:19 -0500)]
Hold current_shelf_lib DB and IDL

Schema, upgrade, and IDL pieces for a new
action.hold_request.current_shelf_lib column.  The goal of the column is
to track the location where a hold is currently sitting on a hold shelf.
Typically, this will be the pickup library, however, if the pickup
library has changed while the hold was on the shelf, the current shelf
lib will be different.

The upgrade script sets current_shelf_lib to match the pickup_lib for
all holds that are currently active and on the shelf.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoAvoid updating deleted call numbers for 2.0 -> 2.1 upgrade
Dan Scott [Tue, 22 Nov 2011 16:55:45 +0000 (11:55 -0500)]
Avoid updating deleted call numbers for 2.0 -> 2.1 upgrade

25% of the call numbers on our production system are deleted, so
filtering out the deleted call numbers from the update in the 2.0 -> 2.1
upgrade saves a significant amount of time.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoAdd OpenILS::WWW::Proxy::Authen Module
Thomas Berezansky [Tue, 3 Jan 2012 17:00:47 +0000 (12:00 -0500)]
Add OpenILS::WWW::Proxy::Authen Module

Enables HTTP Basic Authentication access control.

Uses the OILSProxyPermissions and OILSProxyLoginType settings, but prompts
are controlled by the Apache AuthName directive.

This module allows things like Directory Indexing and non-perl or otherwise
incompatible with the normal proxy module Response (or similar) handlers to
be password-protected.

It also supports the OpenILS::WWW::Proxy user/passwd CGI params to allow
an easier transition between the two.

For example:

<Location /authen_login/>
    Options +Indexes
    PerlOptions +GlobalRequest
    PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
    PerlSendHeader On
    AuthType Basic
    AuthName "Notices Login"
    PerlAuthenHandler OpenILS::WWW::Proxy::Authen
    require valid-user
    allow from all
</Location>

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoChange default proxy configs to Authen variant
Thomas Berezansky [Tue, 3 Jan 2012 18:48:18 +0000 (13:48 -0500)]
Change default proxy configs to Authen variant

Also, because Authen causes Indexes to function, turn them off by default.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoStamping upgrade script for coded value map index normalizer
Mike Rylander [Wed, 4 Jan 2012 15:36:08 +0000 (10:36 -0500)]
Stamping upgrade script for coded value map index normalizer

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoCoded value map index normalizer
Bill Erickson [Tue, 3 Jan 2012 21:41:42 +0000 (16:41 -0500)]
Coded value map index normalizer

New index normalizer which maps a coded value from the record to the
display value configured in config.coded_value_map.  The normalizer is
applied with one parameter, the ctype of the coded_value_map to use for
the mapping.

E.g config.metabib_field_index_norm_map:

id | field | norm |    params     | pos
---+-------+------+---------------+-----
57 |    31 |   17 | ["item_lang"] |  -1

* pos = -1 causes this normalizer to be applied to facet_entry's

This is primarily useful for facets.  For example, you could create a
metabib_field for language and mark it as a facet_field.  Applying this
index would allow the mapped language names (e.g. "French" instead of
"fre") to display as facets.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoRevert "TPAC: Uniform search lib / depth settings"
Bill Erickson [Tue, 3 Jan 2012 22:30:43 +0000 (17:30 -0500)]
Revert "TPAC: Uniform search lib / depth settings"

Reverting partial commit that accidentally crept in, causing TPAC
breakage.

This reverts commit ea71899306e026bd0c9c91180a0af76a55fbec08.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoFix typo causing Javascript Shell to not enable
Thomas Berezansky [Fri, 30 Dec 2011 16:54:00 +0000 (11:54 -0500)]
Fix typo causing Javascript Shell to not enable

DEBUG_CIENT != DEBUG_CLIENT

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoUse the FTP site for Xulrunner downloads
Thomas Berezansky [Fri, 30 Dec 2011 15:39:01 +0000 (10:39 -0500)]
Use the FTP site for Xulrunner downloads

releases.mozilla.org was causing trouble for us; the FTP site appears to
be more stable.

Oh, and bump the Xulrunner version slightly while we are at it.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoMerge remote-tracking branch 'eg-working/user/dbs/lp894052-version-upgrade'
Mike Rylander [Thu, 29 Dec 2011 17:15:25 +0000 (12:15 -0500)]
Merge remote-tracking branch 'eg-working/user/dbs/lp894052-version-upgrade'

One merge conflict in 2.0-2.1-upgrade-db.sql silenced with -X theirs.  See
LP#894052 for details.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoTPAC: Uniform search lib / depth settings collab/dyrcona/tpac_user_ou_pref
Dan Scott [Tue, 27 Dec 2011 17:31:03 +0000 (12:31 -0500)]
TPAC: Uniform search lib / depth settings

The current TPAC code uses logic embedded within the templates to
determine which org unit and depth to apply to searches.

This commit attempts to standardize the logic within the new
OpenILS::WWWW::EGCatLoader::Util::_get_search_lib() function and sets
the result as a new context variable, "search_ou". The org unit is
determined as follows (first matching condition wins):

* specific CGI "loc" value
* logged-in user's preferred search library
* logged-in user's home org unit
* specific CGI "physical_loc" value

The depth is set as follows (first matching condition wins):

* specific CGI "depth" value
* depth of the chosen org_unit

As of this commit, a library that wishes to set the a default search
org unit for any given user should set the "physical_loc" CGI param;
after the user performs their first search, the "loc" CGI param will
propagate through most interfaces. When a user clicks "Your account log
in", the user's preferred search library or home org unit will be set as
the new search lib.

At any time after that, the user can select a different org unit from
the org unit selector to explicitly set the "loc" CGI param.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoTPAC: Add "preferred search location" preference setting
Dan Scott [Wed, 28 Dec 2011 23:42:18 +0000 (18:42 -0500)]
TPAC: Add "preferred search location" preference setting

Working towards parity with the JSPAC, give the user the ability to set
their preferred search library in account preferences via the org
selector. The value defaults to the user's home OU.

Also set a sane default of 10 search results per page in the absence of
any preference, as the default had been set to 5.

While we're in there, remove some of the inline styles and weird markup
in the user preference page, and refactor the O:W:EGCatLoader:Account
module to accept an easily-appended list of preferences to be set.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoTPAC: Set search_ou context in common loader
Dan Scott [Wed, 28 Dec 2011 02:17:02 +0000 (21:17 -0500)]
TPAC: Set search_ou context in common loader

By setting the search_ou context in load_common() after checking for a
valid user session, we can catch the remaining pages in TPAC in which
the default search library was not being set properly.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoTPAC: Resolve conflict with master
Dan Scott [Tue, 27 Dec 2011 23:36:32 +0000 (18:36 -0500)]
TPAC: Resolve conflict with master

The changes for LP909111 ended up causing a conflict with this branch.
Resolve!

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoTPAC: Uniform search lib / depth settings
Dan Scott [Tue, 27 Dec 2011 17:31:03 +0000 (12:31 -0500)]
TPAC: Uniform search lib / depth settings

The current TPAC code uses logic embedded within the templates to
determine which org unit and depth to apply to searches.

This commit attempts to standardize the logic within the new
OpenILS::WWWW::EGCatLoader::Util::_get_search_lib() function and sets
the result as a new context variable, "search_ou". The org unit is
determined as follows (first matching condition wins):

* specific CGI "loc" value
* logged-in user's preferred search library
* logged-in user's home org unit
* specific CGI "physical_loc" value

The depth is set as follows (first matching condition wins):

* specific CGI "depth" value
* depth of the chosen org_unit

As of this commit, a library that wishes to set the a default search
org unit for any given user should set the "physical_loc" CGI param;
after the user performs their first search, the "loc" CGI param will
propagate through most interfaces. When a user clicks "Your account log
in", the user's preferred search library or home org unit will be set as
the new search lib.

At any time after that, the user can select a different org unit from
the org unit selector to explicitly set the "loc" CGI param.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoTPac: improve search depth extraction
Bill Erickson [Tue, 27 Dec 2011 18:45:02 +0000 (13:45 -0500)]
TPac: improve search depth extraction

Improves how we determine the depth of a search.  The Order of
operations:

1. Depth encoded within the search query, e.g. depth(2)
2. CGI depth param
3. Default is to match the depth of the searched org unit

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoReverse Copy Location picker labels via WS Setting
Thomas Berezansky [Thu, 29 Sep 2011 23:26:17 +0000 (19:26 -0400)]
Reverse Copy Location picker labels via WS Setting

If the setting is set then place the name before the org unit. This allows
for typing of the start of the name without having to deal with the org
unit shortname "eating" the start of the label (and thus type-in), but
preserves the information the org unit provides.

As an example, instead of having to type:
CONS : St
To get close to the default "Stacks" in a long list you could just type
St
And likely get to, or close to, Stacks.

The option can be toggled from the Workstation Administration menu.

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

Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoTPAC: Display monograph parts
Dan Scott [Fri, 23 Dec 2011 06:56:02 +0000 (01:56 -0500)]
TPAC: Display monograph parts

In search results and record details, display monograph parts if
associated with a copy. Uses unapi for search results and json_query for
record details. Only generates the "Part" column in the copy table if
that record actually has a monograph part; otherwise the column is not
generated.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoSIP2: Fix transit home on checkin user/sal/fix_sip2_checkin_transit_signoff
Thomas Berezansky [Wed, 21 Dec 2011 21:51:48 +0000 (16:51 -0500)]
SIP2: Fix transit home on checkin

The Checkin doesn't need a destination_loc, but the item needs it set.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Sarah E. Chodrow <sarah.chodrow@bibliotheca-itg.com>
12 years agoSVF in bib record summary: extract attrs on the server
Bill Erickson [Thu, 22 Dec 2011 15:13:03 +0000 (10:13 -0500)]
SVF in bib record summary: extract attrs on the server

This repairs a FIXME within the custom bib overlay code related to
parsing metabib.record_attr stores within the JS.  Instead, now we use
an attr parsing utility function which compiles a regular hash so the
client no longer needs to parse it.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agosupport SVF in staff client bib record summary
Jason Etheridge [Thu, 8 Dec 2011 22:48:42 +0000 (17:48 -0500)]
support SVF in staff client bib record summary

This is in support of https://bugs.launchpad.net/evergreen/+bug/822928, re: Cat Date

So for example, let's suppose you want to store a "Cat Date" in MARC tag 915, subfield a.

You could do this in the database:

INSERT INTO config.record_attr_definition (name,label,filter,sorter,tag,sf_list)
    VALUES ( 'cat_date', 'Cat Date', 'f', 't', '915', 'd' );

Add this to server/locale/en-US/cat_custom.properties (optional but recommended):

staff.cat.bib_brief.cat_date.label=Cat Date:
staff.cat.bib_brief.cat_date.accesskey=

And then add something like this to server/skin/custom.js:

    try {

        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);

        prefs.setCharPref(
            'oils.bib_brief.horizontal.dynamic_grid_replacement.data',
            js2JSON([
                ["title",           "edition",  "editor",       "cat_date"],
                ["author",          "pubdate",  "edit_date",    "holds"],
                ["bib_call_number", "tcn",      "create_date",  "items"]
            ])
        );

        prefs.setCharPref(
            'oils.bib_brief.alternate_copy_summary.dynamic_grid_replacement.data',
            js2JSON([
                ["title",       "edition",  "editor",       "cat_date"],
                ["author",      "pubdate",  "edit_date",    "holds"],
                ["call_number", "tcn",      "create_date",  "items"]
            ])
        );

    } catch(E) {
        dump('Error in custom.js trying to set oils.bib_brief.*.dynamic_grid_replacement.data: ' + E + '\n');
    }

Finally, re-ingest any records with tag 915d (you can simply edit the MARC via
the MARC Editor for a specific record, or if the ingest.reingest.force_on_same_marc
row in config.internal_flag is enabled and you're not doing this during library
hours, you can re-ingest all records with UPDATE biblio.record_entry SET marc = marc;)

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoWrap upgrade for "Tag previously circulated items" YAOUS
Dan Scott [Wed, 21 Dec 2011 22:13:49 +0000 (17:13 -0500)]
Wrap upgrade for "Tag previously circulated items" YAOUS

Also fix a typo ("currenlty") and use the full "circulation" for easier
translation.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoTPac; indicate search results previously checked out
Bill Erickson [Tue, 29 Nov 2011 21:54:52 +0000 (16:54 -0500)]
TPac; indicate search results previously checked out

When a user is logged in to the tpac and performs a search, indicate in
the results set when any of the result items were ever checked out by
the logged in user.

Items will only be tagged when the related org setting is enabled and
the user has opted-in to circ history tracking.

New org unit setting is "opac.search.tag_circulated_items" /
"Tag Circulated Items in Results"

In the search results, just below title/author/callnumber/copy-count, a
new line is displayed that says "I have checked out this item before"
with a purdy little checkmark.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoTPac: Don't show part selector on hold result page
Thomas Berezansky [Wed, 21 Dec 2011 21:19:47 +0000 (16:19 -0500)]
TPac: Don't show part selector on hold result page

Instead, duplicate the hold list's "part name in parens" display, when a
part was selected.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTPAC: Change title tooltip in results table to useful message
Bill Erickson [Mon, 19 Dec 2011 17:57:08 +0000 (12:57 -0500)]
TPAC: Change title tooltip in results table to useful message

From dbs's original commit:

The tooltip that would display when hovering over the title of a result
in the results table was simply the URI-escaped version of the title
text - not particularly helpful. Change this to say "Display record
details" as an actual hint about what action will occur when the user
clicks on a title in the results list.

This modified commit changes the title to 'Display record details for
"<title>"'

This commit also introduces the HTML plugin as a new
loaded-by-default template plugin.  Among other things, it's useful for
ensuring HTML attributes are safely encoded, moresoe than |html, which
does not escape quotes.

https://bugs.launchpad.net/evergreen/+bug/902979

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoTPAC: Split result copy counts into a separate template
Dan Scott [Wed, 21 Dec 2011 17:58:46 +0000 (12:58 -0500)]
TPAC: Split result copy counts into a separate template

As Thomas Berezansky suggests, sites are likely to want to customize the
display of copy counts depending on whether they're consortial sharers,
how deep they want to display, whether they want to just show the
matching search scope... make it easy to customize by moving the
copy counts portion of the results table into a separate template.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoTPAC: Improve display of holds/copy counts on record details
Dan Scott [Wed, 21 Dec 2011 06:06:06 +0000 (01:06 -0500)]
TPAC: Improve display of holds/copy counts on record details

Based on some suggestions from Thomas Berezansky in LP 906168:

  * Change the "Copies" header to "Available copies"
  * Simplify the copy language to "# copies at <library>" (we still need
    the noun "copies" but "available" has been factored out)
  * Create a "Holds" header and move the holds information under that
  * Put the "Available copies" and "Holds" into inline-block elements
    so that they can take less vertical space on a wide screen but
    will wrap on a narrow screen.
  * Fix the line spacing between LI elements

In addition, break up the lengthy summary TT2 file into a few smaller
parts. In particular, make a copy_counts.tt2 file as sites are very
likely to customize this to, in some cases, not show the consortial
counts, or in other cases to only show the consortial count and current
search library.

Also fix some horrible CSS issues in the header in which the "Place
hold" and "Add to list" buttons were above the title / image, as well as
remove some of the CSS manipulation to plain H2 elements that gave them
no top margin.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoTPAC: Display additional levels of copy counts
Dan Scott [Mon, 19 Dec 2011 04:54:15 +0000 (23:54 -0500)]
TPAC: Display additional levels of copy counts

In line with the MassLNC TPAC suggestion, display the copy counts for
search results and record details not only at the consortial level, but
also at up to two additional levels of the org unit hierarchy (but no
deeper than the user has chosen to search).

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoTPac; display mono part in account holds list/edit
Bill Erickson [Fri, 7 Oct 2011 20:11:33 +0000 (16:11 -0400)]
TPac; display mono part in account holds list/edit

Part label is appended to the title, wrapped in (parens).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agoTPac: holds placement on monographic parts
Bill Erickson [Thu, 6 Oct 2011 18:34:03 +0000 (14:34 -0400)]
TPac: holds placement on monographic parts

Ability to place holds on monographic parts.  In the holds placement
form, if a record has parts, a parts selector will display in the form
allowing the user to optionally specificy a monographic part for the
hold.

If a record has no non-part copies, the user is required to select a
part, because, in such cases, the hold cannot be fulfilled without
selecting a part.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
12 years agobookbag CSV gets bib attrs; A/T unapi method
Bill Erickson [Tue, 8 Nov 2011 15:56:14 +0000 (10:56 -0500)]
bookbag CSV gets bib attrs; A/T unapi method

* Added a bib record unapi retrieval utility method for action/trigger
templates.

* Updated the bookbag CSV template to include data for the "item_type"
record attribute both to have it and as an example of how the unapi
retrieval works.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
12 years agoAdd "Last circulation date" field to new rcl view
Dan Scott [Tue, 20 Dec 2011 21:19:08 +0000 (16:19 -0500)]
Add "Last circulation date" field to new rcl view

Some libraries will want the option of filtering out copies which have
truly never circulated, so offering up the bare "last circulation date"
field rather than coalescing it with "create date" will give report
writers the ability to use an IS NOT NULL clause.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoLast Circulation timestamp for reports
Thomas Berezansky [Tue, 6 Sep 2011 16:46:04 +0000 (12:46 -0400)]
Last Circulation timestamp for reports

Specifically intended for Weeding reports.

Easily swapped out (if needed) to include legacy circ data,
when available from a migration.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoHold ratios by pickup library for reports
Thomas Berezansky [Tue, 6 Sep 2011 15:38:18 +0000 (11:38 -0400)]
Hold ratios by pickup library for reports

Specifically intended for "point in time" reports.

In our case, per-library purchase alerts.

Uses Hold Copy Map table to get more accurate numbers for copy/volume/part holds.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoEscape the backslash to avoid warning in PostgreSQL 9.0-
Dan Scott [Tue, 20 Dec 2011 16:33:33 +0000 (11:33 -0500)]
Escape the backslash to avoid warning in PostgreSQL 9.0-

In PostgreSQL 9.1, "standard_conforming_strings" is ON by default and
there's no warning - but previous versions of PostgreSQL will see the
backslash and throw a warning about how you haven't escaped the
backslash. Thanks to Thomas Berezansky for noticing.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd concerto.sql dataset with callnums, copies, and URIs
Dan Scott [Fri, 9 Dec 2011 17:38:55 +0000 (12:38 -0500)]
Add concerto.sql dataset with callnums, copies, and URIs

Useful for testing a fresh Evergreen database, the concerto.sql dataset
is an SQL file that adds 100 bib records and automatically generates
assorted call numbers and copies for 3 of the branches. 50 of the
records include unadorned 856 fields and 25 of them have located URIs
(25 scoped at SYS1, and 10 scoped at both SYS1 and BR3).

In the effort to make the one-shot load of sample bib / copy / call
number data broad and realistic, delete some of the entities, add
prefixes and suffixes to some of the call numbers, and include some
monograph parts and conjoined items.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoRemove top-level templates_custom directory
Dan Scott [Tue, 20 Dec 2011 16:42:17 +0000 (11:42 -0500)]
Remove top-level templates_custom directory

This top-level directory and version of advanced.tt2 slipped into commit
c9cdea869b5 and was noticed by Bill Erickson. It should not be here.
Send it into oblivion.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoAdd built staff client dir to .gitignore as well
Dan Scott [Mon, 19 Dec 2011 18:13:18 +0000 (13:13 -0500)]
Add built staff client dir to .gitignore as well

Thanks to Thomas Berezansky for the suggestion; you can tell what I
haven't built on my system :)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAdd a .gitignore file suitable for master
Dan Scott [Mon, 19 Dec 2011 17:55:10 +0000 (12:55 -0500)]
Add a .gitignore file suitable for master

"git status" is painful in a source directory in which you're built and
installed Evergreen. This commit adds a .gitignore file that masks most
of the files and directories that you don't want to even think about, in
the hopes that the default Evergreen development experience can be mo'
betta.

Variations on this could be backported to rel_2_1 and rel_2_0 but take
care as some of the files that used to be source files in older releases
are now build from *.in files via autoconf.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoWrap upgrade script for CREATE_REPORT_TEMPLATE permission
Dan Scott [Mon, 19 Dec 2011 16:17:12 +0000 (11:17 -0500)]
Wrap upgrade script for CREATE_REPORT_TEMPLATE permission

Permissions to create report templates will automatically be added to
any group that currently has the ability to run reports as part of the
upgrade process; if you want to make use of the ability to prevent some
groups from creating ad-hoc reports, remove the CREATE_REPORT_TEMPLATE
permission from permission.grp_perm_map for that group.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAdd permission for creating report templates
Thomas Berezansky [Sun, 25 Sep 2011 19:00:08 +0000 (15:00 -0400)]
Add permission for creating report templates

Because we would like people to be able to run them, but not create them.

Also, allow VIEW_REPORT_OUTPUT in reporter interface, so
that you can see the contents of shared output folders.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAvoid updating deleted call numbers for 2.0 -> 2.1 upgrade
Dan Scott [Tue, 22 Nov 2011 16:55:45 +0000 (11:55 -0500)]
Avoid updating deleted call numbers for 2.0 -> 2.1 upgrade

25% of the call numbers on our production system are deleted, so
filtering out the deleted call numbers from the update in the 2.0 -> 2.1
upgrade saves a significant amount of time.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoShow Suspended holds as Suspended
Thomas Berezansky [Thu, 8 Dec 2011 16:26:33 +0000 (11:26 -0500)]
Show Suspended holds as Suspended

In the staff client and JSPac show the status of a suspended hold as
Suspended rather than something like "Waiting for copy".

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoAdd class_for_hint function to OpenILS::Utils::Fieldmapper.
Jason Stephenson [Sun, 11 Dec 2011 01:28:48 +0000 (20:28 -0500)]
Add class_for_hint function to OpenILS::Utils::Fieldmapper.

Use this function to find a Fieldmapper class from the JSON hint or
class id:

my $class = Fieldmapper::class_for_hint('au');
print("$class\n");

Will print:

Fieldmapper::actor::user

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoLP904915 Restore call number columns
Jason Etheridge [Thu, 15 Dec 2011 19:38:54 +0000 (14:38 -0500)]
LP904915 Restore call number columns

in Check In interface

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoturn objects (such as null) into empty strings
Jason Etheridge [Thu, 15 Dec 2011 15:28:33 +0000 (10:28 -0500)]
turn objects (such as null) into empty strings

when they're being treated as strings (with escape_html) during printing

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoLP# 902667 - Wrap upgrade script for Dewey sorting
Dan Scott [Fri, 16 Dec 2011 19:00:24 +0000 (14:00 -0500)]
LP# 902667 - Wrap upgrade script for Dewey sorting

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix Dewey call number sorting
James Fournie [Sun, 11 Dec 2011 00:49:01 +0000 (16:49 -0800)]
Fix Dewey call number sorting

Ported over Koha commit aef8358c - fix for Koha Bug 4265.
Further documented in Evergreen LP # 902667
Here's the description from the commit message by Magnus Enger:

C4::ClassSortRoutine::Dewey turns "306 Les" into "306_Les"
for items.cn_sort and MARC-field 952$6, which results in
"306.46 Les" being sorted before "306 Les" in the OPAC.
With this patch, "306 Les" is turned into "306_000000000000000_Les".

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix the POD in Cronscript.pm.in.
Jason Stephenson [Thu, 1 Dec 2011 20:05:12 +0000 (15:05 -0500)]
Fix the POD in Cronscript.pm.in.

I lied when I said it includes Data::Dumper, so you don't have to.
It does include Data::Dumper, but if you want to use Data::Dumper
in your script, you still have to use Data::Dumper.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoMake some improvements to Cronscript.pm.
Jason Stephenson [Thu, 1 Dec 2011 17:38:55 +0000 (12:38 -0500)]
Make some improvements to Cronscript.pm.

Allow the session method to function when called more than once with
different service names.

Add some useful new methods:

logout: Calls open-ils.auth.session.delete if we're logged in.

die_event: Causes a script to croak if the object passed in is an event,
or optionally a certain named event.

warn_event: Causes a script to output an error message if the object passed
in is an event, or optionally a certain named event.

Use OpenILS::Application::AppUtils.

Default to staff login in Cronscript->authenticate method.

Improve the Croncript.pm.in POD to include a better synopsis of its features.

Clean up some other sections of the POD, remove the TODO section, and add
some SEE ALSO entries.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoTPAC: Assume that templates are encoded in UTF-8
Dan Scott [Sat, 10 Dec 2011 15:43:47 +0000 (10:43 -0500)]
TPAC: Assume that templates are encoded in UTF-8

Per http://template-toolkit.org/docs/faq/index.html
under "Why do I get rubbish for my utf-8 templates?", Template::Toolkit
does not assume that templates are encoded in UTF-8, which runs counter
to current assumptions circa 2011.

Practically, this means that before this change any UTF8 characters
used for purposes such as Unicode art or otherwise would be garbled in
the generated Web page. This commit tells Template::Toolkit to assume
that the templates are UTF8 without forcing us to monkey with byte-order
markers.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoAllow for the page offset when listing the "Result x of y" values.
bott [Wed, 14 Dec 2011 17:31:30 +0000 (12:31 -0500)]
Allow for the page offset when listing the "Result x of y" values.

The record details page did not show the page offset correctly, so
result 13 would show up as "Result 3 of ###", and result 23 would also
show up as "Result 3 of ###".

Signed-off-by: bott <bott@grpl.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoFix can_have_copies checks
Thomas Berezansky [Wed, 14 Dec 2011 19:30:52 +0000 (14:30 -0500)]
Fix can_have_copies checks

Bibs aren't required to have sources. Thus, adjust all appropriate locations
to support a default state of "no source bibs can have copies", without
erroring out.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoProcess still-shelved, canceled holds in clear-shelf process
Bill Erickson [Wed, 14 Dec 2011 18:36:05 +0000 (13:36 -0500)]
Process still-shelved, canceled holds in clear-shelf process

Holds that are canceled but still physically on the hold shelf are
processed like other holds during the clear-shelf process.  They will be
grouped in the same manner and if a custom post-clear status is
configured, copies linked to already-canceled holds will get the custom
status.  The only difference is already-canceled holds will not be
re-canceled during the clear-shelf process.

This change has the added benefit of leveraging another API call to
retrieve the shelf-expired holds instead of using its own custom
json-query.

See https://bugs.launchpad.net/evergreen/+bug/904332

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoClear hold shelf/shelf_expire time for pickup lib change
Bill Erickson [Tue, 13 Dec 2011 19:32:45 +0000 (14:32 -0500)]
Clear hold shelf/shelf_expire time for pickup lib change

If a hold is on the holds shelf and the pickup library changes, clear
the shelf_time and shelf_expire_time, since the hold is now in transit.

This is particularly important for avoiding action_trigger events for
the "hold_request.shelf_expires_soon" hook for what is now an
in-transit item.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoTPAC: Add prefixes and suffixes to call number displays
Dan Scott [Tue, 6 Dec 2011 07:16:16 +0000 (02:16 -0500)]
TPAC: Add prefixes and suffixes to call number displays

Call numbers can be associated with prefixes and suffixes meant for
display purposes; display these with the call numbers in search results
and record details.

Thanks to Lebbeous and Bill for the assist in sorting out the remaining
portion of the hairy json_query for the record display.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoMake canceled but still on the shelf holds show up
Thomas Berezansky [Tue, 11 Oct 2011 20:42:03 +0000 (16:42 -0400)]
Make canceled but still on the shelf holds show up

Browse Hold Shelf otherwise can't see holds canceled after the item was
placed on the shelf.

This also causes the expired view to show canceled but still in on the
hold shelf status holds to show up.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
12 years agoStamping upgrade for LP898248: Address Alert
Thomas Berezansky [Wed, 14 Dec 2011 15:34:19 +0000 (10:34 -0500)]
Stamping upgrade for LP898248: Address Alert

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAlert addresses for patron registration : UI
Bill Erickson [Fri, 9 Dec 2011 20:52:32 +0000 (15:52 -0500)]
Alert addresses for patron registration : UI

Add support for comparing user addresses to alert addresses.  When an
address is found, the address in question is styled (the header row
turns red) and the configured alert message is shown along the
top-right, where other warnings appear.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAlert addresses for patron registration : API
Bill Erickson [Fri, 9 Dec 2011 20:51:49 +0000 (15:51 -0500)]
Alert addresses for patron registration : API

Middle-layer API call for matching addresses to alert addresses

open-ils.actor.address_alert.test(auth, orgid, fields)

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAlert addresses for patron registration : configuration UI
Bill Erickson [Fri, 9 Dec 2011 15:43:28 +0000 (10:43 -0500)]
Alert addresses for patron registration : configuration UI

Conify UI for managing Alert Addresses

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoAlert addresses for patron registration : DB/IDL
Bill Erickson [Tue, 6 Dec 2011 21:09:16 +0000 (16:09 -0500)]
Alert addresses for patron registration : DB/IDL

DB and IDL components to support configuration of alert addresses.  The
target use case for alert addresses is in the patron registration
interface.  When a patron's address matches an alert address, the staff
should be notified.

Alert address fields are treated as regular expressions.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agojson_query boolean function param support
Bill Erickson [Tue, 13 Dec 2011 16:03:23 +0000 (11:03 -0500)]
json_query boolean function param support

Solves the following problem when passing boolean parameter values to
json_query functions using the 'from' construct.

E.g.  {"from" : ["some_func_name", true]}

oils_sql.c:2568 open-ils.cstore: Error quoting key string [(null)]

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
12 years agoMerge remote-tracking branch 'working/collab/dbs/tpac-non-fixed-width'
Thomas Berezansky [Mon, 12 Dec 2011 17:25:36 +0000 (12:25 -0500)]
Merge remote-tracking branch 'working/collab/dbs/tpac-non-fixed-width'

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
12 years agoTPAC: Remove more inline styles from results table collab/dbs/tpac-non-fixed-width
Dan Scott [Mon, 12 Dec 2011 05:44:34 +0000 (00:44 -0500)]
TPAC: Remove more inline styles from results table

Most of the inline styles are gone from the results table.

Signed-off-by: Dan Scott <dscott@laurentian.ca>