working/Evergreen.git
10 years agoStamping upgrade script for ACQ/Vandelay integration branch
Mike Rylander [Mon, 19 Mar 2012 15:21:49 +0000 (11:21 -0400)]
Stamping upgrade script for ACQ/Vandelay integration branch

Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoVandelay-based record matching and import for Acquisitions
Mike Rylander [Mon, 19 Mar 2012 15:15:24 +0000 (11:15 -0400)]
Vandelay-based record matching and import for Acquisitions

From the Lauchpad description:

In its current form, Acquisitions record importing is inflexible and
unforgiving. The user is given practically no control over how inbound
records match against existing records nor how to deal with record
collisions. This proposal attempts to resolve this problem by leveraging
Vandelay for matching, merging, overlaying, and importing acquisitions
records.

Suggested work flow:

1. Any time an ACQ record should be loaded into the catalog or simply
   linked to an existing catalog record, the user is presented with an
   additional set of Vandelay upload options to control the matching and
   import behavior. This would include the vendor file upload UI, PO
   activation, and PO "Load Bibs and Items". The Vandelay options would
   include the full set of Match Sets, Merge Profiles, import options, etc.
   the user normally has.

2. Once options are selected and, when applicable, the MARC file is uploaded,
   the acquisitions records are added to a new type of ACQ Vandelay queue and
   processed like any other Vandelay records.

3. Vandelay will be taught to recognize ACQ records and update the lineitems
   to reflect any imported/linked catalog records.

4. Any records that fail to import will be available for manual inspection
   within the Vandelay interface an can be re-imported from there.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoAutoGrid line number CSS application cleanup
Bill Erickson [Thu, 15 Mar 2012 17:54:02 +0000 (13:54 -0400)]
AutoGrid line number CSS application cleanup

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoadd Line# column to autogrid
Jason Etheridge [Wed, 14 Mar 2012 06:52:49 +0000 (02:52 -0400)]
add Line# column to autogrid

hidden by default, but we need to make it show up in autogrid's column picker

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agomake ordinal column work in Holdings Maintenance
Jason Etheridge [Wed, 14 Mar 2012 04:03:07 +0000 (00:03 -0400)]
make ordinal column work in Holdings Maintenance

brute force kludge

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoadds a Line# column to all xul lists
Jason Etheridge [Mon, 12 Mar 2012 20:06:51 +0000 (16:06 -0400)]
adds a Line# column to all xul lists

displays the ordinal position of the row

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agorow_node vs my_node in util.list
Jason Etheridge [Mon, 12 Mar 2012 19:39:20 +0000 (15:39 -0400)]
row_node vs my_node in util.list

Both of these should be holding the same xul treeitems, and I don't recall
wanting different names here, so I'm renaming both to treeitem_node.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agopcrud fleshing bug fixes
Bill Erickson [Fri, 16 Mar 2012 17:38:13 +0000 (13:38 -0400)]
pcrud fleshing bug fixes

1. Avoid perm checks on org tree root lookup.
2. Test for child objects to flesh into has_a / might_fields differently
to avoid segfault when kids array is empty

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoFix a bug spotted by Jason Stephenson and Thomas Berezansky
Lebbeous Fogle-Weekley [Tue, 13 Mar 2012 21:40:28 +0000 (17:40 -0400)]
Fix a bug spotted by Jason Stephenson and Thomas Berezansky

I was leaving local variables called 'cache' high and dry in many
functions calling the initSessionCache() function that was introduced to
reduce code repetition.

This seems to fix that

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoAdjust controller-requiring logic for pcrud perm-verify mode
Mike Rylander [Wed, 14 Mar 2012 17:26:17 +0000 (13:26 -0400)]
Adjust controller-requiring logic for pcrud perm-verify mode

In cstore we always require the controller.  However, in pcrud, we need to be
able to skip the controller requirement when we're verifying permissions.  This
allows that.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agopcrud fleshing
Lebbeous Fogle-Weekley [Tue, 25 Oct 2011 21:01:04 +0000 (17:01 -0400)]
pcrud fleshing

This allows fleshing in pcrud queries if
a) the objects you would flesh have a pcrud controller in the IDL,
b) you have permissions for all the objects you would flesh just as
   you would have to have them if you asked for them directly.

This is harder to read than it might be because of efforts to avoid
redundant perm checks for every fleshed object of the same class, and
efforts to keep results streaming out quickly.

Tests pretty well for me, but more rigor appreciated.

