Bill Erickson [Fri, 11 Nov 2011 18:22:34 +0000 (13:22 -0500)]
TPac; propagate query params to adv search (results link)
Update the "Advanced Search" link that shows on search results pages
(next to "Another Search") to propagate the current query into the
advanced search page, just like the Advanced Search link just above the
search bar.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Fri, 11 Nov 2011 20:25:49 +0000 (15:25 -0500)]
tpac; honor password reset matching email setting
If the "circ.password_reset_request_requires_matching_email" org unit
setting is enable, prompt the user to enter the email address associated
with the account and subsequently pass it on to the password_reset api
call.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Serials: in the holding code mini-wizard, offer a dropdown for seasons
This spares the user from having to remember the MFHD code for the
season, when dealing with periodicals issued by season (21 - 24 for
Spring - Winter, respectively).
This also applies sets the "scrollOnFocus" attribute to false for the
dijits within the mini wizard, as the jumpy behavior you get in
less-than-fullscreen staff client windows is otherwise maddening.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Mon, 14 Nov 2011 21:27:05 +0000 (16:27 -0500)]
tpac; improve ssl and authentication redirection
Create a better separation between pages the require SSL and those
that also require authentication. This change has a number of
beneficial side effects:
1. If a user is already logged in and is somehow redirected to the
non-SSL version of a page requiring SSL (via, for example, some external
link), they are simply taken to the SSL equivlent of the page first. If
they are found to be logged in, we're done. If not, they are directed to
the login page like usual.
2. password_reset page now requires SSL (but not auth, obviously)
3. Removed the unnecessary warning about logging out on a non-SSL
connection. We now redirect the user to the SSL version of logout so,
if they are in fact logged in, they can be successfully logged out.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Serials: allow freer input in holding code mini-wizard
In the Subscription Details interface of the Alternate Serials Control
View, under the Issuance tab, if you create a new issuance you can
now enter things like "01/02" in (say) the month field to denote a combined
January/February issue. All those fields are now free-form, whereas some of
them used to be numeric only.
Also, avoid an occasional issue where an error message about
dijit.form.DateTextBox not being a constructor would appear in the
JavaScript console. The problem was in a race condition among some
co-dependent JavaScript files that were all being loaded at the same
time.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Jason Etheridge [Thu, 10 Nov 2011 17:55:32 +0000 (12:55 -0500)]
LP88653 force SSL for requests from local XUL
Modifies RemoteRequest.js to convert any http:// request URL to https:// if the
requesting location has a chrome:// protocol.
Modifies util/network.js such that any use of util.network.request (as opposed
to util.network.simple_request) will assume "secure" for the resulting request.
Adds an example to the bottom of eg_vhost.conf for forcing SSL for an entire
site (OPAC and everything), courtesy of Dan Wells.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Fix a typo that snuck through the cracks in Cronscript.pm.in.
We had Opensrf::AppSession rather than OpenSRF::AppSession, which isn't
caught by the simple use_ok() tests that we largely rely on for our
current Perl test suite. In addition, when we manually tested the change
to Cronscript.pm.in, we didn't do both configure && make to ensure that
the new version of Cronscript.pm reflected the changes. Lots to learn,
luckily the method wasn't being used by anything else in Evergreen yet.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Mike Rylander [Tue, 8 Nov 2011 17:43:44 +0000 (12:43 -0500)]
Protect against slony replication lag, LP#621448
Make open-ils.circ.captured_holds.id_list.* API calls authoritative within
the staff client to avoid replication-lag related stale displays. Inspired
by James Fournie at SITKA.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Mon, 7 Nov 2011 21:44:42 +0000 (16:44 -0500)]
README: Use consistent endings (none!) for titles/subtitles
Most, but not all, of the titles/subtitles had colons appended. This
looks really weird in the Table of Contents, so try to be consistently
unweird and have no appended colons.
Dan Scott [Mon, 7 Nov 2011 21:38:32 +0000 (16:38 -0500)]
Backup the existing opensrf config files before copying
Per a suggestion from Wolf Halton <wolf.halton@gmail.com>, create backup
versions of the opensrf configuration files when we're copying the
Evergreen example versions over, so that we can retrieve the Jabber user
names and passwords and domains from the backups (if necessary).
On the detail page, when the user selects the "Search Results" link to
return the original search results, return to the correct page in the
search. The correct page will be the page where the currently viewed
record sits within the search. Normally, this is the last viewed
results page. However, if the user does some paging within the detail
page, enough to cross a page boundry, "Search Results" will take them to
the new page (i.e. the page w/ the current record).
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Wed, 2 Nov 2011 19:45:06 +0000 (15:45 -0400)]
TPac; sort items out list by due date, oldest first
Sort items most in need of return (i.e. oldest due date) to top. This
is done by replacing the call to "open-ils.actor.user.checked_out",
which does a lot more than we need, in a way that does not support
sorting/paging, with a simple json_query.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
James Fournie [Tue, 1 Nov 2011 23:01:57 +0000 (16:01 -0700)]
This prevents the acq unified_search method from returning anything other
than the objects of the expected type.
This is to address LP 884991 in which Acq users get a perm error for each
result of a search that they don't have access to retrieve. They shouldn't
even know about the existence of anything they don't have access to retrieve.
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Wed, 2 Nov 2011 13:47:04 +0000 (09:47 -0400)]
Tpac; hold error message 18n string extraction repairs
Make it possible for xgettext.pl (using
Locale::Maketext::Extract::Plugin::TT2) to extract hold error
message strings for translation. The plugin is not quite
smart enough to extract wholly dynamic values from the templates, since
it (presumably) only parses the templates and does not execute them.
The solution is to wrap the strings in l() where they are defined.
Add an example for the EVENT_MSG_MAP for the event PATRON_EXCEEDS_FINES.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
James Fournie [Tue, 20 Sep 2011 19:03:03 +0000 (12:03 -0700)]
Previously invisible copies showed as beige in the staff client, they stopped doing this in 2.0
This is because in 2.0 the copy counts logic was moved from open-ils.storage.biblio.record_entry.copy_count.staff
to an in-database function wrapped in open-ils.search.biblio.record.copy_count.staff. Both methods returned various
counts including an 'unshadow' count, however the 'unshadow' in the new database function was not completed and it
has only been returning a simple copy count rather than a count of opac visible copies as it should be to
replicate the old behaviour.
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Acq: better error message if trying to create PO without provider or agency
Before now, if you leave either the provider or ordering agency
fields blank in the "Create Purchase Order" dialog, you get a
nonsensical warning about prepayment.
This fixes that.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Liam Whalen [Thu, 3 Nov 2011 20:53:57 +0000 (16:53 -0400)]
Modified authority.indexing_ingest_or_delete to update MARC data
The authority.indexing_ingest_or_delete trigger in the update script
was missing a call to authority.propagate_changes which is responsible
for updating the MARC data of records affected by an auhtority merge.
This patch adds the call to authority.propagate_changes as it appears
in the authority.indexing_ingest_or_delete trigger from the file
999.functions.global.sql.
Signed-off-by: Liam Whalen <lwhalen@nrcan-rncan.gc.ca> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Acq: fix a bug that sometimes prevents the general search page from loading
Within Acquisitions General Search, javascript included from one file
in the <head> relies on the variable "localeStrings" being initialized
by javascript included from a file in <body>. Sometimes the wrong
javascript wins the race, you get an error about localeStrings being
undefined in the Javascript console, and the page stops loading.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Tue, 1 Nov 2011 21:02:44 +0000 (17:02 -0400)]
Fine generator; raise multi-session mode recv timeout
When fetching the batch of overdue circ IDs to process for fine
generation, wait a little longer for the data to arrive, since
it is a longer running DB query than most.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Tue, 1 Nov 2011 17:29:25 +0000 (13:29 -0400)]
Force Amazon AC requests to use 10-digit ISBNs
Inspired by a patch submitted by Ian Bays <ian.bays@ptfs-europe.com>
via https://bugs.launchpad.net/evergreen/+bug/870171, this patch takes
the incoming key and, if it is longer than 10 characters (a 10-digit
ISBN or Amazon ID), attempts to normalize it and return a 10-digit ISBN.
We don't normalize all incoming keys because some sites are horribly
abusing the 020 MARC field to include an Amazon ID instead of an ISBN -
but that works in practice and we'd rather not break working
installations if we can avoid it.
Tpac: staff saved searches expand/collapse, use right ou context for setting
1) Display staff saved searches collapsed by default. This makes the facet
display right underneath it more accessible in the case of long search
histories.
2) When checking the org unit setting for the limiting number of
searches to save, use the user's ws_ou as the context, since this is a
staff-client feature.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
For some reason it must have made since in the past to wrap this
interface in both parts/base.tt2 and myopac/parts/base.tt2, but
nowadays that results in having extra headers and footers around
the actual page contents, so the layout looks broken.
This fixes that. No other interfaces were doing this double wrapping.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Tpac: Rename orig_loc to physical_loc, for clarity's sake.
This is an OPAC parameter not so much meant for use by patrons at home,
but for users at machines physically located in libraries. In
conjunction with OpenILS::WWW::Redirector, it helps those machines
"remember" what branch they're in.
Anyway, the name orig_loc doesn't make the parameter's meaning quite as
clear as it could whne you encounter it in code.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Tpac: clear the per-process cache of org-unit settings on each page load
Any time saved is not worth the confusion of changes to org unit settings not
taking effect in the TPAC without an apache restart, or worse, taking
effect for some page loads but not others.
Actually authored by Bill.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Jason Etheridge [Tue, 27 Sep 2011 15:56:51 +0000 (11:56 -0400)]
LP#860685 List Actions and Print List fix
List Actions and Print List broken in Check In interface when not using "Fast
Entry (Asynchronous)", due to the way we're using list.refresh_row. This fixes
the internal list state for tracking retrieved versus un-retrieved list rows.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Wed, 26 Oct 2011 18:56:01 +0000 (14:56 -0400)]
Z39.50 service filter repairs
Do not attempt to filter out Z39.50 services by permission when
retrieveing the services in a non-authenticate manner (i.e. from within
the Z39.50 code). Otherwise, the code will die on $e->requestor->id,
because there is no requestor.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Bill Erickson [Wed, 5 Oct 2011 13:39:47 +0000 (09:39 -0400)]
Z39.50 local catalog fetch-more repairs
Fixes the following problem:
When paging through local catalog results in the Z39.50 interface,
paging off then end of the local results would result in an unknown
server error caused by trying to retrieve an empty list of records.
$list->{count} in this context is the overall hit count, not the counts
in the current page of results. Note also if {count} is zero, the list
of IDs will be undef, so we use both.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com>
This particularly matters for the "ephemeral," unnamed selection list that
Acquisitions General Search uses to hold bib records represented as
lineitems, as that list is deleted for the next run of that kind of
search.
It's possible to get lineitems onto that list that are in a state
other than "new". Code that deletes this list first deletes the
lineitems that belong to it, but that code formerly assumed that there
are two types of lineitems. "new" ones (that should be deleted) and ones
that belong to purchase orders (that should be deatched). That doesn't
necessarily cover all possible lineitems on the picklist, so deletion
ultimately fails.
This fixes that.
[update: now this bugfix incorporates a bugfix, the need for which was
detected by Ben Shum. See LP #869581]
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
TPAC: avoid problem with HOLD_EXISTS event in hold placement
If you place a hold on something that generates a HOLD_EXISTS event (and
no other events?) you get a 500 error from Apache and an error in the
logs saying "not a hash reference" about $result in the lines I've
changed here.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Dan Scott [Sun, 16 Oct 2011 16:45:52 +0000 (12:45 -0400)]
LP875819: Fix SRU and Z39.50 default search index failures
Per http://www.loc.gov/standards/sru/specs/cql.html :
All parts of CQL are case insensitive [...] If any case insensitive
part of CQL is specified with both upper and lower case, it is
for aesthetic purposes only.
So fold the SRU qualifier and relation to lower case. This then
matches the srw.serverchoice entry that we already have in
config.metabib_search_alias so that default searches will successfully
point to the keyword index.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Wed, 19 Oct 2011 20:53:44 +0000 (16:53 -0400)]
TPac; Fetch authoritative user object in my-account
Since user data changes in my-account, any time we fetch the fleshed
user object, fetch it within a transaction to avoid retrieval from a
(potentially lagging) DB replica.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Wed, 19 Oct 2011 20:00:58 +0000 (16:00 -0400)]
Fix README issues
Martha Driscoll <driscoll@noblenet.org> noted that the
create_database.sql script wasn't actually targeted by the psql command,
and also that there was an extraneous <code> tag in the OpenSRF start
command.
Bill Erickson [Wed, 19 Oct 2011 17:42:16 +0000 (13:42 -0400)]
CStoreEditor batch_retrieve repairs
1. If the caller provides additional cstore params, like flesh,
flesh_fields, etc. make sure we only use the first component of the
search (the list of identifier values) for the cstore search.
2. Determine the identifier field from the class being retrieved instead
of hard-coding it to be "id"
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
TPac: Put staff saved searches in same div as facets on the results page
Also: make a minor improvement to bookbag sorting clicking heading sort
links a second time reverses order.
And on the record page, make them less ugly. We need to get rid of this
974-px-wide business. It's ridiculous, and it keeps us busy fighting CSS
just to keep a silly grey margin on the right side of the display, and
it keeps us from using all available space. We need to simplify the CSS
greatly, in fact. Let's bite that bullet sooner than later.
TPac: Put staff saved searches in same div as facets on the results page
And on the record page, make them less ugly. We need to get rid of this
974-px-wide business. It's ridiculous, and it keeps us busy fighting CSS
just to keep a silly grey margin on the right side of the display, and
it keeps us from using all available space. We need to simplify the CSS
greatly, in fact. Let's bite that bullet sooner than later.
Bill Erickson [Tue, 18 Oct 2011 16:07:46 +0000 (12:07 -0400)]
Re-fetch hold for cancel notify to correct timestamp
Re-fetch the cancelled hold from the DB before passing it off to
action/trigger for notification processing. Otherwise, A/T attempts to
perform date math on "now" instead of a valid timestamp and subsequently
croaks.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Sun, 16 Oct 2011 22:39:00 +0000 (18:39 -0400)]
Cache open-ils.fielder results by locale
The problem was particularly visible in search facets, but existed
before: the cache key used for fielder results did not take locale into
account, so on a multi-locale system the first locale won and populated
the cache for all other locales.
Use a session locale if provided, otherwise default to the locale set in
opensrf.xml
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Sarah E. Chodrow [Wed, 14 Sep 2011 13:15:14 +0000 (09:15 -0400)]
Initial patch from Sarah Chodrow on LP bug 849447.
Also check for standing penalties and expired cards when checking
if it is ok for the patron to checkout, charge_ok.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Sarah E. Chodrow (sarah.chodrow@bibliotheca-itg.com) Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Mon, 17 Oct 2011 19:00:33 +0000 (15:00 -0400)]
TPac: Describe bookbags mo' semantically
Rather than "big-strong", use a heading (H2, as the previously used H2
headings got bumped to H1) and wrap the description in a styled DIV
rather than just dumping it after a <br /> and wrapping it in <em>.
TPac: bookbags - stop trying to show everything at once
Go back to displaying one bookbag at a time (not counting the temporary
list, when that is populated)
This hopefully constitutes a usability improvement.
While it doesn't provide paging of bookbags themselves or of the items
therein, it should make that easier to do. Showing all bookbags and all
their items made it nonobvious how paging would even be expected to
behave.
This also provides the same sorting for the items in the temporary list
as in real bookbags.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Mike Rylander [Wed, 21 Sep 2011 20:38:08 +0000 (16:38 -0400)]
New in-db search and browse of authorities with non-filing-indicator support
Upon authority ingest, record simple authority headings for searching,
browsing and sorting. Respect non-filing indicators, if configured
(configuration is the nfi field on authority.control_set_authority_field).
Provide a full suite of search/browse top/center alpha/rank functions
based on authority tag, bib tag or browse axis at the database layer.
Provide functions to find the main-only and full tag list, and ref-variant
versions of the previously defined functions.
Teach OpenILS::WWW::SuperCat (responsible for RESTful feed-generating
interfaces) to use new OpenILS::Application::SuperCat methods that in
turn use the database methods. The change should be transparent to
users of SuperCat web APIs.
Carry indicators over from authority main entries to bibs, when applying
them in the marc editor.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Jason Etheridge [Fri, 14 Oct 2011 16:14:14 +0000 (12:14 -0400)]
LP873614 print_init error printing bill history
xulG.url_prefix needs to be present for anything using util/print.js and the
Mozilla print strategy. Alternately, we could duplicate the logic behind
url_prefix and bundle it into print.js :-/
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Fri, 14 Oct 2011 02:10:23 +0000 (22:10 -0400)]
Modernize settings-tester.pl a bit
* Add a section that checks for Evergreen services in opensrf_core.xml
* Ignore the qstore database credentials, as qstore is unused currently
* Split things off into subroutines for easier reading