Art Rhyno [Fri, 8 Mar 2013 12:55:06 +0000 (07:55 -0500)]
Fix CAS to handle dynamic auth links
CAS uses a "service" URL to redirect a user back to where an application wants
them to go if authentication is passed. This works well for simple URLs but
becomes problematic for complex URLs, which can get mangled or, worse,
truncated. This doesn't seem to be unique to Windsor's implmentation of CAS.
I tried a few tricks to encode the URLs in strange ways to get the same
URL back from CAS, but I think a better approach is to stuff the URL into
a cookie, and invoke when the request comes back from CAS. Any other approach
seems to result in horrid URLs and there is always the chance that some
character will break the scheme.
One flaw in my approach is that if a TPAC user selects "email" or "place hold"
and invokes the logon screen, the cookie gets set for the "redirect" URL. If,
for some reason, a user decides to do another search and chooses to log in to
their account from a different screen, the CAS URL can be invoked. This
would only happen for CAS, and the cookie itself is only set for 10
minutes, so I don't think this is a major concession. I also try to
invalidate the cookie wherever it is possible to know that the authentication
has not been invoked.
The assumption is that there is a CAS link added to the login form (login/form.tt2),
for example:
<a href="[% ctx.cas.url %]"
class="opac-button opac-button-header" id="home_myopac_link_uwin">
[% l('Log in to Your Account (UWind ID)') %]
</a>
I had become so used to testing CAS by logging in first, that I totally missed
the links that support authentication at the time of need, e.g. the "email"
or "place hold" links that are displayed prior to authentication. Hopefully,
this branch will address what is probably a common scenario.
Dan Scott [Sat, 19 Jan 2013 19:28:06 +0000 (14:28 -0500)]
TPAC: Fix series display for multiple series fields
This commit adds one test record, "Harry Potter and the Goblet of Fire",
which contains multiple series fields. TPAC would display the series
fields in a purely additive fashion as the variable was not reset after
each field. Now we initialize the series var for each new series field
we retrieve, fixing the display problem.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Mon, 7 Jan 2013 23:16:57 +0000 (18:16 -0500)]
Make series in record details behave
Add graphic 880 field support, as well as relying on mkurl() macro to
generate the desired URL and show the complete series on a single line
instead of having subfields appear on separate rows.
Add a sample record that contains a 440 series field linked to an 880
field.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Conflicts:
Open-ILS/src/templates/opac/parts/record/series.tt2
Dan Scott [Sun, 6 Jan 2013 01:49:27 +0000 (20:49 -0500)]
Add test records for graphic 880 field display
"--load-all" in eg_db_config.pl will load these records with call
numbers of "G880 ", so you can shelf-browse, or search by title:
* Tu shuo Zhongguo jie
* Matsumoto Shigeharu
* Schrödinger operators
* Breathing, feeding, and neuroprotection
* Data warehousing and knowledge discovery
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Fri, 21 Dec 2012 16:14:10 +0000 (11:14 -0500)]
Test data copies get "checked out" copy status when circ'd
Set the status to 1 (checked out) for items that are circulated as part
of the test data transactions load. Otherwise, the data is busted and
renewals are not possible.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Wed, 21 Nov 2012 16:37:06 +0000 (11:37 -0500)]
Test data: avoid crazy transactions for expired patrons
Rather than creating brand new circ transactions for patrons who expired
in 1999, make things a little more realistic by filtering out the
patrons to those whose account expired in the past month or later, and
creating xact_start / due_date values based on their account expiry
date if expired, or NOW() if still active.
Oh, and add some patrons who expired over the past month. :)
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Sun, 11 Nov 2012 15:48:55 +0000 (10:48 -0500)]
Concerto test data: realistic call numbers
Add a parameter to the populate call number function so that we can define the
call number class. As a result, create a new 3-parm version of the function
that simply calls the 4-parm version with a NULL value for the 3rd parm.
Use some realistic LC and Dewey call numbers for the "concerto" bibs so
that we can have more useful tests of the call number browse functionality.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Sat, 13 Oct 2012 16:28:29 +0000 (12:28 -0400)]
Expand and modularize concerto data set
* Break function creation and deletion out to their own files.
* Translates lul_fre_100 bibs into SQL
* adds a load_all.sql file for loading all test data
* moves all test data sql to its own dir
* creates a backward-compat concerto.sql loader
* ensure that most users are not already expired
* Adds a 'tag' column to marcxml_import, which populates last_xact_id on
import. This 'tag' is useful for differentiating which records to link
callnumbers to.
* Adds an 'id' column to marcxml_import to ensure insert-order inserts
into biblio.record_entry
* Adds a handful of copies for french records
* Adds supporting functions for creating circ/hold test data.
* creates a pile of sample circ and hold data
* Give most users NULL dobs and suffixes.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 11 Oct 2012 03:35:13 +0000 (23:35 -0400)]
TPAC: Add search torture tests to concerto record
In addition to # signs causing problems in facets, we found that search
syntax in general is surfaced directly in most links that are exposed to
users in the TPAC. This commit adds several examples to the record with
the title "Trombone concerto (1991)":
In the title, there is an embedded "subject:" search which will be
triggered by autocomplete.
In the author (100 field), there is an embedded "author:" search which
will be triggered from the record details page. This also includes
another usage of the # sign.
In the subject fields, there are:
* an embedded "subject:" search which will be triggered from the
facets, autocomplete, and record details page
* an embedded negation operator which will be triggered from the
facets, autocomplete, and record details page
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Wed, 10 Oct 2012 19:50:49 +0000 (15:50 -0400)]
Munge concerto to include # signs in series facets
Search for "Piano concerto in C major, op. 39" or "Beethoven: concertos
and overtures" and you'll get facets with # signs to assist with fixing
LP # 856811.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Fri, 4 Jan 2013 21:26:30 +0000 (16:26 -0500)]
TPAC: Alternate graphic fields (880) display
In the search results and record details displays, display the
corresponding 880 field(s) whenever possible.
The contents of the 880 field are generally displayed directly
underneath the corresponding primary field, with the exception of the
contributor credits on the record details page, in which the 880
contents appear between the name of the contributor and the
contributor's credit.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Ben Shum [Mon, 3 Dec 2012 15:37:43 +0000 (10:37 -0500)]
Update staff client's about page to include newest core committers
The newest core committers were elected during the Evergreen Hack-A-Way on
October 10, 2012:
Jeff Godin, Traverse Area District Library
Benjamin Shum, Bibliomation, Inc.
Jason Stephenson, Merrimack Valley Library Consortium
Also update language of page to reflect that these contributors are now core
"committers" rather than "developers". And move past core committers into
their own section.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Jason Stephenson [Mon, 10 Dec 2012 15:29:21 +0000 (10:29 -0500)]
LP1076062: Hold overrides not working properly.
Edit the verify_copy_for_hold helper function to actually work. There
were cases where it would permit a copy when it shouldn't and also
disallow a copy when it should have allowed it. It now makes better
use of the oargs override argument.
If oargs has an events member, the method now removes the matching from
the list of failure events returned by the permit_copy_hold check. It
was previously bugged, stopping on the first matching event, clearing
the list of failed and events, and returning a value to indicate that
the copy is permitted for the hold, even when it may not be.
If oargs has the "all" member and there are failure events remaining,
the function loops through those events checking if the requestor has
the override permission for the event. If the requestor does have the
override permission, then the event is added to oargs->{events} to be
saved for future checks on future copies. It the requestor does not
have the override permission, then the event is pushed onto a new array
of failed events and also onto oargs->{failed}. The latter is kept
to avoid looking up events repeatedly on future copy checks.
The oargs->{failed} member is added as a shortcut to avoid repeatedly
looking up override permissions when the requestor does not have them.
It is actually checked, when present, before the user permission is
checked with a costly database lookup.
Since verify_copy_for_hold has no other way to determine that an override
was requested, it checks for the events and/or all members of oargs being
set and having a value that would evaluate to true. If oargs is undefined,
a hashref with no members, or lacks a "true" events or all member, then
verify_copy_for_hold functions as though no overrides are requested.
Additionally, all functions that call verify_copy_for_hold, either directly
or indirectly, have had their intro logic modified to only set oargs when
an override is requested and oargs is not already set. We make the assump-
tion that if oargs is set, it contains the events member. (Perhaps that is
a poor assumption, but all of the code so far looks like it will work.)
Fix test_and_create_hold_batch so that it passes the oargs parameter into
open-ils.circ.title_hold.is_possible in the way that check_title_hold (the
implementation function) actually expects it to be passed. This also means
that we need to delete oargs from the params hashref before creating the
hold objects, as that would blow up if it were present.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Bill Erickson <berick@esilibrary.com>
James Fournie [Tue, 18 Dec 2012 20:45:51 +0000 (12:45 -0800)]
Check for a selection_depth returned from title_hold.is_possible.
See Launchpad 1064651 for details. This is a quick fix which solves a
fairly serious issue whereby copies outside of a hard boundary could fill
holds when they are placed within the TPAC in the staff client.
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
When the due date and the backdate date are on opposite sides of a DST
boundary we were getting an hour off on the checkin time (using the
original due date's time).
This commit changes it so that instead we just set the hour and minute
values on the backdate date to the due date's versions, leaving the time
zone alone.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Galen Charlton [Fri, 11 Jan 2013 18:11:48 +0000 (13:11 -0500)]
LP#1098669: improve handling of Content Cafe external content in staff client
This patch introduces a new TPac content variable, ctx.ext_proto, to
specify whether external content should be retrieved via HTTP or HTTPS.
ctx.proto can't be used for that purpose since it's set to 'oils' when
TPac is running inside the staff client.
This fixes a bug where Content Cafe reviews wouldn't display in the staff
client bib record page and where clicking on the reviews link from search
results would open an empty window.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Tue, 11 Sep 2012 16:41:08 +0000 (12:41 -0400)]
EDI order template improvements (no SQL upgrade script!)
Improved template for EDI purchase orders. This theoretically just
works better where the old template worked. Corrections made for
interactions with ULS, Midwest Tape, Baker & Taylor, and Recorded Books
especially. GIR segments in the right place.
And also the template is just more maintainable now.
**THERE IS NO UPGRADE SCRIPT INCLUDED**. Sites using EDI may not
necessarily want to mess with what they already have working.
If you want the changes, and maybe you do, especially if you're doing
enriched ordering and/or ordering from the vendors listed above, you can
extract the template changes easily enough yourself from the
950.data.seed-values.sql file.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Thu, 13 Dec 2012 14:44:55 +0000 (09:44 -0500)]
Handle cancelled (back-order) lineitems in EDI invoice
Receiving an invoice for a cancelled lineitem mean the lineitem is no
longer cancelled. Identify such lineitems and uncancel them along with
the requested number of not-yet-invoiced copies.
This work flow is common for back-order items.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Wed, 5 Dec 2012 14:34:00 +0000 (09:34 -0500)]
EDI invoice date; invoice paid quantity/amount
* capture the invoice date in EDIReader
* apply the invoice date to inbound invoices when available instead of
defaulting to 'now'
* apply the quantity/amount billed to the quantity/amount paid to reduce
staff data entry needs
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Mon, 3 Dec 2012 19:51:41 +0000 (14:51 -0500)]
EDI response honor lineitem-level status; debit cleanup
* Honor lineitem-level order status info (FTX+LIN) which indicates, in
some cases, that all ordered copies should be cancelled because the LI
as a whole is cancelled
* Delete fund debits for cancelled lineitem details when appropriate
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Mon, 3 Dec 2012 14:20:29 +0000 (09:20 -0500)]
EDI: protect against invalid order response
Do not attempt to createI EDI messages for order responses which
reference nonexistent purchase orders, since it results in
transaction commit errors on invalid foreign keys, preventing
subsequent EDI files from getting processed. Instead, log it
and skip it.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Fri, 28 Sep 2012 14:34:28 +0000 (10:34 -0400)]
Custom/local EDI reader module for ORDRSP and INVOIC (etc)
Provides a new perl module (OpenILS::Utils::EDIReader) for reading
inbound EDI messages and producing data structures more easily
understood by the ACQ code. Through this, extraction of EDI data is
focused in one module instead of spread through various layers.
EDIReader is a small, purpose built module focusing solely on extracting
the needed EDI data and is not meant to be a general purpose EDI library.
* Updates edi_fetcher and the ORDRSP and INVOIC handling code to use the
new libs.
* Removes Business::EDI Evergreen dependency, since it's no longer used (and
is quite large).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Jason Stephenson [Fri, 11 Jan 2013 13:49:11 +0000 (08:49 -0500)]
Fix a data destruction bug when authorities are updated.
Modify the two-argument form of vandelay.merge_record_xml to return
the target_marc when the add_rule, preserve_rule, replace_rule and
strip_rule are all empty.
This method is used by authority.propagate_changes and would replace
the bibliographic record's marc with the overlay template when the
above would happen. By returning the biblographic record entry's own
marc in that case, we prevent data destruction.
Additionally, protect bib and authority template overlay functions
in the same manner.
Commit includes an upgrade script for this change as well as
for the previous commit's authority.generate_overlay_template fix.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Conflicts:
Open-ILS/src/sql/Pg/002.schema.config.sql
Mike Rylander [Thu, 10 Jan 2013 21:35:44 +0000 (16:35 -0500)]
Only consider main entry headings for bib overlay
Restrict the authority fields we will pull overlay data from to those
that do not subordinate themselves to other authority fields. That
is, skip see-from/see-also/etc for bib overlay.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Acq: When invoice-building with embedded search, allow control of results list
Previously, a results list could accumulate under inconsistent
conditions. You'd get an accumulating results list if you were pressing
enter after successful searches, but your results lists would clear if
you actually clicked the Search button. Worse, searches yielding empty
result sets would *appear* to clear your result list, but subsequent
sucessful searches would restore what was there before.
This is the "missing commit" that makes the behavior consistent and
togglable.
Galen Charlton [Fri, 4 Jan 2013 19:33:28 +0000 (14:33 -0500)]
fix user session management for MARC Batch Edit
The Javascript in the hardcoded page templates was
not checking the XUL stash for the session key when
run from the staff client; this is now needed as
a result of the XULRunner updates introdued by
commit adee850f.
As a consequence, the list of the user's record buckets
was not retrieved, and attempts to run a batch edit
would spin without updating any records.
Art Rhyno [Wed, 23 Jan 2013 04:35:40 +0000 (23:35 -0500)]
CAS Support for Evergreen
This branch contains one approach to supporting CAS within Evergreen, I
had originally thought of CAS as an "all or nothing" option but I have
tried to make it possible to support standard authentication at the same
time since we will have a transition period where some accounts won't be
CAS-enabled and I suspect this is typical. As well, it is possible that
a library will need to have the ability to add accounts outside of the
campus directory.
In /openils/conf/opensrf.xml, you would add CAS-specific values,for
example
<app_settings>
<!-- 'enabled' is the master switch; set to 'true' to enable proxied logins -->
<enabled>true</enabled>
<authenticators>
<authenticator>
<name>cas</name>
<module>OpenILS::Application::AuthProxy::CAS_Auth_Conifer</module>
<cas_validate_url>https://uwinid.uwindsor.ca/cas/proxyValidate</cas_validate_url>
<cas_service>https://localhost/eg/opac/login</cas_service>
<cas_suffix>@uwindsor.ca</cas_suffix>
</authenticator>
<!-- 'native' is a proxied version of Evergreen's standard authentication -->
<authenticator>
<name>native</name>
<!-- you can add 'login_types' and 'org_units' limits to this authenticator as well, if needed -->
</authenticator>
</authenticators>
</app_settings>
The entry point for CAS is in topnav.tt2, I have added a "cas_intro"
option in order to give an introduction screen before passing a user to
the CAS service:
<div id="your-acct-login-uwin">
<a href="[% mkurl(ctx.opac_root _ '/cas_intro') %]"
class="opac-button opac-button-header" id="home_myopac_link_uwin">
[% l('Log in to Your Account (UWind ID)') %]
</a>
</div>
but you could just go directly to cas at this point:
<div id="your-acct-login-uwin">
<a href="[% ctx.cas.url %]"
class="opac-button opac-button-header" id="home_myopac_link_uwin">
[% l('Log in to Your Account (UWind ID)') %]
</a>
</div>
where ctx.cas.url is set in the config.tt2 file, for example:
I use a cookie to indicate that CAS has been used to authenticate, since
it requires a slightly different logout sequence. This also gets
reflected in topnav.tt2 if you are using both CAS and standard
authentication:
Note the "redirect_to", you will want to clear the session for logging
out of tpac so that another user on a public station won't stumble into
someone else's account. Again, if authentication is strictly CAS, then
you can just use the CAS form of the logout.
Dan Scott [Mon, 21 Jan 2013 22:02:42 +0000 (17:02 -0500)]
TPAC: Make locale picker match default locale
As noted by Pasi Kallinen, the language picker would not reflect the
chosen locale unless your cookie had been set or there was an explicit
CGI parameter with the locale name.
Accordingly, get the default locale from the context vars and use that
to set the selected value for the language picker in the absence of
anything else, to prevent the picker from possibly confusingly showing
the first language alphabetically rather than the currently displayed
language in the rest of the UI.
Dan Scott [Fri, 11 Jan 2013 06:32:13 +0000 (01:32 -0500)]
Protect against overly long savepoint names
Per http://postgresql.org/docs/9.1/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS,
the maximum identifier length works out to being 63 bytes (+1 for the
null terminator), so to avoid potential memory pressure by a 10GB string
somehow being passed in as the savepoint name, malloc no more than 64
bytes and copy no more than 63 bytes from the incoming name to the
escaped name.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
When invoking open-ils.{cstore,pcrud,rstore}.savepoint.*, the
caller supplies a name for the savepoint. However, the savepoint
names could be constructed so that the caller could execute
arbitrary SQL. This patch sanitizes the name so that it contains
only alphanumeric and underscore characters.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 10 Jan 2013 19:17:33 +0000 (14:17 -0500)]
Generic patron barcode generation (OpenSRF and DB)
Laurentian University needed the ability to generate barcodes as part of
its LDAP integration work, and the first generation (so to speak) of the
was specific to LU - including hard-coded prefixes and database
functions that include the "lu" name.
This commit makes the functionality much more generic and thus more
likely to be able to be adopted by other institutions. The principle
components are:
Database functions:
evergreen.actor_generate_barcode([prefix TEXT]) - returns a 14-digit
barcode from the evergreen.actor_barcode_seq sequence with a prefix of
'AUTOBC' or the specific prefix of up to 6 characters. If the
resulting barcode is all digits, then the 14th character will be a
mod10 check digit; otherwise the 14th digit will be '0'.
evergreen.actor_update_barcode(usr_id INTEGER[, prefix TEXT]) -
generates a new barcode for the specified user, with the optional
barcode prefix.
evergreen.mod10(barcode TEXT) - given a barcode, generates a mod10
check digit and returns the barcode with the appended check digit
OpenSRF method:
open-ils.actor.generate_patron_barcode([usr_id INT[, prefix TEXT]]) -
generates a new barcode for the patron
Check for stop fines reason of CHECKIN or RENEW before closing a circulation
transaction when the balance reaches zero.
Also, if the stop fines reason is LOST, then check a new ou setting,
circ.lost.xact_open_on_zero, to determine if the transaction is closed or
kept open. The setting is checked for the circulation copy's circ_lib.
Add CircCommon->can_close_circ.
Following up on Dan Wells' comments on Launchpad Bug 793550, I have moved
the logic to check if the circ transaction can be closed to its own utility
function in OpenILS::Application::Circ::CircCommon. This potentially
consolidates the logic in one place in case we need to use it elsewhere.
Instead of checking for stop fines reasons of CHECKIN and RENEW and
checking for checkin time on the circ, we just check for checkin time.
Both CHECKIN and RENEW should set the checkin time.
Also, use the constant for stop fines reason of LOST, rather than the
literal string "LOST".
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Dan Scott [Tue, 13 Nov 2012 16:55:45 +0000 (11:55 -0500)]
Recalls: guard against issuing a recall multiple times
We provided no protection against a recall being issued multiple times;
if we have a return date that matches the due date of a potential target
circ, then use that as a flag to not issue the recall.
(Possibly should check for due dates <= instead of just exactly equal)?
Jason Etheridge [Tue, 24 Apr 2012 20:54:20 +0000 (16:54 -0400)]
Admin -> Local Admin -> Item Attribute Editor
Main purpose is to allow you to spawn the Item Attribute Editor for the purpose
of configuring templates and using the Hide Fields feature without actually
finding an item to work and putting it at risk of accidental modification.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Thu, 18 Oct 2012 18:54:08 +0000 (14:54 -0400)]
Rollback cstore transaction before bbag record load
To avoid timeouts, which results in transaction rollbacks, preemptively
roll back the bookbag fetching cstore transaction before we retrieve
what could be a very large list of bookbag records data.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Mike Rylander [Wed, 10 Oct 2012 21:36:52 +0000 (17:36 -0400)]
Make it possible to suppress IDL fields
Some clients of external services, particularly pcrud and reporter-store,
need to be able to access tables that contain columns we'd rather restrict.
For instance, the passwd field on actor.usr.
To effect this feature we provide a blacklist attribute for fields, called
suppress_controller, which works in the same way as the class controller
attribute but names controllers not allowed to use the field. When the field
is explicitly named in a query (fieldmapper select block or json_query) an
error is thrown, and suppressed fields are ingored in general fieldmapper
search/retreive requests.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Fri, 2 Nov 2012 19:28:27 +0000 (15:28 -0400)]
CStoreEditor auto-activity log redaction
CStoreEditor logs all update calls to the activity log as key/value
pairs on the updated object. Avoid loging key/value pairs for objects
when the API call being relayed by CStoreEditor is on the list of
log-protect API calls. Instead, log "**DETAILS REDACTED**".
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Thu, 8 Nov 2012 17:06:31 +0000 (12:06 -0500)]
Set a date/time format that includes the actual time
Sites can override this at their individual skin level if preferred, but
as we have a number of rules at the hourly level, showing the time
generally makes sense.
Dan Scott [Wed, 7 Nov 2012 20:15:12 +0000 (15:15 -0500)]
TPAC: The 659 field is full of garbage in Conifer
Thus, prevent it from displaying. (Not sure why Evergreen treats it as a
Genre field by default, as it is reserved for local use per normal MARC
definitions...)
Dan Scott [Thu, 25 Oct 2012 18:36:33 +0000 (14:36 -0400)]
TPAC: Display alternate and abbreviated titles
In many cases, alternate titles (defined by the MARC 246 field) and
abbreviated titles (defined by the 210 field) are valuable data points
to display to users. So, display them. Turning this off is a matter of
overriding summary.tt2 to remove the titles.tt2 include.
Dan Scott [Tue, 23 Oct 2012 15:47:48 +0000 (11:47 -0400)]
TPAC: Show contents notes directly in record summary
By popular demand in IRC, move the contents notes directly into the body
of the record summary rather than hiding the content under a twisty.
This improves external indexing of the page and makes the contents notes
more immediately evident to users.
Dan Scott [Mon, 22 Oct 2012 19:46:20 +0000 (15:46 -0400)]
Add detailed contents content to TPAC record summary
Drawing from the LoC MARC definitions for the 500 field, display'em if you
got'em. Given that many keyword searches are likely to draw upon this content,
we should display the matches in the record summary.
Dan Scott [Tue, 9 Oct 2012 20:49:09 +0000 (16:49 -0400)]
Authority popups are empty: fix dojo.query() usage
When you right-click on a controllable field to display the contents of
the matching authority records, the contents of the matching authority
records simply appear as empty grey boxes.
This is another case of needing to iterate over multiple values
separately rather than using one convenient CSS selector.
Dan Scott [Mon, 8 Oct 2012 19:08:47 +0000 (15:08 -0400)]
Checkout: further validation of due date override
The check_past() function failed if given a date that was not strictly
in YYYY-mm-dd format; interestingly, a common transposition typo such
as "0212-10-20" results in "212-10-20" getting passed to check_past(),
and therefore generating an invalid date. Throw an exception in
check_past() rather than returning true, because we are not in fact
stating that the due date is in the past - and catch the exception and
flag the due date override box accordingly in the checkout screen.
We could bubble the exception up to the user, but hopefully highlighting
the checkout box as being in an invalid state will catch the attention
of the users.
Dan Scott [Mon, 8 Oct 2012 15:25:41 +0000 (11:25 -0400)]
TPAC: Invalid due dates cause 500 server error
CStore appears to return dates with leading 0s (such as '0212-10-08
23:59:59-05:17:32') with the leading 0s stripped off, resulting in
cases with 1-digit or 3-digit years for which DateTime::Format::ISO8601
returns an error.
We can protect against this problem by adding some defensive code to the
TPAC utility method to add the 0s back to the start of the year. We can
also log the problem when it occurs so that administrators can fix the
problem dates in the database.
Make scrollOnFocus default to false for dojo-based/conify interfaces
This change is intended to prevent a phenomenon in certain user
interfaces wherein clicking on a button or other widget can cause a
user's screen to suddenly jump and the user to need to click the widget
a second time before the desired function actually happens.
Dijits that have the scrollOnFocus property are the ones that tend to
exhibit this issue, especially, but not always, within the staff client
when the user's xulrunner window is not maximized.
There may be cases of interfaces actually relying on scrollOnFocus to do
something, but I think those cases should be so rare that this is still
worth doing, and exceptions can be applied there as needed.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Michael Peters [Mon, 1 Oct 2012 18:51:31 +0000 (14:51 -0400)]
LP#1020261 Better label for "Host" field in acq.edi_account
The host field of acq.edi_account is really meant to contain more than just a hostname.
It needs a scheme part, so that the whole contents of the field should be URI-ish, like
ftp://ftp1.somevendor.com
Otherwise Evergreen's EDI mechanism can guess wrongly that we want to use
SSH instead of FTP to connect.
This also adds a description for the field, in the footer, along with the other
"helpers".
Signed-off-by: Michael Peters <mrpeters@library.in.gov> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Mon, 24 Sep 2012 21:12:11 +0000 (17:12 -0400)]
TPAC added content lookup uses local server address
Use the current Apache server's IP address instead of apache->hostname
to determine where to route TPAC added content lookups. This allows the
server to handle the added content lookup locally instead of having to
route out and back into the cluster.
Continue using apache->hostname as the Host header to ensure the proper
virtualhost is used once the request is received.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Bill Erickson [Mon, 24 Sep 2012 16:50:47 +0000 (12:50 -0400)]
Added content connect timeout
Make tpac server-side added content lookups exit after a brief timeout
when the apache module is unable to open a connection to its own
top-level hostname (the virtualhost, apache->hostname).
As noted in the code comments, even though we are using Net::Server::NB
(non-blocking), it's only non-blocking in the sense of content
retrieval, not in how it calls connect() under the covers.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Jeff Godin [Wed, 25 Apr 2012 06:59:01 +0000 (02:59 -0400)]
Syndetic AC: Add more review sources with comments
* Add more Syndetic review sources (commented out)
Add additional Syndetic review sources, commented out
for performance reasons -- each source represents a distinct
request from the server to the AC provider, and we currently
lack a means of configuring which are on/off, short of
commenting / uncommenting.
* Add comments for Syndetics review sources
* Fix file name for School Library Journal reviews, add New
York Times reviews.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Art Rhyno [Sat, 22 Sep 2012 04:46:20 +0000 (00:46 -0400)]
Check to see if existing loan date is less than recall date
It seems possible that a recall can be issued that actually extends
the loan period for an item with semester or other generous loan
periods. This adds a check for the current loan period and uses it
if the calculated threshold date is later.
Signed-off-by: Art Rhyno <art632000@yahoo.ca> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Bill Erickson [Fri, 21 Sep 2012 21:10:58 +0000 (17:10 -0400)]
Copy location group searching repairs
In the get_library BLOCK, upgrade any use of 'loc' to 'locg' instead of
trying to determine which to use in which situation. Before this change,
'loc' was being used as the loc_name for the main org unit selector,
which should always use 'locg'. For any other cases (related to search
params), it's always safe to use 'locg' over 'loc'.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Mon, 30 May 2011 19:23:09 +0000 (15:23 -0400)]
Add "Move to storage" quick UI for bulk location moves
This simplistic interface accepts a barcode and immediately returns
some bibliographic information if the barcode was found - and the
item is moved immediately to the specified location. Goal was to
minimize clicking, this pretty much requires just scan scan scan.
Dan Scott [Thu, 6 Sep 2012 16:25:01 +0000 (12:25 -0400)]
TPAC: Escape single quotes in MFHD record location
If an MFHD record contains an 852 field with a subfield containing a
single quote, the unescaped single quote is introduced directly into the
value of the JavaScript hash that uses single quotes as delimiters -
thereby generating a JS exception and preventing the staff client from
properly populating the MFHD Editor menu.
This commit escapes incoming single quotes from the MFHD location field
to prevent that from happening. The other fields in the JS hash are
numeric and therefore should not need escaping.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Dan Scott [Wed, 12 Sep 2012 16:59:53 +0000 (12:59 -0400)]
TPAC: Results - don't show the pubdate if we're showing full pubinfo
In the "show few details" mode, we show just the pubdate; in the "show
full details" mode, we're showing the full pubinfo and therefore do not
need to show the stubby pubdate.
Dan Scott [Wed, 12 Sep 2012 15:50:03 +0000 (11:50 -0400)]
TPAC: Display full publication info
In both the results table and record summary, we were failing to display
the place of publication - which is critical information for people
trying to track down the right edition or constructing a bibliography.
Grab the place of publication, and then reconstruct 260abc (avoiding
another XPath iteration and giving ourselves the ability to enhance the
schema.org microdata at the same time).
Dan Scott [Fri, 7 Sep 2012 03:37:32 +0000 (23:37 -0400)]
Journal title hackery - move to a more robust location
The fix for bug #1044721 broke the journal title hack, which probably
should have lived where this commit moves it - if, in the age of filter
groups, we decide whether it's worthwhile to keep it alive at all.