I received lots of help in making this happen from Mike Rylander and
Bill Erickson.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoTpac - add additional subfields for title in search results
Ben Shum [Sat, 17 Mar 2012 02:55:07 +0000 (22:55 -0400)]
Tpac - add additional subfields for title in search results

Originally, titles in Tpac only showed based on tag 245 subfield a.
This sometimes led to difficulty identifying specific records from
each other if it was part of a set or had additional title information
in other subfields.

Modified default title function to include the following:

subfield b = remainder of title
subfield n = number of part/section of a work
subfield p = name of part/section of a work

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoMove "Save" button for notify prefs to bottom left user/bshum/fix-save-notify-pref
Dan Scott [Fri, 16 Mar 2012 16:37:53 +0000 (12:37 -0400)]
Move "Save" button for notify prefs to bottom left

Quick fix for a problem spotted by Ben Shum.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoRemove KCLS hold placement note from default TTPAC user/dyrcona/ttpac_kcls_hold_statement_removal
Michael Peters [Fri, 16 Mar 2012 15:50:36 +0000 (11:50 -0400)]
Remove KCLS hold placement note from default TTPAC

TTPAC had a KCLS specific hold placement note when placing
a hold.  This removes it, as it doesn't apply to other installations.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
10 years agoTTPAC icon color tweaks
Michael Peters [Thu, 15 Mar 2012 13:13:14 +0000 (09:13 -0400)]
TTPAC icon color tweaks

In TTPAC, there are a few tiny icons used that were still in a blue
hue.  This adds a green hue to the icons, so they match the skin, plus
boasts a 50% size decrease for the *_sign.png images, for
a tiny bit of extra performance.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoTPac: avoid mkurl param stripping for all defined url params
Bill Erickson [Thu, 15 Mar 2012 19:32:38 +0000 (15:32 -0400)]
TPac: avoid mkurl param stripping for all defined url params

Instead of checking truthiness, checked definedness.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoConcerto: increase copies, assign statuses
Dan Scott [Sat, 10 Mar 2012 19:34:11 +0000 (14:34 -0500)]
Concerto: increase copies, assign statuses

Add more call numbers and create multiple copies per branch.
Include BR3 and the Bookmobile for diversity and to provide
some easier testing of search scopes at different depths.

Switch to functions for the purpose of populating call numbers and
copies, so we can make changes in one central place rather than
repeating ourselves like crazy.

For a better facsimile of the real-world, assign Reshelving / Checked
out / Lost statuses to a subset of the copies. (When / if we create
transactional data, we could throw this bogus data away.)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoACQ PO state defaults to "pending" from upload
Bill Erickson [Wed, 7 Mar 2012 15:39:44 +0000 (10:39 -0500)]
ACQ PO state defaults to "pending" from upload

When uploading a batch of records to create a PO, give the PO the
initial state of "pending" instead of "on-order".  If the PO is meant to
be activated, its state will updated to "on-order" during the activation
phase.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
10 years agostamped upgrade for hold-avail-email-notify validation
Bill Erickson [Thu, 15 Mar 2012 16:06:48 +0000 (12:06 -0400)]
stamped upgrade for hold-avail-email-notify validation

Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoEnable notify checking for holds in A/T Validators
Thomas Berezansky [Mon, 6 Feb 2012 22:19:14 +0000 (17:19 -0500)]
Enable notify checking for holds in A/T Validators

HoldIsAvailable and HoldIsCanceled get new checks, plus add HoldNotifyCheck
validator.

All three check for "check_$type_notify" parameters evaling to true, where
$type is email, sms, or phone. If true the hold's appropriate value is
checked and, if not suitable, the validator returns false.

For email the email_notify value must pass the is_true test.

For sms/phone the appropriate notify value must pass perl's truth test.

Upgrade script modifies default event definitions, with the exception of
the sms hold available event definition. That has no static id in the seed
values.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoFix issues with org selectors leaking variables
Thomas Berezansky [Wed, 14 Mar 2012 18:04:30 +0000 (14:04 -0400)]
Fix issues with org selectors leaking variables

Use of PROCESS leaks variables, switch them to INCLUDE instead.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoAcq+Vandelay : minor label change user/bshum/acq-vandelay-matching-and-import
Bill Erickson [Wed, 29 Feb 2012 23:12:41 +0000 (18:12 -0500)]
Acq+Vandelay : minor label change

