gmc [Mon, 22 Nov 2010 04:26:44 +0000 (04:26 +0000)]
hold targeter: add option to run parallel targeter processes
Permit the hold targeter to divvy up the work and run more than one process
at a time by setting the opensrf.xml setting hold_targeter/parallel to a
value greater than one. Doing so can significantly reduce the
time it takes to (re)target a large number of hold requests, although
only up to a point (in other words, if increasing the number of parallel
targeters beyond one, it is recommended to do so slowly.)
phasefx [Sun, 21 Nov 2010 10:36:10 +0000 (10:36 +0000)]
add xhtml namespace to global.css, though I can't figure out how to style the xhtml.textarea in the marc editor with font_helper. Tried .ALL_FONTS_LARGER xhtml.textarea and .ALL_FONTS_LARGER *.textarea to no avail
dbs [Sat, 20 Nov 2010 19:47:54 +0000 (19:47 +0000)]
Address maintain_control_numbers() database function bug #677160
Jason Stephenson reported a bug handling records with multiple
001 or 003 fields, and supplied a set of test records to
reproduce the condition. The bug caused the ingest process
to throw a database error, rolling back the transaction and
preventing the actual ingest of those records.
The solution was to simplify the logic in maintain_control_numbers().
Now, in the case that there are either multiple 001s or 003s in the
incoming record, we simply delete all of the 003s and 001s and
create the desired 001 and 003. Also, if there are not exactly one
001 and one 003 in the incoming record, we do not try to preserve
one of those values in the 035 as it would be close to meaningless.
Many thanks to Jason for the clear bug report and test cases!
gmc [Thu, 18 Nov 2010 16:28:21 +0000 (16:28 +0000)]
use pcrud auto-complete widget when selecting providers
Fixes general slowness working with invoice and PO forms if
more than a couple hundred providers are defined.
This could be generalized with a bit of work with Fieldmapper
to define "has-one-chosen-by-user-from-cast-of-thousands"
relationships that should trigger use the auto-complete widget.
gmc [Thu, 18 Nov 2010 16:28:19 +0000 (16:28 +0000)]
fetchItemByIdentity now returns null immediately upon null identity
Besides being trivially more efficient, this avoids a situation
where pcrud can sometimes time out when attempting to retrieve
a row by a null PK value.
erickson [Thu, 18 Nov 2010 15:36:18 +0000 (15:36 +0000)]
fetch more than the default 10 (per page) distrib formulas; 500 is arbitrary, but still notably less than the infinity that was in effect before paging. todo: research optiosn for using the new autofieldwidget/dojo/pcrud-store instead
erickson [Tue, 16 Nov 2010 23:33:27 +0000 (23:33 +0000)]
in the staff client, use the user object in the XUL stash instead of grabbing the user object on each page load for embedded staff web UIs (/eg/). This is one less pre-onload XHR and another step in the avoidance of the cursed WSOD. Added support for launching the xul login dialog after a timed out session event is returned.
senator [Tue, 16 Nov 2010 23:02:25 +0000 (23:02 +0000)]
Wonder of wonders, a Dojo data store supporting lazy loading objects via pcrud!
So openils.PermaCrud.Store was dreamt up and directed by Mike Rylander, and
implemented by me. Right now it gives us a new way to provide widgets for
selecting objects in Dojo-based interfaces.
Where previously we had some dropdowns here and there that really shouldn't
be dropdowns (such as one for selection lists in Acq, and several for resources
and resource types in Booking -- these examples I've replaced, but there are
surely more) because loading a dropdown with potentially zillions of items
to choose from can take forever and break the interface, now we can have
autocompleting textboxes that only load items matching what you type (and
even then with a low-ish default limit so that if you're vague in your input
you still don't get huge unwieldy result sets).
Easiest way to see an example is if you already have any acq selection lists.
Just go to any catalog record, choose Actions for this Record, choose View/Place
orders, then click "Add to Selection List." In the resulting dialog, that
second field used to be a dropdown, but now it's an autocompleting textbox.
Alternatively, you can see these in the affected booking interfaces (see files
modified in this commit) under Admin -> Server Administration -> Booking.
The future promises even better things for this store. When it implements the
Dojo Write API, interfaces using grids can potentially be vastly simplified
by relying on the store to save its own dirty objects. The Notification API
would facilitate easy use of single stores with multiple widgets. All good
things for faster-to-write interfaces.
phasefx [Tue, 16 Nov 2010 20:10:13 +0000 (20:10 +0000)]
extend the opac org hiding feature to the place hold pickup lib menu. Note that this feature depends on Apache being configured to maintain the ol= URL param
erickson [Mon, 15 Nov 2010 20:26:22 +0000 (20:26 +0000)]
return AutoIDL to its original state of loading the while IDL if no classes are selected. This will ease the process of moving to /IDL2js; other minor cleanup
senator [Mon, 15 Nov 2010 18:28:25 +0000 (18:28 +0000)]
Serials: two little things to make alt serials control interfaces less painful
to use.
The copy template editor now gives dropdowns for fine level and loan duration.
This is particularly useful since at receive time, if you're trying to create
units, you can't do it with null values in those fields.
The caption and pattern pane of the subscription details interface now sets the
active checkbox to checked by default when creating new caption and patterns.
This helps prevent user confusion if you create a caption/pattern and move on
to the issuances tab and find that you can't apply the caption/pattern that
you just created because you didn't make it "active."
dbs [Mon, 15 Nov 2010 05:23:56 +0000 (05:23 +0000)]
Prevent creation of authority records that are truncated by one letter
The summarizeField() function grabbed the values of the XUL elements,
which were set by the keypress event listeners on the XUL elements.
However, the keypress event listener seems to capture the value of
the XUL element before the value of the new key is appended to the
existing value in a textbox - so, when you typed a new subfield, then
right-clicked to create an authority, the value that was captured was
missing the final character.
Adding the "input" event to the registered listeners captures the
actual value for creating an authority and solves the problem. It
might be possible to remove the keypress event listeners, but for
now we'll take the cautious route.
dbs [Mon, 15 Nov 2010 04:50:22 +0000 (04:50 +0000)]
Fix negative paging issue in open-ils.supercat.authority.author.startwith
When paging backwards through authority lists, we were skipping the
first page of results. By reducing the offset by the value of one
page, we restore the expected order.
The same problem might affect other paging interfaces: to be determined.
dbs [Mon, 15 Nov 2010 01:45:11 +0000 (01:45 +0000)]
Do not cache the authority context menu
Caching would be great, except when you add an authority in the
flow and you expect to see it the next time you right-click
on the authority that you just added.
erickson [Fri, 12 Nov 2010 13:55:58 +0000 (13:55 +0000)]
Server-generated IDL JS
The goal is to reduce use of pre-onload XHR, which is known to cause
problems (dreaded white-screen-of-death) in firefox/xulrunner. Change
allows opac, staff client, and embedded browser interfaces to load
a pre-formatted JS object instead of IDL XML via XHR. In addition to
dropping the XHR, clients no longer parse the XML, which should reduce
page render time. Finally, in the staff interfaces, the full IDL is
once again loaded, so there is no need to specifiy per-page classes.
Per-page classes are still supported and used in the OPAC to reduce the
up-front load time.
Change requires an update to the Evergreen Apache config. See -r18700.
Part of this change included condensing fieldmapper.hash and
fielmapper.dojoData content into fieldmapper.Fieldmapper to avoid
circular dependencies, which was causing problems with IE. Will
eventually want to deprecate .hash and .dojoData, but for now they still
function as before.
phasefx [Thu, 11 Nov 2010 17:41:13 +0000 (17:41 +0000)]
patch from bshum to bring his Search Catalog button in the button bar inline with tsbere's r18431 for new tab vs current tab functionality with the button bar
dbs [Thu, 11 Nov 2010 16:55:52 +0000 (16:55 +0000)]
Avoid munging 035 when a new record is created
If there is no 003 in the record when it is created, then we will not attempt
to generate a 035. If the incoming record contains a 001 and 003, then we will
create a 035.
dbs [Thu, 11 Nov 2010 16:50:10 +0000 (16:50 +0000)]
Do not supply a default value for 003 in new authority records
With cat.maintain_control_numbers enabled by default, we can trust
the database trigger to create the appropriate 003 for us - and by
not supplying a 003 in the new record, we won't create a spurious
035 for a brand new record.
dbs [Thu, 11 Nov 2010 03:49:31 +0000 (03:49 +0000)]
Update the edit dates for authority and MFHD records when they are edited
Addresses the oversight in the original implementation that missed this;
important if we're going to differentiate between creating and editing
a record for triggers.
dbs [Wed, 10 Nov 2010 22:26:42 +0000 (22:26 +0000)]
Enable "maintain control numbers" and "record ID as TCN" behavior by default
Per http://ur1.ca/2bgc4, this behavior hews more closely to the MARC21
specification. Note, however, that duplicate bib detection in the
"Import via Z39.50" interface will be somewhat affected; a more
trustworthy workaround is to include the "Local catalog" in Z39.50 searches to
determine if a matching record already exists in the database.
senator [Wed, 10 Nov 2010 21:51:01 +0000 (21:51 +0000)]
Serials: patch from Dan Wells to address Launchpad bug #670734
Previously, a dialog box to select an org unit for the creation of legacy
MFHD records relied on a feature (window.opener) that has been
removed in newer versions of XULRunner.
This patch has that dialog box use a different, safer approach to accomplish
its task.
senator [Wed, 10 Nov 2010 21:29:51 +0000 (21:29 +0000)]
Booking: fix bug reported by Robert Soulliere wherein the items associated
with picked-up reservations didn't actually get their status set to 'checked
out' like they should have.
Robert reported this bug on Launchpad (#672748) and provided a patch, but
there were some neighboring bugs in the circulation logic anyway, so they've
all been fixed together.
phasefx [Wed, 10 Nov 2010 20:51:23 +0000 (20:51 +0000)]
replace Cookie.js/cookieManager with dojo.cookie. Some things to watch out for as we review this changeset:
In Cookie.js, a -1 passed as the expires parameter indicated a session cookie. We could also specify such things as "+1y" or a specific date. With dojo.cookie, an expires value of -1 deletes a cookie. Not specifying an expires option will create a session cookie. We can enter a date or a number days from today. For the case in the code where we had "+1y", I supplied a value of 365.
In the previous code, we used empty strings for a lot of cookie deletion. The canonical dojo example has us using null (with an expires of -1). There were also some cases where it seemed obvious that we were deleting cookies, but were at the same passing an actual value (see base.js). I changed these to nulls.
In opac_utils.js, grabFleshedUser(), I fixed a dead code path where a cookie deletion attempt came after a return statement.
I ran through the opac within and outside of the staff client, tried all of the acquisition UI's from the Acq menu, and most of the interfaces under Admin, and didn't find any auth cookie errors.
miker [Wed, 10 Nov 2010 19:53:37 +0000 (19:53 +0000)]
Improved permission checking speed for PCRUD mode.
When there are more than some number of rows (5, by default) we use usr_has_perm_at_all to get the list of locations and cache them. This cache is flushed per-session.
gmc [Wed, 10 Nov 2010 13:18:29 +0000 (13:18 +0000)]
do not use TRUNCATE when refreshing reporter.materialized_simple_record
Previous behavior would break Slony replication after doing a
bib load. Since a deletion is slower than a truncate, if you're
not using Slony replication, you may prefer to truncate rmsr
prior to calling reporter.enable_materialized_simple_record_trigger.
dbs [Mon, 8 Nov 2010 21:21:31 +0000 (21:21 +0000)]
Add the OpenURL resolver caching service as an optional component
Currently limited to supporting the Ex Libris SFX OpenURL resolver,
this caches the results of looking up full-text availability of
resources by ISBN or ISSN.
For an example of incorporating this service into your OPAC, see
http://svn.open-ils.org/trac/ILS-Contrib/browser/conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml#L102
for returning the full-text availability of a given resource by ISSN.
senator [Mon, 8 Nov 2010 20:44:06 +0000 (20:44 +0000)]
Acq: in acq search, avoid trying to create a dropdown from every bib ID in
the system, providing a normal text input field instead (or search by file
of terms).
erickson [Mon, 8 Nov 2010 16:21:15 +0000 (16:21 +0000)]
holds retrieval API call sorting and cleanup; sort non-cancelled holds by ready-for pickup, then active, then suspended; use json_query to fetch IDs first, so id_list calls can avoid fetching the full hold objects in the ML. sort fleshed transit by send time to pick up the latest transit
dbs [Mon, 8 Nov 2010 00:34:00 +0000 (00:34 +0000)]
Improve Fedora prerequisite installer
* Explicitly install wget, which isn't installed in a minimal install
* Hack JavaScript-SpiderMonkey Makefile.PL for 32-bit Fedora
* Provide a fedora14 target
* Change "fedora-13" to "fedora13" to match OpenSRF prereq installer
dbs [Fri, 5 Nov 2010 17:50:05 +0000 (17:50 +0000)]
Keep the hierarchy in line for O:A:S:Publisher::action.pm
Oddly enough, this didn't seem to affect hold-targeting functionality, but
testing was focused on placing a hold via the OPAC, and there's potential
for other things to go amiss.
dbs [Fri, 5 Nov 2010 17:35:38 +0000 (17:35 +0000)]
Initial support for recall of items triggered by placing a hold
In academic libraries, it is common for groups like faculty and graduate
students to have extended loan periods (for example, 120 days), while
others have more common loan periods such as 3 weeks. In these environments,
it is desirable to have a hold placed on an item that has been loaned out
for an extended period to trigger a "recall": truncating the loan period,
setting available renewals to 0, optionally changing the fines associated
with overdues for the new due date, and notifying the current patron of
the recall.
New actor.org_unit_setting entries and hold targeting logic enable libraries to
control whether a hold will trigger a recall of a circulating item as follows:
* "Recalls: Circulation duration that triggers a recall" (recall threshold)
is specified as an interval (for example, "21 days"); any items with a
loan duration of less that this interval will not be considered for a
recall
* "Recalls: Truncated loan period" (return interval) is specified as an
interval (for example, "7 days"), such that the user who currently
has the item checked out will get the greater of either the recall
threshold, or the return interval.
* "Recalls: An array of fine amount, fine interval, and maximum fine"
is an optional setting that applied the new fine rules to the current
circulation period.
When a hold is placed and no available copies are found by the hold targeter,
the recall logic checks to see if the recall threshold and return interval
settings are set; if so, then the hold targeter checks the currently
checked-out copies to determine if any of the currently circulating items at
the designated pickup library have a loan duration longer than the recall
threshold. If so, then the eligible item with the nearest due date will be
recalled.
gmc [Fri, 5 Nov 2010 16:45:45 +0000 (16:45 +0000)]
fix user password reset request time column def
Needs to be a timestamp with time zone; fixes a bug
where it was interpreted as a UTC time, throwing off
the calculation of the expiration of the password reset
request.
phasefx [Fri, 5 Nov 2010 13:22:15 +0000 (13:22 +0000)]
Patch from Benjamin Shum for the staff client button bar. Thanks!
---
In our consortium, we have the Button Bar for our Evergreen staff
clients enabled all the time. As a result, we have had lots of feedback
from users that there is a need to include a "Search Catalog" option on
the Button Bar.
This is our first attempt at writing something against trunk and
submitting it as a minor patch. Melissa Lefebvre created the icon for
the button by adapting existing icon sets. I set out to create the
requisite .diff file against a recent copy of trunk. I was unsure of
how to apply our changes to other locales' lang.dtd files, the one I
found most immediately was for en-US (our default).
If the community approves, we would like to see this become part of
future releases of Evergreen 1.6 and 2.0.
Thank you for your consideration.
-- Ben
--
Benjamin Shum
Open Source Software Coordinator
Bibliomation, Inc.
32 Crest Road
Middlebury, CT 06762
203-577-4070, ext. 113
senator [Thu, 4 Nov 2010 21:19:12 +0000 (21:19 +0000)]
Net::uFTP isn't giving us needed functionality
Since the OpenILS::Utils::RemoteAccount already uses Net::SSH2 directly
(Net::uFTP was supposed to be an abstraction over SSH /and/ FTP), just use
Net::FTP (installed by default with perl on most systems) for FTP
gmc [Thu, 4 Nov 2010 01:03:42 +0000 (01:03 +0000)]
add TT helper to squeeze strings into the UNOB straitjacket
The force_jedi_unob helper strips non-ASCII characters from
template output but does so nicely by converting the string
to NFD first. This is meant to be used by EDI templates, although
could be useful for A/T output that goes to receipt
printers that cannot print diacritics.