Jason Etheridge [Wed, 18 May 2011 05:05:17 +0000 (01:05 -0400)]
Include call number prefix/suffix in display and sorting of holds for Print Full Pull List (Alternate strategy). Also fix things so that we're sorting on the label_sortkey for call number, and not the label. So, for this interface, the hard-wired sort order is Copy Location Order (as defined by Admin -> Local Administration -> Copy Location Order), Call Number Prefix, Call Number Label, Call Number Suffix, and Hold Request time.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Jason Etheridge [Wed, 18 May 2011 02:27:07 +0000 (22:27 -0400)]
have the call number checkbox for pocket labels include prefix/suffix. A %call_number% macro is still available for the bare call number label without affixes
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Jason Etheridge [Wed, 18 May 2011 02:24:21 +0000 (22:24 -0400)]
Can't use encodeURI and decodeURI for everything with persist_helper (in particular, something like "%macro1% %macro2%" as a custom entry in the label interface), so try/catch them and fall back to the original behavior.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Database tables/access functions for prefix/suffix info
Table: config.barcode_completion
Function: evergreen.get_barcodes
Takes org unit, context, and input barcode
Context is a string and can contain:
asset - asset.copy barcodes
serial - serial.unit barcodes
actor - actor.usr (via actor.card) barcodes
booking - booking.resource barcodes
Special case: asset and serial both in context
Returns non-serial asset entries as asset
Returns serial entries as serial
Type for function return: evergreen.barcode_set
With editing interface: Admin->Local Admin->Barcode Completion
OpenSRF Call: open-ils.actor.get_barcodes
Basically a passthrough to the database function
Checks for permissions:
STAFF_LOGIN - To do anything
VIEW_USER - At home_ou of the user owning the returned
barcode when in actor context
Add get_barcode to menu.js and to xulG in a number of places
Takes a window handle, a context, and an input barcode
Passes the current OU, the context, and the input barcode to the db
If multiple results come back it pops up a dialog
Returns boolean false on no results
Returns "user_false" on dialog cancel
Returns an object with type, id, barcode on success
If dialog was brought up, returns data used to populate button
Add option for looking up actors at checkout
Org unit setting: Load patron from Checkout. Default: Don't.
Call sites for get_barcode:
Lookup Patron By Barcode (actor only)
OPAC's Staff Client Place Hold (actor only)
Checkout (asset only by default, with actor if above option set)
Checkin (asset only)
Item Status (asset only)
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Tue, 17 May 2011 04:29:47 +0000 (00:29 -0400)]
LP#783486: Improve authority lookup performance
Testing showed that the two indexes added herein improve
authority lookup performance radically; on a 16 GB RAM
database server with 1.1M records, lookup times decreased
from 5500 ms to 0.223 ms. Recommended, would EXPLAIN ANALYZE
again.
Jason Etheridge [Mon, 16 May 2011 16:12:40 +0000 (12:12 -0400)]
persist partial changes to new copies in vol/copy editor has new copies are gathered.
In other words, you can do something like enter 5 in the "# of Copies" field, enter the first barcode (say b1), edit an attribute (say, set Circulate = No), and then enter a second barcode (b2). Previously, the changes made to b1 would be lost as b2 was entered (or as other movement around the barcode entry textboxes happened) and both copies would get a Circulate = Yes, but now in this scenario, you would see 1 copy set to No and 1 copy set to Yes for the Circulate attribute.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
miker [Fri, 13 May 2011 17:30:47 +0000 (17:30 +0000)]
Patch from Ben Ostrowsky (LP#782268) to simplify seed/example permission setup and move one step towards being able to rid ourselves of permission.perm_list.id
dbwells [Fri, 13 May 2011 16:01:04 +0000 (16:01 +0000)]
A bevy of MFHD bug fixes (and test cases)
1) Remove hard-coded 'gap' text from format_part()
2) Honor $ypm## for chron_to_date() for annuals
3) Removed overly simple check on $w as digit
4) Allow for combined chronologies other than 2nd level
5) Make calendar changes trump $u counts
6) Honor issue restarts at calendar changes
7) Rudimentary support of $u counts for non-restarting issue numbering
8) Special interpretation of $yps for early winters (i.e. winter is the first season of the calendar year)
9) Teach chron_to_date() about early winters
The last two points deserve some special attention. A large number of journals consider 'Winter' to be the first season of the year, so Winter 2011 means (roughly) January 2011, not December 2011. However, there is no explicit way to indicate this in the standard, and also the code relies in many ways on the fact that 24 (chronology code for winter) is greater than 21 (code for spring). To work around this, we are interpreting a certain ambiguous pattern in a particular way. Specifically, if you set $w to a digit, then set $y to 'ps24,21,22,23' (or some variation with '24' as the first value), you will get this winter-first behavior. Also, the season is treated internally as '20' then converted to '24' when processing is completed.
erickson [Mon, 9 May 2011 18:27:42 +0000 (18:27 +0000)]
Invoice from LI seeds invoice data
* When creating a new invoice from a lineitem, seed the invoice with
provider data from the lineitem.
* Make money textbox's a little larger to accommodate larger sums
without scrolling
* Truncate long titles in lineitem summary view
Author: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20446 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Thu, 5 May 2011 18:38:36 +0000 (18:38 +0000)]
Use valid JSON in Dojo i18n for Searcher.js
Dojo i18n processing scripts require valid JSON (quoted keys in hashes),
even though Dojo itself is more relaxed and accepts unquoted keys. So,
do the i18n dance here.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20437 dcc99617-32d9-48b4-a31d-7c20da2025e4
senator [Thu, 5 May 2011 16:40:08 +0000 (16:40 +0000)]
Patch from Niles Ingalls to make patron phone number searching more matchy.
With assistance from Mike Rylander on pointing out the needed indexes to keep
search fast, and from Mike Peters on arranging a last minute DCO :-)
Type numbers into a patron phone number field and get a match regardless of
the punctuation actually used in the database.
senator [Thu, 5 May 2011 15:42:00 +0000 (15:42 +0000)]
Add a feature authored by Joscha Filius for the International Institue of
Social History: a diacritical palette for the MARC editor!
Afelonne Doek of IISH wants the community to benefit from this code. To try
it out, press control S in the marc editor (reguarly non-flat-text view).
You can insert the characters you see, and you can right click on entries in
your palette to customize. Customizations /should/ persist through staff client
restart (untested by me so far).
This should make cataloging in multiple (Western-ish) languages at once easier.
Below I copy and paste some of Joscha's message to the list where he introduced
this code:
> *Bugs:*
> A known bug is that is you switch marc edit styles back and forth the
> listener trigger won't work anymore. Also for a far as I know there is at
> least another bug concerning layout which is as far as I know not the result
> of my doing.
>
> *Here comes a possibly nasty part*, to ensure that the diacriticals remain
> intact throughout the persist I've changed global_util.js to URL encode and
> URL decode all stored values. This might cause backwards incompatibility
> with values that are already stored for other purposes without encoding.
> This needs to be checked.
dbs [Thu, 5 May 2011 04:39:44 +0000 (04:39 +0000)]
Remove redundant plpgsql install step from README
PostgreSQL 9.0 includes plpgsql by default, and running the
createlang plpgsql step throws an error that could concern
the installer. Drop the step from the README.
Signed-off-by: Dan Scott <dan@coffeecode.net>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20423 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Wed, 4 May 2011 04:43:06 +0000 (04:43 +0000)]
Change an ERROR to a DEBUG log message in mod_idlchunk
Reported by James Fournie at Sitka, this message was logged
as an error when it is simply a debug message; we drop the
level accordingly so that it will not appear in the Apache
logs during the normal course of operations.
Signed-off-by: Dan Scott <dan@coffeecode.net>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20397 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Wed, 4 May 2011 03:46:27 +0000 (03:46 +0000)]
Prevent uninitialized var warnings in OpenILS::WWW::SuperCat::unapi
Given a tag URI like tag:localhost,2011:biblio-record_entry/1 with
no format, Evergreen was throwing uninitialized variable warnings
and attempting to invoke "open-ils.supercat..formats" due to the
unitialized $type variable, which resulted in an Apache error.
On the TT OPAC, this enables Zotero to successfully offer import
of all entries on the search results page. On the AjaxPAC, it seems
that Zotero parses the page before the unAPI hrefs have been supplied
by JavaScript.
Signed-off-by: Dan Scott <dan@coffeecode.net>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20390 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Tue, 3 May 2011 16:29:16 +0000 (16:29 +0000)]
Avoid data loss by setting MARC::Charset->assume_unicode(1)
When using MARC::File::XML, MARC::Charset is used to perform character
conversions; however, MARC::File::XML does not tell MARC::Charset that it is
handling Unicode data. If we do not tell MARC::Charset that it is handling
Unicode data, it can return an error which results in the loss of data
(typically a subfield containing one or more characters which MARC::Charset
does not have an equivalent mapping outside of Unicode).
This problem could be reproduced in authority_control_fields.pl with a
subfield like "von Hans-Christian Müơller" - when this subfield was encountered
without assume_unicode(1), a null string was returned for that subfield, and
if the record was written back to the database due to an authority match being
found in a different field, the only recourse was to restore the record from
auditor.biblio_record_entry_history. The same sort of problems could occur
for any other script or function that modifies the data being handed to it
using MARC::File::XML and BinaryEncoding => UTF8.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20385 dcc99617-32d9-48b4-a31d-7c20da2025e4
miker [Tue, 3 May 2011 14:55:37 +0000 (14:55 +0000)]
Patch from Jason Stephenson ( LP#770261, https://bugs.launchpad.net/evergreen/+bug/770261 ) adding support for bibliographic level inspection in the hold and circ matrix matchpoint tests.
dbwells [Mon, 2 May 2011 20:57:01 +0000 (20:57 +0000)]
Add support for sre/distribution summary methods (including merge), advanced receiving, and unit-less receiving in the serial control items tab
This commit includes three new minor features for the Serial Control interface. First, you are now able to set the latent 'summary_method' field on distributions, with the most significant new setting being 'merge with sre'. This setting effectively combines the sre marc with the generated holdings to form a single unified statement. Second, the previous 'receive' functionality has been renamed to 'advanced receive', and 'receive' will now show items from an entire subscription, but not allow you to receive directly into a specific unit (you can still receive into new/auto units). Third, a basic menu entry has been added for receving into 'no unit', allowing items to be received not forcing them to be unitized.
phasefx [Mon, 2 May 2011 15:04:54 +0000 (15:04 +0000)]
flesh stat_cat_entries in the call number tree method used by Holdings Maintenance, since those copies get shoved into the copy editor and we want stat cat entries to show up there
phasefx [Mon, 2 May 2011 14:05:56 +0000 (14:05 +0000)]
Fix bug and typo in stat cat editor
Specifically, disabling the ability to select a stat cat type on no permissions on current type.
If you don't have permissions on ASSET you could never get to ACTOR.
If you picked ACTOR without rights you couldn't get back to ASSET.
Also, re-enable the library selector and new buttons when you do change to one you can add for.
Author: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20371 dcc99617-32d9-48b4-a31d-7c20da2025e4
phasefx [Mon, 2 May 2011 13:20:40 +0000 (13:20 +0000)]
fix "undefined is in transit"
https://bugs.launchpad.net/evergreen/+bug/773528
---
Fix bug squashing of params in checkin_via_barcode2 in circ/util.js.
Author: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20368 dcc99617-32d9-48b4-a31d-7c20da2025e4
erickson [Sun, 1 May 2011 15:29:39 +0000 (15:29 +0000)]
ContentCafe summary of avaible item content
Added "available_json" support for Content Cafe. Returns and array of
available content for a given item, where the content type is mapped to
one of the Evergreen standard added content types, e.g. "summary",
"anotes", "reviews", ...
dbs [Sun, 1 May 2011 12:11:27 +0000 (12:11 +0000)]
Slight optimization for authority_control_fields.pl
Instead of creating two CStoreEditors per bib record, reuse the global
CStoreEditor for read operations; this way we only have to create a new
CStoreEditor if a record has fields to authorize.
Signed-off-by: Dan Scott <dan@coffeecode.net>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20356 dcc99617-32d9-48b4-a31d-7c20da2025e4
dbs [Sun, 1 May 2011 00:28:23 +0000 (00:28 +0000)]
Add excerpt AC and avoid rate-limiting for OpenLibrary content
OpenLibrary added rate-limiting (100 cover requests per 5 minutes)
for cover images requested by ISBN; using the OpenLibrary book
API to pull the list of direct cover URLs avoids the rate limit.
Also, add excerpt added content calls for OpenLibrary.
Signed-off-by: Dan Scott <gitorious@coffeecode.net>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20354 dcc99617-32d9-48b4-a31d-7c20da2025e4
Update Makefile.install and README for PostgreSQL 9.0
Along with cleaning out references to Debian Etch, Debian Lenny,
Ubuntu Hardy, add the Debian Squeeze, Ubuntu Lucid, and Fedora 14
PostgreSQL 9.0 repo locations, and convert the README to Asciidoc
syntax.
Remove references to Fedora 13 and genericize it for Fedora 14
(with the thought that Fedora 15 will probably be coming out
soon). Also add PostgreSQL 9.0 packages as a target for the
database server in Makefile.install.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Bill Erickson <berick@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20352 dcc99617-32d9-48b4-a31d-7c20da2025e4
For copy details change the barcode to a link to the item status.
This only applies to the staff client itself due to an isXUL check first.
This allows for a staff member to get more details on the copy with a single click, rather than copy/paste of the barcode.
Author: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20349 dcc99617-32d9-48b4-a31d-7c20da2025e4
Add <a> elements to turn URLs into links, and use the upper case
ebook format as the content of the link. "Read online" is the one
i18n-unfriendly exception, but this is a good start.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20346 dcc99617-32d9-48b4-a31d-7c20da2025e4
Teach OpenLibrary.pm how to extract ebook links from OpenLibrary results
If the Internet Archive has an available ebook, then OpenLibrary will
provide links to it in various formats. For now, we return the results
as a plain set of <div> elements with class attributes denoting what
kind of ebook was returned; i18n will have to take care of providing
an actual label. Oh, and I guess we want to turn these into actual
<a> links...
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20344 dcc99617-32d9-48b4-a31d-7c20da2025e4
--num DB patch number
--name descriptive part of patch filename
--deprecates patch(es) deprecated by this update
--supersedes patch(es) superseded by this update
Consolidate on checking for integers for -full / -uris
The check for an integer when $flesh eq 'uris' was throwing errors
and breaking authority browsing; rather than complicating matters
further, use an explicit integer for the return value when the format
ends with "-uris" so that we can simply test for an integer value
greater than 0.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20335 dcc99617-32d9-48b4-a31d-7c20da2025e4
Prevent a MARC::File::XML error from killing authority_control_fields.pl batch
Continuing to make this script bullet-proof, MARC::File::XML cares deeply
about things like whether datafields have indicators and throws exceptions
that, if not caught, kill a processing script - like this one.
Borrowing the approach from marc_export, wrap the new_from_xml() call in
a try / otherwise block and roll on.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20332 dcc99617-32d9-48b4-a31d-7c20da2025e4
Hold, Transit, and Hold/Transit Slips used to suppress the printer dialog, but we lost that when we moved to templated slips. This adds a sticky Printer Prompt checkbox to Check In for controlling that behavior.
Setting print.always_print_silent to false is a bad thing, since it trumps gPrintSettings.printSilent, and will cause a print dialog regardless of Printer Prompt or Auto-Print checkboxes. Let's clear it instead when toggling it off, and if we find it lingering as false from past code, let's clear it then too.
Protect against errors returned by open-ils.search
If open-ils.search returns an error rather than a result, prevent
authority_control_fields.pl from bombing out completely; instead,
flag the problem in STDERR and move on to the next record.
Make authority_control_fields.pl resistant to database timeouts
LP 771237 describes how on an underpowered system, the work that
authority_control_fields.pl tries to do on a per-record basis may hit the
CStore default timeout of 6 seconds for a transaction and automatically
end the transaction, resulting in no work being committed once the script tries
to update the bibliographic record. Searching each controlled field for a
matching authority record can be costly in a database with millions of
authority records.
To enable the script to accomplish its work on underpowered test systems, use a
regular read-only CStoreEditor session to accomplish the lookups and create a
separate CStoreEditor session to issue the update in a transaction if required.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20311 dcc99617-32d9-48b4-a31d-7c20da2025e4