Replace "View Upload Queue" with "View Import Queue", which is less
technically specific (in a good way).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq+Vandelay : consistent post-upload link names
Bill Erickson [Wed, 29 Feb 2012 23:06:21 +0000 (18:06 -0500)]
Acq+Vandelay : consistent post-upload link names

For consistency with POs and selection lists, label the newly created
Vandelay queue link as "View Upload Queue" instead of showing the queue
name.  While we're in there, let's i18n-ize those 3 labels.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq+Vandelay: post-upload links open in embedded browser
Bill Erickson [Wed, 29 Feb 2012 23:03:08 +0000 (18:03 -0500)]
Acq+Vandelay: post-upload links open in embedded browser

This change causes the picklist, PO, and queue links which appear after
a vendor file upload to open their respective pages with the xul browser
wrapper.  Without this, the existing page CSS is ignored and everything,
including href's, are grey and washed out.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq+Vandelay : skip unneeded vandeley forms
Bill Erickson [Wed, 29 Feb 2012 22:34:14 +0000 (17:34 -0500)]
Acq+Vandelay : skip unneeded vandeley forms

If all lineitems in question are linked to catalog records, avoid
showing the unnecessary vandelay form.  This was already true from the
PO activation action, but this patch adds the same check to the
create-po action from a selection list and PO 'load bibs and items'.

Minor label change for consistency in li_table (Queue -> queue).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq + Vandelay : exit early for 'load bibs and items' in picklist
Bill Erickson [Wed, 29 Feb 2012 21:06:55 +0000 (16:06 -0500)]
Acq + Vandelay : exit early for 'load bibs and items' in picklist

The ACQ UI does not support loading bibs and items directly from the
picklist interface.  If the user selects "load bibs and items" from the
picklist page they will be presented with the vandelay options, but the
actual upload/merge/etc will not do anything.  This change prevents the
vandelay options from showing in this case.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq+Vandelay : more aggressive streamed response throttling
Bill Erickson [Tue, 21 Feb 2012 15:56:38 +0000 (10:56 -0500)]
Acq+Vandelay : more aggressive streamed response throttling

With the addition of Vandelay processing, the server now wants to
respond with status information a lot more often when uploading /
process ACQ records.  This patch applies the level of throttling to ACQ
processing as Vandelay uses natively, which starts verbose and quickly
cuts back on chatter as processing continues up to (currently) a
throttle window of 1 delivered response per 256 responses.  Apart from
saving bandwith, this helps alleviate a known problem in the staff
client where long-running, dense streams of multipart responses
eventually stop bubbling up from the browser to the application.
Making the responses more sparse seems to help this a lot.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq+Vandelay avoid premature asset creation
Bill Erickson [Tue, 14 Feb 2012 16:29:30 +0000 (11:29 -0500)]
Acq+Vandelay avoid premature asset creation

The presence of Vandelay parameters in API calls does not mean the user
necessarily wants to create PO assets (real copies/callnumbers).  That's
controlled by a different, existing API parameter.  This adds support
for processing bib data only in the presence of Vandelay parameters when
the user has not explicitly chosen to create assets.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq+Vandelay form re-use new queue
Bill Erickson [Fri, 10 Feb 2012 15:42:24 +0000 (10:42 -0500)]
Acq+Vandelay form re-use new queue

In the Vandelay agent form, if a user creates a new destination queue
for the uploaded records, allow the user to re-use the new queue without
having to refresh the interface.  This is primarily useful in the ACQ
upload UI, where re-using the pre-filled form is possible.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAutoFieldWidget gets new useWriteStore option
Bill Erickson [Fri, 10 Feb 2012 15:40:17 +0000 (10:40 -0500)]
AutoFieldWidget gets new useWriteStore option

If the useWriteStore attribute is set to true, the underlying data store
for dynamically create data will live in an ItemFileWriteStore instead
of a ReadStore, which allows the caller to modify the data after the
widget is rendered.  It's useful for in-place additions of newly created
items.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAcq upload UI re-use new picklist
Bill Erickson [Fri, 10 Feb 2012 15:37:52 +0000 (10:37 -0500)]
Acq upload UI re-use new picklist

In the ACQ file upload UI, if the user loads the records into a new
selection list, this change allows the user to continue using the new
list without having to refresh the page.

Without this change, re-using the new list would result in the system
trying to create a new list with the same name, which fails.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay open picklist/PO/queue in new tab
Bill Erickson [Wed, 8 Feb 2012 19:37:44 +0000 (14:37 -0500)]
ACQ+Vandelay open picklist/PO/queue in new tab

