Dan Scott [Sat, 11 Jun 2011 11:23:45 +0000 (07:23 -0400)]
Correct base schema for superseded/deprecated functions
As discussed on Evergreen dev list, the base schema didn't
match what one would accomplish via upgrades for the
evergreen.upgrade_list_applied_deprecated() and
evergreen.upgrade_list_applied_superseded() functions;
they were returning TEXT instead of SETOF TEXT.
Bill Erickson [Thu, 9 Jun 2011 14:03:10 +0000 (10:03 -0400)]
Transit minimum checkin interval setting
OK, here's the situation, a copy went away on a week's vacation...
Support for preventing checkin of a copy that was put into transit "too
recently". The scenario that prompted the development is this:
Copy at Branch A is checked in and put into transit to fill a hold at
Branch B. The copy is then accidentally checked in at Branch B.
(Imagine a crate of items with a superbarcode gets checked in at
Branch B and the copy in question was presumed to be in that crate).
This puts the item on the holds shelf (assuming a hold transit) at
Branch B and notifies the patrom the item is ready for pickup.
However, the copy is still just embarking from Branch A.
This new setting allows libraries to configure a minimum transit time.
If a copy is put into transit and checked in during the configured
interval, the checkin will return an (overridable) event that prevents
checkin. If the setting is not configured, this has no affect on
checkin.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Wed, 8 Jun 2011 19:44:37 +0000 (15:44 -0400)]
Extend hold shelf expire date beyond closed dates
If the shelf_expire_time on a hold would land on a closed date for the
pickup library, push the expire time out to just beyond the close date
range, similar to the circulation due date overlap logic.
In the current iteration, the time component of the date is pushed out
to the end of the day (23:59:59). If this is not generally the desired
behavior, an org setting could be added to bypass this step so that the
time matches "now" (i.e. capture time) instead.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Jason Etheridge [Fri, 27 May 2011 15:41:55 +0000 (11:41 -0400)]
Integration of unified vol/copy editor and fast add
* Wire up unified vol/copy editor for marc editor fast item add function
* Robustify callnumber vivication for unified vol/copy editor from marc editor
* Load opac after unified vol/copy with marc editor fast add.
* Various bug fixes
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Tue, 7 Jun 2011 17:52:22 +0000 (13:52 -0400)]
Use native unnest() db function instead of explode_array()
Per LP 789747, the custom explode_array() database function
was found to generate significantly slower results for searches than
using the native (and equivalent) unnest() array function. Given that
unnest() has been part of PostgreSQL since 8.4 and Evergreen 2.0
requires a minimum of PostgreSQL 8.4, this patch removes the definition
of the explode_array() functions and replaces its usage with unnest().
The patron editor form allowed staff to enter a date of birth that takes
place in the future. While it is theoretically conceivable (hah) that
a library might register patrons that have yet to be born, it is
unlikely enough that we will not even assign this behavior to an
org-unit setting, but we will take the bold move of using a regular
expression to prevent a future dates of birth at all.
Note that if a library system travels into the past, this will cause all
sorts of problems in the patron editor interface (not to mention
overdues). Please do not mix Evergreen and time travel.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Scott <dan@coffeecode.net>
Dan Wells [Thu, 2 Jun 2011 19:44:36 +0000 (15:44 -0400)]
Fix false MFHD editing cues (LP #791974)
The in-DB serial holdings use the same general display code as
the MFHD records, but were falsely triggering MFHD administration
widgets when in fact no MFHD record exists. These holdings were
already being marked, so this fix honors that mark.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dan@coffeecode.net>
Dan Wells [Thu, 2 Jun 2011 14:17:07 +0000 (10:17 -0400)]
Tweak MFHD scoping
Three changes:
1) Add a closure for 'entryNum' value (currently used for some display
placement and menu-entry correlation)
2) Remove depth-climb to simplify code and better approximate copy scoping
3) Move 'here' assignment out of the foreach
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dan@coffeecode.net>
Dan Scott [Mon, 6 Jun 2011 16:11:58 +0000 (12:11 -0400)]
LP 791546: advanced search ISBN/ISSN in .staff mode
In 1.6, advanced search ISBN/ISSN searches always operated in .staff
mode, returning results whether the results should have been visible to
the user or not. This confused patrons who saw records to which they had
no access.
In 2.0, this behaviour changed so that advanced search ISBN/ISSN
searches never operated in .staff mode. This confused staff who were
used to retrieving records via the ISBN/ISSN search when they wanted to
add holdings for their own library to the records.
The pattern for addressing this problem and satisfying both use cases is
the same - use the multiclass.query.staff method if we invoke the ISBN
or ISSN searches with the .staff method name.
One could easily refactor many of the search method bodies in this
module to use the exact same logic, keying off the method name to
identify the identifier field and the .staff portion of the method name
to determine whether to invoke .staff mode or not. For now we just
address the ISBN and ISSN entry points.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Jason Etheridge [Wed, 1 Jun 2011 07:17:17 +0000 (03:17 -0400)]
Fix Circulate as Type in the item editor.
The citm retrieval method was changed to use open-ils.fielder, which
doesn't return actual fieldmapper objects, so when data.js went to
convert the retrieved list to a hash, it broke.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Dan Wells [Fri, 3 Jun 2011 17:43:40 +0000 (13:43 -0400)]
Clean up a few stock perm mistakes
This upgrade file does cleanup for three errors:
1) deletes errant inserts from 0545 (group 4 is not the circulation admin group)
2) accounts for spelling errors (Admin != Administrator)
3) adds a group missed in 0542, for upgraders
Stat cats can now have a sip_field and sip_format.
sip_field is the field identifier code, sip_format is one of the following:
1 - Null/Empty, places stat cat value in as-is
2 - A plain string, placed in value as-is when stat cat has value
3 - A plain string with a %s, 1 and 2 combined, where the stat cat value replaces the %s
4 - A regular expression surrounded by | characters (ex, |([0-9]*) -|):
If the regular expression does not match the value, nothing
If the regular expression matches and has a capture group, the captured group
If the regular expression matches and does not have a capture group, the entire match
The | was used because it would otherwise be stripped from the final result anyway.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Wed, 1 Jun 2011 21:29:01 +0000 (17:29 -0400)]
Permission to allow transit abort on lost/missing
This patch introduces a permission that allows staff to abort transits
for items in the lost/missing status. Previous, this was disallowed by
a hard-coded block.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Wed, 1 Jun 2011 21:01:36 +0000 (17:01 -0400)]
Collections exemption user setting
Adds a new user setting "circ.collections.exempt" which, when set to
true for a user, means the user will not be considered for collections.
It does this by ignoring the user when calculating the list of users of
interest in the "open-ils.collections.users_of_interest.retrieve" API
call.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Wells [Wed, 1 Jun 2011 18:33:59 +0000 (14:33 -0400)]
Serial holdings display consistency fix
When holdings are sourced from both MFHD and the DB, display may be
inconsistent due to a hard-coded ', ' in Serial.pm. This patch works around
the problem by storing generated_coverage as a JSON array instead of a string,
leaving display formatting to the OPAC.
Dan Wells [Wed, 1 Jun 2011 15:10:34 +0000 (11:10 -0400)]
Remove specific admin perms, reorganize seed file
The various administrators already have 'EVERYTHING' at their
respective levels, so no need to assign new perms there. The
seed file is now more consistently organized.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Wells [Wed, 1 Jun 2011 13:43:53 +0000 (09:43 -0400)]
Change a few permission levels and assignments
In an attempt to be consistent with existing perms, a few were moved to
levels lower than 'Consortium', and ADMIN_SERIAL_ITEM is only in the
'Serial' group.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Also note that the CREATE OR REPLACE function calls will
fail on an existing database due to the changed return
type of the functions - so if this gets moved into its
own upgrade script, DROP FUNCTION calls will be
required.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Tue, 31 May 2011 16:16:16 +0000 (12:16 -0400)]
Repaired typo on schema and upgrade SQL
ARRAY_ACUM is not a defined function. Per Dan Scott, replaced with
ARRAY_AGG instead of the correctly spelled ARRAY_ACCUM, since we'll be
using that function in place of ARRAY_ACCUM going forward.
Thanks, Dan.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Fri, 27 May 2011 17:51:59 +0000 (13:51 -0400)]
Fix rendering of MFHD records when ownership is out of scope
Dojo would die with a null reference error when an MFHD record
was retrieved that was outside of the current OU search scope.
For example, if a given bib record had one linked MFHD record
for BR1, and one linked MFHD record for BR4, the details page
would choke trying to draw the MFHD holdings in a scope that
only included BR1 and end up drawing nothing. Ungood.
Moving the ownership check and invoking _holdingsDrawMFHD()
only after ensuring that the record is within our scope resolves
the problem.
Mike Rylander [Thu, 26 May 2011 20:03:39 +0000 (16:03 -0400)]
Patch suggested by Jason Boyer for LP#788601
The <script> tag for the chrome frame message has a misplaced semicolon,
which causes an odd looking display issue in Internet Explorer. I
realize that ideally very few people will be using IE, but even if
they're not interested in a quality browsing experience we should
probably put our best face forward.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Thu, 26 May 2011 07:55:26 +0000 (03:55 -0400)]
Don't rely on call number column being rendered before prefix/suffix/class columns. Also, remove prefix/suffix/class from the check-in interface, since those column definitions can make extra network calls and we want that interface to be as fast as possible.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Wells [Tue, 24 May 2011 14:53:09 +0000 (10:53 -0400)]
Make label_class on any new call numbers default to org_unit setting
Evergreen 2.0 added a label_class column to the call number table with
one major purpose being the generation of correct sort keys. You can
also specify a default label class as an org unit setting. However:
1) There are no interface elements for setting the label class of an
individual call number.
2) The default setting from the actor.org_unit_setting
'cat.default_classification_scheme' value, if set, is not consulted
(that is, not set in the call number table) when new call numbers are
created.
These two facts together greatly reduce the utility of this very
valuable feature, as all new call numbers end up in the 'Generic' class.
While #1 has been addressed in 2.1+, there is still work to be done in
setting this class on import. Also, which interface parts (if any) make
it back to 2.0 is subject to debate.
This commit addresses #2.
See lp #787150.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dan@coffeecode.net>
Jason Etheridge [Tue, 24 May 2011 18:55:57 +0000 (14:55 -0400)]
remove restriction on resetting pw to random number when Use Phone Password setting is active. uEditMakeRandomPw will still get called for new users, but should get overwritten once a phone number is entered
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Wells [Mon, 23 May 2011 13:30:43 +0000 (09:30 -0400)]
Apply Apache file expiration to the current official Javascript content type
At least on Ubuntu 10.04, Javascript files are generally delivered with a
Content-Type header of 'application/javascript', not
'application/x-javascript'. This change applies the much shorter 18 hour
expiration to the affected files, rather than allowing them to default to
1 month.
The action_trigger event def template for printing acq invoices was
syntatically broken. The collapse filter isn't important per se, but
it balances the extra [% END %] at the bottom of the template, and it
was there originally, and I see no reason not to put it back.
Incidentally, maybe the database upgrade script in the commit will be
the first in master to successfully use the new
evergreen.upgrade_deps_block_check() function ?
Jason Etheridge [Fri, 20 May 2011 16:45:08 +0000 (12:45 -0400)]
Restore the Replace Barcode option in Holdings Maintenance, as the Edit Item menu will only serve the same duty if the unified volume/copy editor is activated via org setting (otherwise, it's just the Item Attribute Editor). klussier++ for the catch
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Jason Etheridge [Fri, 20 May 2011 09:30:55 +0000 (05:30 -0400)]
align the batch edit menus in the vol creator. mostly aesthetic, but can save horizontal real estate, so usability as well for horizontal vol/copy editor.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Jason Etheridge [Fri, 20 May 2011 09:04:17 +0000 (05:04 -0400)]
usability tweak for controlling screen real estate, in unified vol/copy editor don't embed the the Record Summary in the vol editor, but in the main wrapping UI. Also move CN batch edit bar into groupbox
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Jason Etheridge [Fri, 20 May 2011 07:55:37 +0000 (03:55 -0400)]
usability tweak, pull the Create button out of the embedded interfaces and into the wrapping UI for the horizontal variant of the unified vol/copy editor
Signed-off-by: Jason Etheridge <jason@esilibrary.com>