Jason Etheridge [Thu, 11 Aug 2011 18:16:24 +0000 (14:16 -0400)]
in lieu of Ready Item Editor
We're trying to prevent folks from using the item attribute editor in the
unified interface when the volume pane is still updating its information
(i.e. building the copies to feed to the attribute editor), so that a
given editing widget isn't ripped out from under staff while its being
used. This change removes the heavy-handed Ready Item Editor button and
instead tries to more gracefully manage the editor state based on change
and keypress events. Also change the color scheme for a disabled editor
from red to light pink.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Specifically for patron-derived overrides:
PATRON_EXCEEDS_OVERDUE_COUNT
PATRON_BARRED
PATRON_EXCEEDS_CHECKOUT_COUNT
PATRON_EXCEEDS_FINES
This is done by:
Adding support for a list of "reported" overrides to util/network.js
Using that in Checkout to build an auto-override list for the current patron
Passing that list in at Checkout
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Mon, 8 Aug 2011 19:05:47 +0000 (15:05 -0400)]
Granular invalid data detection for Vandelay item import
When an import item contains any data for a field, the code now verifies
the data is valid for the selected field. When the data is not valid,
we capture information on which field is invalid and what data was used
for the field (import_error, error_detail) so it can be reported in the
interface.
Jason Etheridge [Mon, 8 Aug 2011 18:06:57 +0000 (14:06 -0400)]
Fix stop sign page race condition with checkout
This would happen most often when retrieving multiple patrons at the same time
from patron search--the stop sign page would show but then get trampled by the
checkout interface, which normally loads first.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Jason Etheridge [Mon, 8 Aug 2011 19:22:34 +0000 (15:22 -0400)]
username login for web selfcheck
Changes the behavior for the patron-login component (after staff login) to match
the OPAC. By default, it assumes you are logging in with a usrname, but if the
org unit setting 'opac.barcode_regex' is enabled and the incoming value matches,
then it gets treated as a library card barcode instead. If usrname is used, then
the card referenced by actor.usr.card is checked in lieu of a specified barcode.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Tue, 2 Aug 2011 03:07:24 +0000 (23:07 -0400)]
action for marking items claimed never checked out
Menu action in Patron Items Out for marking items as Claimed Never Checked Out.
Note that this action behaves differently than Claimed Returned, in that the
item is actually checked in and the transaction closed, and will not continue
to show up in Items Out for the patron.
If decide later to provide an option for making the two actions consistent,
there is code in the original working branch, collab/phasefx/claimed_never_cko,
which modifies the patron display and the .checked_out methods to look for
open CLAIMSNEVERCHECKEDOUT transactions. Some cleanup would be needed to avoid
merge conflicts.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 4 Aug 2011 16:11:49 +0000 (12:11 -0400)]
Robustify SKIP_ASSET_CHANGE functionality
by skipping status_changed_time test if a barcode has been encountered in prior
offline transaction within a given session. Also return the SKIP_ASSET_CHANGE
event for a given barcode if a prior test resulted in SKIP_ASSET_CHANGE
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 4 Aug 2011 02:32:51 +0000 (22:32 -0400)]
Offline checkin & renewal checks, & ou settings
Augmented edoceo's patch for checking an offline checkout against an item's
Status Changed Time and throwing a SKIP_ASSET_CHANGED event if warranted as
follows:
1) include checkin and renewal transactions
2) add org unit settings for each, and a corresponding upgrade script
3) removed the description from the payload and created a dedicated ils_event
However, there are two issues affecting this functionality, even before my
meddling:
1) the Reshelving -> Available rollover updates an item's Status Changed Time,
and can thus trigger this event
2) if an item is manipulated more than once in an offline session, then its
Status Changed Time can be updated as the transactions are being processed,
causing related transactions after the initial transaction to fail
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
In a middle-layer method for returning holdable formats on a metarecord,
Do a better test of copy holdability than we were doing previously.
We can't do a perfect test: we don't really know what patron we're doing
this for, and even if we did, from here it's nontrivial to figure out
whether we're doing indb holds or script-based, much less run the tests.
Still, we can test whether a copy's in a holdable status, a holdable
location, and is itself not explicitly marked unholdable.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Michael Peters [Thu, 4 Aug 2011 12:59:15 +0000 (08:59 -0400)]
LP#818311: ACQ_INVOICE_REOPEN is missing
This patch adds the missing ACQ_INVOICE_REOPEN to the Acquisitions
Administrator user.
Signed-off-by: Michael Peters <mrpeters@library.in.gov> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Fri, 29 Jul 2011 20:09:58 +0000 (16:09 -0400)]
Fix i18n build
Two problems thrown at the i18n build:
* $$ quoting is not understood by db-seed-i18n.py; simple approach is
to use standard single-quote escaping of the single-quote in
950.data.seed-values.sql (warning: this might lead to other problems
with the regular expression in db-seed-i18n.py)
* authority.js includes Unicode values (shock!) and so we must treat
the incoming strings as unicode() instead of plain old str()
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
AKA:
Lang is 3 characters long. Entering 1 character would cause focus to leave.
MARC would also update incorrectly.
This only triggers the update when the full 3 characters are entered.
This not only prevents issues with catalogers editing multi-character fixed
fields but also makes it less likely they accidentally corrupt the records.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Mon, 1 Aug 2011 06:10:15 +0000 (02:10 -0400)]
Fix overzealous template application
The idea was that we'd track templates if they were applied prior to copies
actually being specified in the unified interface, and then apply them "for
real" once copies were entered. But these remembered templates kept applying
themselves whenever changes were made in the volume/copy creator portion of
the interface (possibly overriding tweaks made by staff). So now we delete
the list of tracked templates once they're applied to actual copies.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Disable/style the Item Editor while changes in the volume/item pane are being
considered, and require an explicit press of a Ready Item Editor button to
enable the interface. This reduces the chance of editing widgets in the item
editor from being ripped out from under you (for example, if you try to go
straight from editing a call number to editing an item attribute).
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Deleted a line the removed single quotes (') from search strings
The multiclass_query function replaces single quotes with spaces (') ( ).
This causes a problem when toggling between Advanced and Basic search.
If a search is conducted with a ' in it, that quote appears in the
basic search box displayed above the results. However, if the user
then clicks the 'Advanced' button to toggle to the advanced search
the single quote is missing from the search term. By removing the line
$query =~ /s/'/ /go; from Biblio.pm this problem is resolved.
Signed-off-by: Liam Whalen <lwhalen@evergreen-dev.catalogue.nrcan.gc.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Fixed some syntax errors, but getting no results when I'd expect some
I searched with this
container(bre,bookbag,12,$authtoken)
where $authtoken is substituted with an actual live authtoken for the
user that owns that container, and here is the example generated query
that returns no results:
SELECT * FROM search.query_parser_fts(
4::INT,
2::INT,
$core_query_3553$SELECT m.source AS id,
ARRAY_ACCUM(DISTINCT m.source) AS records,
1.0/((AVG(
(1)
) * COALESCE( NULLIF( FIRST(mrd.attrs @> hstore('item_lang', $_3553$eng$_3553$)), FALSE )::INT * 5, 1)))::NUMERIC AS rel,
1.0/((AVG(
(1)
) * COALESCE( NULLIF( FIRST(mrd.attrs @> hstore('item_lang', $_3553$eng$_3553$)), FALSE )::INT * 5, 1)))::NUMERIC AS rank,
FIRST(mrd.attrs->'date1') AS tie_break
FROM metabib.metarecord_source_map m
JOIN metabib.record_attr mrd ON (m.source = mrd.id)
JOIN ( SELECT ci.target_biblio_record_entry AS container_item
FROM container.biblio_record_entry_bucket_item ci
JOIN container.biblio_record_entry_bucket c ON (c.id = ci.bucket)
WHERE c.btype = $_3553$bookbag$_3553$ AND c.id = 12
AND (c.pub IS TRUE OR c.owner = 1)) container ON (container.container_item = mrd.id)
WHERE 1=1
AND (TRUE)
GROUP BY 1
ORDER BY 4 ASC NULLS LAST, 5 DESC NULLS LAST, 3 DESC
LIMIT 10000
$core_query_3553$::TEXT,
$${}$$::INT[],
$${}$$::INT[],
NULL::INT,
1000::INT,
10000::INT,
'f'::BOOL,
't'::BOOL
);
Mike Rylander [Fri, 22 Jul 2011 19:10:23 +0000 (15:10 -0400)]
Add cointainer() and record_list() filters to QueryParser
The container() filter takes 3 or 4 positional params:
- class (bre, acn, acp, au)
- type (bookbag, etc -- btype of the container)
- id (container id)
- token (authtoken, optional, for checkin ownership of non-public containers)
The record_list() filter takes a list of record ids to restrict the search by.
These are bib ids by default, but are treated as metarecord ids in the presence
of the #metabib (aka #metarecord) modifier.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Tue, 2 Aug 2011 16:20:32 +0000 (12:20 -0400)]
lp758945: make receipt template macros repeatable
Patch from Jason Boyer to allow macros to be used
more than once in a section; prior to this patch, only
the first occurrence was replaced with the substitation
value.
Dan Scott [Thu, 21 Jul 2011 21:39:49 +0000 (17:39 -0400)]
Update the README to include database installation instructions
A long time ago, the database server was installed by default.
Nowadays, installing the database server is a separate step
reserved for whatever machine you want to devote to PostgreSQL.
Not that you can't put it on the same machine as the rest of
Evergreen and OpenSRF...
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Bill Erickson [Mon, 1 Aug 2011 18:09:23 +0000 (14:09 -0400)]
Avoid xml_transform retrieval in record attr def editor
config.xml_transform stores large chunks of XML. Fetching it angers
Ejabberd on my test system. All we need is the name, so use the new
AutoFieldWidget.searchOptions param to do just that.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Mon, 1 Aug 2011 18:04:24 +0000 (14:04 -0400)]
AutoFieldWidget support for augmenting pcrud search options
Adds a new searchOptions attribute to AutoFieldWidget for specifying
additional parameters to pcrud when retrieving linked objects. The
initial use case is for supporting a "select" list to allow
AutoFieldWidget to retrieve only the display column of a linked object
and not the whole object.
Example:
// fetch 'remote_field_name' on the remote objects instead of
// fetching the entire object
Dan Scott [Thu, 28 Jul 2011 19:49:12 +0000 (15:49 -0400)]
Fix broken builds due to test that can't find its data
LP 817699 reports a problem that began with commit e9cd992fa4dbf1013346336193cb7469ecee10a8, reintroducing a problem that
had previously been resolved with commit f017d1261c369b9b5cc3c9cfc4f50d3cdf12a445. In short, tests can and are
run from different directories, but a new test opened a file without
making any allowance that the test might be run from anything other than
the /test/ directory.
This fix uses the dirname(__FILE__) approach to provide the appropriate
relative directory for the test data, and enables the tests to be
processed without dying.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Make users confirm they really want to delete lineitems from POs...
... when they've already been ordered. There's really no reason to ever
make such a deletion this that I can think of, but I use a confirm()
instead of stricter measures in case I'm missing something.
Dan Wells [Thu, 21 Jul 2011 16:14:02 +0000 (12:14 -0400)]
Prevent control numbers from duplicating
In maintain_control_numbers(), if you have more than one 001 or
003, and at least one is the correct one, you will end up
duplicating the correct number every time the record is saved.
For example, if the incoming record was record ID # 12345, and
the record contained:
001: 12345
001: ocm10202
... then after maintain_control_numbers() ran, the record would
contain:
001: 12345
001: 12345
Also, clean up some leftovers from the refactor I suggested in the
previous commit.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 21 Jul 2011 15:12:36 +0000 (11:12 -0400)]
Add an unwrapped upgrade script for OCLC-aware control numbers
The upgrade script creates the SCN and LCCN search indexes and
populates them using metabib.full_rec as a source; cheating, but
the normalized values will work for non-exact search purposes. Sites can
reingest all of their bibs if they want exact search to work.
Also, refactor maintain_control_numbers() using a suggestion by
Dan Wells to eliminate some duplicate code.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Thu, 21 Jul 2011 14:18:55 +0000 (10:18 -0400)]
Treat OCLC numbers specially in maintain_control_numbers
For some reason, many records that come with OCLC numbers in the 001
field are not populated with a 003 field. This resulted in the OCLC
number being thrown away entirely, rather than being moved into the 035,
as there was no corresponding control number identifier field.
However, given that we know that control numbers starting with "ocm" or
"ocn" are special OCLC numbers, we can generate the 035 accordingly even
in the absence of a 003. This update to maintain_control_numbers()
teaches it to do the right thing for OCLC numbers.
In addition, add an identifier search index so we can easily find
records by their system control numbers (035 $a subfields).
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Capture holds (not already on hold shelf) as transits instead.
Use cases may include:
New material being cataloged before it is "released". If captured normally
before release the shelf expire time would start ticking and notices would go
out.
Checking items in on a closed day. Can capture holds to avoid them being on a
pull list and set them aside to avoid "ready for pickup" notices and ticking
shelf expire clock.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
When a new item is checked in local holds will be searched and re-targeted.
The search and retarget stops when a hold is found locally that the item can fill.
Already-captured holds will not be retargeted.
"New" is (currently) defined as "In progress" at checkin
Retarget occurs:
Only if the copy's circ library is the checkin library
Only if the checkin is an actual checkin (not a renewal)
Only if the checkin is capturing holds and transits
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Code introduced in c5d36d2a99e45b9a02d00a1e795b66a38c271b43 (SVN r17079)
can generate this event. The description I gave it is meant to be
kind of user-oriented, since patrons might see it in the OPAC. A
somewhat more informative description in available in the commit I named
above.
Add the PERSISTENT_LOGIN permission to the system, and ...
... make it belong to Users (which includes Staff and Patrons) by
default.
This doesn't mean that all logins are persistent (long-lived) by
default, it just means that users do have the permission to request a
long-lived auth session by default.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Jason Etheridge [Tue, 26 Jul 2011 14:33:13 +0000 (10:33 -0400)]
Load embedded OPAC via SSL by default, w/ override option
* url_prefix option for using/forcing SSL.
* oils.secure_opac preference for doing such with the embedded OPAC
--------
To use the preference, you may want to include something like this in server/skin/custom.js:
// Force non-SSL for the OPAC
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
if (!prefs.prefHasUserValue('oils.secure_opac')) {
prefs.setBoolPref('oils.secure_opac',false);
}
} catch(E) {
alert('Error in custom.js trying to set oils.secure_opac preference to false: ' + E + '\n');
}
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Tue, 26 Jul 2011 00:09:18 +0000 (20:09 -0400)]
Ubuntu Lucid needs MARC::Record from CPAN
As Ubuntu Lucid ships with MARC::Record 2.0.0, and Serials requires
2.0.1 or greater, we must install MARC::Record from CPAN or face failing
open-ils.search requests.