In the staff client, after a file upload, if a picklist, queue, or PO
are created, make the links open their respective pages in new tabs.
When not running inside the staff client, allow the links be regular
href's.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay detect existing queue with same name
Bill Erickson [Wed, 1 Feb 2012 14:12:23 +0000 (09:12 -0500)]
ACQ+Vandelay detect existing queue with same name

Within the acq/vandelay agent, detect when a user has entered the name
of one of their existing queues.  When detected, update the queue
selector to match the found queue (which updates the linked match set
and clears the queue selector input).  Otherwise, users may not realize
they are adding items to an existing queue (with a pre-linked match
set).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay limit upload queue selector to ACQ queues
Bill Erickson [Tue, 31 Jan 2012 20:59:41 +0000 (15:59 -0500)]
ACQ+Vandelay limit upload queue selector to ACQ queues

When uploading bibs to vandelay queues from ACQ interfaces, only allow
records to be added to queues tagged as 'acq' queues (or to new 'acq'
queues).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay disallow match_set change on selected queue
Bill Erickson [Tue, 31 Jan 2012 17:17:20 +0000 (12:17 -0500)]
ACQ+Vandelay disallow match_set change on selected queue

Consistent with Vandelay, if a queue is selected, show the linked
match_set and disable the match_set selector.  Existing queues are
already linked to a match set, so allowing the user to select one has no
effect, which is confusing.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay API support for queue-and-match only from ACQ
Bill Erickson [Tue, 31 Jan 2012 15:49:14 +0000 (10:49 -0500)]
ACQ+Vandelay API support for queue-and-match only from ACQ

Allow users to load ACQ records into Vandelay queues and apply a
match_set at queue creation time, without requiring the user to
import/merge the ACQ records.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay ACQ Records in vandelay queue selector
Bill Erickson [Tue, 31 Jan 2012 15:01:01 +0000 (10:01 -0500)]
ACQ+Vandelay ACQ Records in vandelay queue selector

Adds a new type of record to select from the Vandelay queue selector.
Selecting "Acquisitions Records" will show queues with type 'acq'.
Selecting the existing "Bibliographic Records" selector will only show
queues with queue_type 'bib' (i.e. non-acq queues).

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay permission improvements
Bill Erickson [Thu, 19 Jan 2012 19:02:32 +0000 (14:02 -0500)]
ACQ+Vandelay permission improvements

Be more vigilant about enforcing permissions for various ACQ and
Vandelay actions.

1. Using vandelay to create new bib records now requres the IMPORT_MARC
permission (same as open-ils.cat.biblio.record.xml.import).  If the
permission fails, the queued record will fail import and be stamped with
a new "import.record.perm_failure" vandelay import error.

2. Added suport for testing additional permissions before a new record
is created via vandelay.  This allows interfaces leveraging vandelay
(e.g. ACQ) to create a higher barrier to entry.  Added an ACQ perm
IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD that prevents users from creating
new bib records directly from the ACQ vendor MARC file upload interface.

The secondary permission is not meant as a security enhancement, per se,
since the user is required to have the IMPORT_MARC permission to get this
far in the process.  It's more of a feature-specific precautionary
permission to prevent unintended record creation within certain
permission groups.

3. Checking the CREATE_PURCHASE_ORDER permission during the ACQ vendor
file upload process.  It's absence appears to have been an oversight.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay link to vandelay queue from lineitem list UI
Bill Erickson [Fri, 6 Jan 2012 21:31:22 +0000 (16:31 -0500)]
ACQ+Vandelay link to vandelay queue from lineitem list UI

In the general purpose lineitem interface (li_table), there is now a
link to the Vandelay queue which contains the queued bib record used to
load/merge/link the lineitem.  Queue opens in a new staff client tab.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay import/merge user interface components
Bill Erickson [Tue, 6 Dec 2011 18:50:29 +0000 (13:50 -0500)]
ACQ+Vandelay import/merge user interface components

Acquisitions support for leveraging Vandelay import/merge controls
for loading ACQ records and/or linking ACQ records to existing
catalog records.

Dev includes:

* General purpose Vandelay input form and merge progress indicator (VLAgent)
* VLAgent is now shown in the following interfaces when a bib load/merge/link action is required:
 * Vendor record upload interface
 * PO creation
 * PO "load bibs and items" action
 * PO activation

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay API to support Vandelay-mediated imports
Bill Erickson [Wed, 30 Nov 2011 20:42:30 +0000 (15:42 -0500)]
ACQ+Vandelay API to support Vandelay-mediated imports

