James Fournie [Thu, 7 Jul 2011 02:07:50 +0000 (19:07 -0700)]
Adds org unit selectors to Admin -> Server Admin -> Booking menu items, also modifies
the IDL to give context-field based pcrud perms instead of 'require global'
This makes the booking module more org-unit scopable
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
When a user selects "Merge On Single Match" or "Merge On Best Match" and
apply a minimum quality ratio, the fall-through profile will be used in
a secondary merge attempt for any records that fail the initial merge
due to insufficient record quality.
This allows the user to choose 2 different outcomes based on record
quality. For example, you may wish to do a full overlay for all
high-quality records, but only extract subjects or other information
from lower quality records. This also allows users to do record+copy
imports for high-quality records and copy-only imports for low quality
records (using a no-op merge profile like "replace 901c").
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Etheridge [Fri, 22 Jul 2011 05:47:15 +0000 (01:47 -0400)]
use_perm column for config.z3950_source
The idea is that if a permission code is specified for a given source, then
staff will need that permission to use that source in the staff client z39.50
interface.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Sat, 20 Aug 2011 21:51:46 +0000 (17:51 -0400)]
Remove cache-generator.sh from Makefile.am
In a previous commit, we removed cache-generator.sh. Now we remove the
remaining reference to it in the Makefile.am that was generating an
error (reported by Ben Webb).
Bill Erickson [Fri, 19 Aug 2011 19:50:22 +0000 (15:50 -0400)]
Vandelay: repair item attr context org selector
1. Prevents resetting the context selector to the workstation org unit
each time it's changed.
2. Prevent the unintentional pileup of dojo.connect() events, which
can lead to exponential growth in the number of server calls to fetch
import-item-attribute-definitions with each change of the context org
selector.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Ben Shum [Tue, 2 Aug 2011 15:15:57 +0000 (11:15 -0400)]
#LP801961, error when running edi_fetcher.pl
This patch addresses an error encountered when running edi_fetcher.pl.
The method "is_dir" should be just plain "dir" in RemoteAccount.pm file. Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Wells [Tue, 16 Aug 2011 21:22:47 +0000 (17:22 -0400)]
Stricter order for actor.org_unit_parent_protect()
actor.org_unit_parent_protect() may not work due to the fact
that 'IF' conditions in PL/pgSQL are not necessarily processed
in the order written. This line:
"IF TG_OP = 'INSERT' OR NEW.parent_ou
IS DISTINCT FROM OLD.parent_ou THEN"
may fail because the 'IS DISTINCT FROM' happens before the
'INSERT' check, and and that fails because there is no 'OLD'
variable for INSERTs.
This commit may not be the optimal style for this circumstance
in this language, but it works. It also appears to change more
than it really does due to a loss of one level of indentation in
the structure.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 18 Aug 2011 19:32:53 +0000 (15:32 -0400)]
Update README to reflect the --create-database option
Now that eg_db_config.pl is intelligent enough to create the database,
update the README to free people from the tyranny of having to manually
issue database creation (and contrib-adding) commands.
Dan Scott [Tue, 16 Aug 2011 03:14:01 +0000 (23:14 -0400)]
Further autogen.sh cleanup
* Roll cache-generator.sh functionality into autogen.sh
* No longer install deleted scripts
* Teach Perl build infrastructure about OpenILS::Utils::Configure
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Dan Scott [Mon, 15 Aug 2011 22:03:37 +0000 (18:03 -0400)]
Revamp autogen.sh to call functions from a Perl module
This cut moves all of the logic from the individual scripts that
autogen.sh used to call into a self-contained Perl module. We use
OpenILS::Utils::Cronscript to avoid much of the init dupe code.
Note that calling Perl functions from a bash script is not crazy pretty,
but perhaps in the long run autogen.sh becomes something else. This is
just a step towards consolidating those functions in a single module
while maintaining the same interface as before.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Wed, 17 Aug 2011 13:17:17 +0000 (09:17 -0400)]
Vandelay: don't clear item import profile when creating new queue
This avoids the problem of: enter import-profile in the UI => enter name for
new queue => profile is cleared. Import profile is still cleared/set when
an existing queue is selected, since existing queues already have an
item import profile set.
Dan Scott [Tue, 16 Aug 2011 15:50:45 +0000 (11:50 -0400)]
LP 799719: Pass the DESTDIR variable to python installer
Based on Ben Webb's patch, but using the same triple-slash to avoid any
possibility of confusion about the installation location (see also the
same adjustment made to OpenSRF).
Dan Scott [Thu, 28 Jul 2011 18:29:48 +0000 (14:29 -0400)]
LP#790329 org_lasso search is broken
Fix the JavaScript error when we attempt to create a feed for the
shortname of the org_unit_lasso (lassos have no shortname) - which lets
the request hit the backend Perl module, which in turn chokes on a test
for OU that only allows two conditions: either all digits is treated as
a numeric ID for an org unit, or it is a shortname. Of course, lassos
are negative integers, so we have to modify the test slightly to make it
happier.
There was no depth for org lasso copy counts, and this was handled
correctly in the main case by the asset.opac_lasso_record_copy_count()
function and its staff variant, but when a copy was not found at a given
org_unit in the lasso a request was made for the non-existent depth and
the function would error out.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Tue, 16 Aug 2011 14:55:39 +0000 (10:55 -0400)]
Vandelay: don't clear match-set when creating new queue
This avoids the problem of: enter match set in the UI => enter name for
new queue => match set is cleared. Match set is still cleared/set when
an existing queue is selected, since existing queues already have a
match set.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Keep the logging output of the EDI translator by default
There is valuable troubleshooting information there that is otherwise hard to
find. This particularly matters when the output of an EDI
Action/Trigger template (JEDI) doesn't successfully get translated to
EDIFACT for nonobvious reasons.
In production environments, you might instead pipe to logger so that you can
collect output with syslog, rather than in a flat file. As long as
output goes *somewhere.*
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
This line var modified_ou = new aou().fromStoreItem( current_ou ); was
producing a fieldmapper object where certain fields were being set to
contain the string "undefined" rather than a null.
The update method would take isdeleted == "undefined" as True.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Fri, 12 Aug 2011 20:09:11 +0000 (16:09 -0400)]
return only the one applicable OU setting value
Correct actor.org_unit_ancestor_setting so that it returns
at most one setting value, rather than the entire set
of values defined for the OU and its ancestors.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Tue, 9 Aug 2011 19:30:56 +0000 (15:30 -0400)]
lp 823496: don't fail to index personal names that have relators
The default definition for the author|other index inadvertantly
excluded names from 600, 700, 720, and 800 fields that have
relator values ($e) or codes ($4).
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Fri, 12 Aug 2011 21:03:11 +0000 (17:03 -0400)]
Vandelay: capture one match per catalog record
When searching for matches to existing catalog records
(biblio.record_entry's), Vandelay can in some cases result in multiple
like matches for the same record (with the same match score). This
trims it down to 1 match per record.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
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
);