Adds support for merging, overlaying, importing, and linking (a no-op
merge) acquisitions lineitems to catalog records via Vandelay.

All non-imported lineitems will now be processed through Vandelay during
record upload and asset creation (load bibs and items), based on the
Vandelay import parameters provided by the caller.  Each processed
lineitem will also be linked to its queued Vandelay record.  In the case
of a failed import, such records can be subsequently imported manually
from the Vandelay interface using the manual record overlay options.

ACQ API calls affected now report on the progress of Vandelay record
import in addition to lineitem creation, copy creation, etc.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoACQ+Vandelay schema and IDL changes w/ upgrade script
Bill Erickson [Wed, 30 Nov 2011 19:54:41 +0000 (14:54 -0500)]
ACQ+Vandelay schema and IDL changes w/ upgrade script

Adds a queued_record link from acq lineitems to vandelay queued record.
Ditto acq_lineitem_history.  This will be used to link vandelay-mediated
acq lineitems to the vandelay record used for their import.

For ease of future changes, port the queue_type column from bib and
authority queues to ENUMs and drop the constraint, which is implicit in
the ENUM.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAdd patron profile filter to horizontal search
Ben Shum [Thu, 8 Mar 2012 07:00:26 +0000 (02:00 -0500)]
Add patron profile filter to horizontal search

LP 715837 added the ability to filter by a specific patron
profile during a patron search, but only in the default vertical
search interface.  For sites using horizontal search, this new
filter option had never been included.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
10 years agoUpdated upgrade script for 2.1-2.2
Thomas Berezansky [Mon, 12 Mar 2012 12:57:49 +0000 (08:57 -0400)]
Updated upgrade script for 2.1-2.2

Prepping for alpha3

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
10 years agoCopy Location Search Groups Upgrade Script Version
Thomas Berezansky [Sun, 11 Mar 2012 13:29:51 +0000 (09:29 -0400)]
Copy Location Search Groups Upgrade Script Version

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
10 years agoAdd styles to org selector for loc groups
Dan Scott [Sun, 11 Mar 2012 00:53:47 +0000 (19:53 -0500)]
Add styles to org selector for loc groups

Looks like user agents don't let us do a lot with styling OPTION
elements (text colour, background colour) but this gives sites that want
to further distinguish copy groups from libraries in the org selector
something to work with.

Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Groups : sort to top option
Bill Erickson [Thu, 1 Mar 2012 18:51:53 +0000 (13:51 -0500)]
Copy Location Groups : sort to top option

Adds a 'top' flag to copy_location_groups which, when enabled, will
cause the location group to sort above the child org units in the org
unit selector in the tpac.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoTPac: detail page distinct copy/holdings display depth
Bill Erickson [Thu, 1 Mar 2012 15:18:49 +0000 (10:18 -0500)]
TPac: detail page distinct copy/holdings display depth

This adds a new CGI param "copy_depth" which the record detail page uses
to determine which copies to display in the copy grid and what serials
holdings data to show.

The goal is to separate search depth from copy display depth for 2
main reasons:

1. When present, the search ou is set by the "locg" parameter (org +
copy location group).  The "Show" links in the record detail page use
"loc" to determine the copy location org (and subsequently the depth),
which is ignored in the presence of "locg".  In other words, we need
a different way to communicate which range of copies to display.

2. Separating copy depth and search depth allows us to display
search location-related summary information while at the same time
displaying a broader set of copy information.  For example, searching
BR1, we can see copy summary info for BR1, SYS1, and CONS even when
explicitly viewing copy information for CONS.  In other words, viewing a
broader set of copies for a record does not change the search/context
org unit, it only extends the set of copies to display.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Search Groups : admin UI improvements
Bill Erickson [Fri, 24 Feb 2012 20:43:47 +0000 (15:43 -0500)]
Copy Location Search Groups : admin UI improvements

Two improvements to the location group list.

1. Replace x / checkmark glyphs with clearer Visible / Not Visible
labels.  Thanks for the suggestions, Lebbeous.

2. Vertically align the edit actions block and the drag grips so the
actions are always in the same place.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Search Groups : Release Notes
Bill Erickson [Wed, 22 Feb 2012 15:31:37 +0000 (10:31 -0500)]
Copy Location Search Groups : Release Notes

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Search Groups : Admin UI
Bill Erickson [Fri, 17 Feb 2012 21:14:16 +0000 (16:14 -0500)]
Copy Location Search Groups : Admin UI

Added admin UI for managing copy location groups.  It allows the user to
create/edit/delete groups and add copy locations to the groups.

The UI can be found under Admin -> Local System Administration -> Copy
Location Groups.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Search Groups : TPac org unit selector
Bill Erickson [Fri, 17 Feb 2012 16:57:19 +0000 (11:57 -0500)]
Copy Location Search Groups : TPac org unit selector

Adds support for viewing and searching on copy location groups in the
tpac.  Groups appear within the org unit selector, when the selector is
used in a search context.  Groups display below the owning org unit
similar to a child org unit.  Groups are displayed for all org units
that meet the following criteria:  search org unit, physical location,
patron home org unit, plus ancestors and descendents of each.

To support this, TPac gets a new "locg" CGI parameter, which contains
the org unit and copy location group.  It takes the form
org_id:group_id.  The TPac mod_perl code will extract this value and
popuplate the search_ou accordingly.  For consistency, we also use
ctx.search_ou instead of directly checking CGI.param('loc') within the
template environment.

This also includes a rewrite of the org_selector.tt2 template.  It
changes it from a recursive routine to a depth-first while loop.  I did
this mainly because the recursive approach was suffering from global
variable clobbering in the template environment.  In theory, this new
approach should be faster as well.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Search Groups : location_groups() QP filter
Bill Erickson [Wed, 15 Feb 2012 20:33:29 +0000 (15:33 -0500)]
Copy Location Search Groups : location_groups() QP filter

Adds a new QueryParser search filter "location_groups" which takes a
list of asset.copy_location_group IDs and filters on the mapped copy
locations.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoCopy Location Search Groups : DB / IDL
Bill Erickson [Wed, 15 Feb 2012 17:22:47 +0000 (12:22 -0500)]
Copy Location Search Groups : DB / IDL

Adds 2 new tables, one for defining copy location groups and another for
mapping copy locations to groups.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
10 years agoTPAC: Teach mkurl() to discard POST params
Dan Scott [Sat, 10 Mar 2012 17:36:08 +0000 (12:36 -0500)]
TPAC: Teach mkurl() to discard POST params

Unless we explicitly ask for POST params with the "params" argument to
mkurl(), prevent them from propagating. (Can't think of situations when
we would want to propagate a POST param, but we err on the side of
flexibility so...)

Thanks to Thomas Berezansky for suggesting the CGI url_param() method of
filtering POST params.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
10 years agoTrivial redundant line removal
Dan Wells [Sat, 10 Mar 2012 02:34:43 +0000 (21:34 -0500)]
Trivial redundant line removal

Trivial change to remove duplicate setting of 'password' member
left over from auth-proxy branch merge.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoAdd id_attr LDAP attribute to opensrf.xml.example
Dan Scott [Thu, 8 Mar 2012 18:36:04 +0000 (13:36 -0500)]
Add id_attr LDAP attribute to opensrf.xml.example

Also add a Release Notes entry for the authentication proxy service.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoAdd basic unit tests for AuthProxy + associated fixes
Dan Scott [Fri, 10 Feb 2012 03:24:03 +0000 (22:24 -0500)]
Add basic unit tests for AuthProxy + associated fixes

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

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

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

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

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

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

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

Use one statement per line.

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

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

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

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

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

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

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

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

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

Also, some unrelated whitespace changes.  Sorry, Dan.

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

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

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

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

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

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

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

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

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

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

Activity entries are fleshed in the calls:

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

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

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

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

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

Pile of user activity related additions:

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

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

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

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

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

* Creates usr_activity entries for login and authentication verification
  requests

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

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

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

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

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

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

Current default values for "ewho":

opac
staffclient
selfcheck
authproxy
ums
libraryelf
ezproxy

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Spec as follows:

Individual screens use its own settings for receipt templates

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

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

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

holds_on_bib
holds_for_patron
holds_shelf
holds_pull_list

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

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

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

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

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

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

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

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

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

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

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

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

Specifically, these interfaces:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Some reasons for adding a tab limit include:

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

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

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

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

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

We now have users_patrons_* and users_staff_*

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

134 staff users

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

See also LP #926281

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

100 Patron users

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

See also LP #926281

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

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

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

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

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

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

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

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

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

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

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

Making sure everything is consistent on the documentation licensing
front.

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

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

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

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

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

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

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

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

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

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