Dan Scott [Fri, 11 May 2012 14:45:39 +0000 (10:45 -0400)]
Move PLPERL dropping outside of 2.1-2.2 upgrade transaction
Sites might have added custom PLPERL database functions for migrations,
data clean up, etc, so don't make the success of the 2.1-2.2 upgrade
hinge on a database schema that exactly matches vanilla Evergreen;
just move it outside of the upgrade transaction and output a reassuring
note.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Bill Erickson [Fri, 4 May 2012 13:18:10 +0000 (09:18 -0400)]
Check if transaction needs closing after adding billings
This addresses the issue where issuing refunds results in a negative
ballance and it is then impossible to close the transaction by creating
new billings.
https://bugs.launchpad.net/evergreen/+bug/758982
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPAC: Keep site() and depth() out of basic search box when widgets suffice
This is a short term but working solution to the problem described here:
https://bugs.launchpad.net/evergreen/+bug/986196
Now when you have a selection for site on the advanced search page, it
doesn't lead to redundant site() and depth() terms in your basic search
query box.
Item type selections and search class selections (keyword/author/etc)
can still lead to ugliness in the advanced search box, but that's
because in the advanced search page you get a multi-select widget for
item type and in a basic search page you only get a single-select
dropdown, so there's not a clean way to map your advanced page
selections to basic page selections. Search classes are kind of the
same issue, since you have three dropdowns on the advanced search page
and one on the basic.
So the "bigger" problem is one that we will have to solve later, but for
the common case at least we don't get the extra site() and depth() for
now.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Fri, 4 May 2012 16:07:35 +0000 (12:07 -0400)]
TPAC: repair staff client End link for showing last record
In the embedded TPAC, when staff clicks the End link in the record
detail page to jump to the last record in the search results, it now
makes an intermediate jump through search code, which locates the last
record in the set (via CGI param find_last) then redirects to the record
detail page for the last record. With this approach, we don't have to
pre-fetch the entire set of record IDs just to render the paging links.
Tip o' the hat to Mike R. for the design suggestion.
https://bugs.launchpad.net/evergreen/+bug/984070
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Consensus was reached to remove editor-specific globs from .gitignore.
In a highly overengineered discussion out of scope with the actual breadth
of this very minor issue, everyone has come to the conclusion that
editor-specific globs don't really belong in the project's .gitignore,
given that git permits a global-level ignore file for users.
Instead, a HACKING file is herein added, with its first entry to explain
how developers can set the own global gitignore.
Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org> Signed-off-by: Dan Scott <dan@coffeecode.net>
If you had relatively technical users composing searches with
QueryParser syntax, or if they were just typing ampersands for any
other reason, AutoSuggest would behave as if the ampersand marked the end
of user input.
This is fixed by applying the correct URI-encoding function for the
situation.
To be clear, QueryParser syntax does not actually affect suggestions;
such syntax is ignored. AutoSuggest is not search.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Scott <dan@coffeecode.net>
lp996776: Patch to fix the response if no configured status is detected.
SIP response messages that use circulation_status where defaulting to just 1
rather than 01 if the status was not detected. Since SIP needs a 2 character
response, this was causing issues in some 3rd party devices. Added quoting
around the 01 to force the 2 characters.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This causes bad interactions between patron windows and normal catalog
windows. Examples:
Load a patron, load place hold catalog in patron window. Future loads of
non-patron catalogs will default to this patron.
Load Patron A from written note, and open Place Hold catalog. Start
searching for the item Patron A wants.
Get interupted by Patron B calling. Load Patron B, and open Place Hold
catalog. Search, place a hold for Patron B.
Return to Patron A, find item, go to place hold. Find Patron B's barcode
populated.
Instead, teach the staff javascript, that already knows how to load hold
preferences, how to grab the barcode from xulG. This barcode should be
specific to the patron window the catalog is embedded in, and won't 'leak'
to other catalog interfaces.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Tue, 8 May 2012 16:52:02 +0000 (12:52 -0400)]
Roll back libjs version to 1.7.0
The install version of libjs (Spidermonkey) had been bumped to the
latest, 1.8.5, but it turned out that the tests for that had probably
been run on a system that had an old version of libjs source and/or
installed headers/libraries in place, as building libjs 1.8.5 is a
different beast entirely (different directory structure, etc).
In addition, there are several bugs along the lines of
https://rt.cpan.org/Public/Bug/Display.html?id=75058 that strongly
suggest that libjs-1.8.5 is not compatible with the
JavaScript::SpiderMonkey 0.21 Perl module.
Therefore, roll back to the tried-and-true libjs 1.7.0.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
James Fournie [Mon, 7 May 2012 17:57:30 +0000 (10:57 -0700)]
Upgrade 0704 was missing from the 2.1-2.2 upgrade script.
That upgrade added a parameter to search.query_parser_fts, without it,
Evergreen passes 11 parameters to the database but the searches fail because
there's only a 10 parameter function in the database.
Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Fri, 4 May 2012 17:55:55 +0000 (13:55 -0400)]
Fix typo in TPAC noticed by Warren Layton
Expiration needs to be spelled correctly; Warren Layton pointed out the
typo while working on a translation of the derived tpac.pot file. Many
thanks, Warren!
Dan Scott [Mon, 9 Apr 2012 20:23:08 +0000 (16:23 -0400)]
Prereqs: Remove references to CentOS / RHEL
The prereqs were focused on the 5.x series for CentOS and RHEL, which is
hella-out-of-date and never really worked anyway. Get rid of the noise
to focus on the signal.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Wells [Wed, 25 Apr 2012 19:56:20 +0000 (15:56 -0400)]
Allow subscriptions at org units without volumes
Subscriptions are sometimes owned at the consortium or system
level, so forcing can_have_vols() to be true was incorrect.
This commit removes those checks. In addition, we also remove
some dead code and make the subscription org unit selector
consistent with the distribution org unit selector.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Jason Etheridge [Wed, 2 May 2012 19:23:06 +0000 (15:23 -0400)]
Address date sorting in Item Status and Copy Buckets interfaces, too
> The sort_value function for the date columns being used in those
> interfaces had no error protection, and were returning empty strings
> upon failure.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Tue, 1 May 2012 06:36:11 +0000 (02:36 -0400)]
dblatex hates files with multiple periods
Running the PDF transform was generating errors from dblatex complaining
about unknown file extensions like ".50_Import1.jpg"; this was because
there were two periods in the file name. Easily fixed by renaming the
files, and I removed the useless ALT text from the image attributes in
the same pass.
Dan Scott [Tue, 1 May 2012 06:29:28 +0000 (02:29 -0400)]
Update Release Notes and Installation documents to match code
We need to keep the release notes and installation instructions in sync
with the code versions.
To make our lives easier, use the "leveloffset" AsciiDoc macro so that
we don't have to push all of the heading indicators in the
single-sourced documents down one level manually.
Dan Scott [Tue, 1 May 2012 05:52:56 +0000 (01:52 -0400)]
Release notes: clean up and introduce TPAC
General clean-up of the release notes for consistency and to support
PDF output:
* Reformat line-widths to 80 characters or less
* Mark interface window and element names as bold
* Fix up some formatting glitches and headers
* Make the "Documentation is available..." note standard & separated
by one line; I suspect we will want to modify this globally, so it
will be easier if it is consistent.
Also, give a brief introduction to the TPAC and mention the forthcoming
JSPAC deprecation in the next feature release.
Dan Scott [Mon, 30 Apr 2012 20:02:21 +0000 (16:02 -0400)]
Replace the questionable PDF icon with a CC-BY-SA icon
The Adobe PDF icon policy at http://www.adobe.com/misc/linking.html
states that the icon may only be used with PDF documents created by an
Adobe Acrobat product. The DIG PDF files are not produced in this
manner.
Therefore, replace the current icon with a GIF derived from the CC BY-SA
Dropline Etiquette GNOME icons by Silvestre Herrerra
<silvestre.herrera@gmail.com>. Downloaded from
http://art.gnome.org/download/themes/icon/1049/ICON-DroplineEtiquette.tar.bz2
To comply with the "BY" part of BY-SA, the new GIF includes a comment
that clearly states the provenance of the icon.
Bill Erickson [Wed, 21 Mar 2012 20:33:39 +0000 (16:33 -0400)]
Vandelay match set permission additions
Allow retrieve access for match points with the VIEW_IMPORT_MATCH_SET
permission (in addition to ADMIN_IMPORT_MATCH_SET).
Adds 2 new permissions to the database:
ADMIN_IMPORT_MATCH_SET
VIEW_IMPORT_MATCH_SET
From Jason Stephenson resolving conflicts:
> Conflicts:
>
> Open-ILS/src/sql/Pg/950.data.seed-values.sql
>
> I had to change the ids of the new permissions because another branch
> had used one of the ids since this branch was last rebased. I also edited
> the ids in the upgrade script to match what is in 950.data.seed-values.sql.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Constrain serial.issuance.holding_code to be valid JSON or NULL
This avoids serial.materialize_holding_code() failing on bad data. The
upgrade script will actually throw away bad values for
serial.issuance.holding_code. This is no real loss, since bad data
there prevents any serials functions around the row in question from
working properly anyway.
This problem was reported by Martha Driscoll and Ben Shum.
*Also* put a couple of changes missed from the 0700 upgrade script into
210.schema.serials.sql.
Fix new serial constraint upgrades
1. None of the upgrades so far have moved is_json() from the public
to the evergreen schema. That's probably a separate issue, but it
should be safe to call it unqualified, and that's what the rest of
the upgrade file does, so we will too.
2. Add a specific SET CONSTRAINT to avoid deferred trigger problems
when ALTERing the table.
3. Make sure that the unwanted columns on materialized_holding_code
do not exist regardless of your upgrade path.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Fri, 27 Apr 2012 01:56:23 +0000 (21:56 -0400)]
TPAC: Instrument the search results page
Because we want to know why search results can be slowish, add timelog()
entries to pertinent locations in Search.pm.
Quick results on my laptop with the concerto set:
* 10 results = 1.1 seconds for get_records_and_facets()
* 50 results = 4.2 seconds for get_records_and_facets()
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
AUTHORS, NEWS, and INSTALL files should actually have reasonable content if they exist.
Specifically, this commit:
* simply points INSTALL to README via symlink, since install instructions are there.
* AUTHORS now notes that Evergreen keeps its authors in the git log.
* NEWS now explains where release notes are.
Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Ben Shum [Wed, 25 Apr 2012 03:23:04 +0000 (23:23 -0400)]
Do not hide copy counts from results in staff client.
Remove the check for whether you are a staff login or not.
Ideally, we would want the copy counts to be displayed in both
public catalog and staff client.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Dan Scott [Wed, 25 Apr 2012 19:20:46 +0000 (15:20 -0400)]
Instrument the TPAC: add timelog() method to EGCatLoader
Meant for timing how long events take to generate a single TPAC page,
the timelog() method will provide timing in microsecond granularity of
various events required to build the page.
To invoke: $self->timelog("Event description...");
Builds up a context variable named "timing" containing a list of
arrays; each array entry contains a time and the event description.
Disabled by default; to enable, set DEBUG_TIMING = 1 in
OpenILS/WWW/EGCatLoader.pm
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Dan Scott [Tue, 24 Apr 2012 19:30:41 +0000 (15:30 -0400)]
Fix image references and continuation formatting
This enables the production of epub output, as "a2x --format epub"
introduces stricter checking than the default formatting. Good for us,
we get to see more images and cleaner output!
Classes of fixes include:
* Leading '+' to keep numbered bullet sequences in sync only works if
there are no blank lines around the '+' lines. Easiest to just keep
the bullets with no blank lines between them.
* Typos in image file names.
* Intradocument link syntax (just use <<id,description>>)
* image:: entries like to have a leading blank line
Jason Etheridge [Fri, 30 Mar 2012 19:32:53 +0000 (15:32 -0400)]
unsaved data loophole
The Start/Previous/Next/End/Search Results buttons in the staff client OPAC
wrapper do not fire unsaved data warnings for the MARC editor when changing
records. This plugs that hole, but it's not a complete solution, as you can
still move away from the record by clicking on hyperlinks in the OPAC View,
though that's less likely to happen.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Dan Scott [Sun, 22 Apr 2012 19:40:00 +0000 (15:40 -0400)]
Bootstrap via "autoreconf -f -i" instead of "autogen.sh"
It has always been potentially confusing to maintain two shell scripts
named "autogen.sh" for two distinct purposes in Evergreen. Take
advantage of "autoreconf" that is packaged with autoconf for dev
bootstrapping purposes and trash the old "autogen.sh" as a result.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Wells [Tue, 17 Apr 2012 21:35:26 +0000 (17:35 -0400)]
Clean up and refine serial note support, part 2
Because of the way our notes are being rendered, a handful of
special XML characters can break the note interface when editing.
These characters are now properly encoded as entities.
Also, editing of newlines presents a similar issue with different
consequences, and it is handled similarly but separately.
Dan Wells [Tue, 17 Apr 2012 21:34:06 +0000 (17:34 -0400)]
Clean up and refine serial note support, part 1
This commit fixes a number of minor problems with serial notes:
1) Serial notes are currently returned in "random" (database)
order. Adding a create_date sort is a sensible default.
2) If you have many notes, they start to display in a squashed and
unreadable fashion. Switching from a groupbox to a styled vbox
provides a simple workaround.
3) It is currently impossible to display newlines in notes. We can
deal with this by changing the display style.
Dan Wells [Tue, 17 Apr 2012 20:02:49 +0000 (16:02 -0400)]
Limit excess serial data fetching
Overfetching and duplication of data in the interface is both
inefficient and bug-inducing. This reduces a couple big offenders.
First, in the items tab, we will store distribution and subscription
data separately, rather than duplicating for every row. Second, we
will only redraw rows as needed rather than refresh the whole list so
often. Finally, we no longer need to lookup call numbers separately,
as they are included in the one-time distribution fetch.
Dan Wells [Fri, 13 Apr 2012 13:53:32 +0000 (09:53 -0400)]
Better Prediction for Incomplete Chronologies
While relatively rare, some journals record only the year on the
cover, even if they come out monthly or weekly. This commit
expands our previous support for serials with no chronology at
all to cover serials with partial chronology.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Acq: Refactor General Search for more smarts and speed
This started in response to problems discussed around
https://bugs.launchpad.net/evergreen/+bug/967824 , but it really
addresses a distinct issue from that bug.
Acq General Search relies on lots of joins to make several tables in Acq
searchable by attributes of any of the other tables for rows that happen
to be related. This is about 1) making better joins and 2) making fewer
joins when you don't need them all for a given search.
Much thanks to Mike Rylander for help figuring out how to efficiently
implement the joins needed for acq.invoice, which is the tricky part.
Less importantly, but still significant for some searches, we also need
case insensitivity for searching on user-linked fields (General Search
always lets you search by any of username/family name/given name/barcode
for these fields) in order to take advantage of some indexes for speed.
Jason Etheridge [Fri, 13 Apr 2012 06:54:13 +0000 (02:54 -0400)]
add more penalty related CSS hooks
PATRON_HAS_CUSTOM_PENALTY (if the penalty is not a stock penalty, based on id)
PATRON_HAS_STAFF_ALERT (if the staff_alert boolean on the penalty is true)
PATRON_HAS_BLOCK (if there's anything in the penalty's block list)
PATRON_HAS_CIRC_BLOCK (if CIRC is in the block list)
PATRON_HAS_RENEW_BLOCK (if RENEW is in the block list)
PATRON_HAS_HOLD_BLOCK (if HOLD is in the block list)
PATRON_HAS_CAPTURE_BLOCK (if CAPTURE is in the block list)
PATRON_HAS_FULFILL_BLOCK (if FULFILL is in the block list)
also adds stock CSS for PATRON_HAS_STAFF_ALERT, a blue border around the patron
name.
In the color hierarchy, this comes after the normal Green/Lime status, but gets
trumped by any other penalty that sets a colored border.
So, for example, if a patron has no penalties, and you go to Messages and add an
"Alert" note, that equates to the penalty ALERT_NOTE, which has a staff_alert
setting of True. On a refresh, the patron will then have a blue border around
their name. If you then create a bill on that patron for $100, triggering the
PATRON_EXCEEDS_FINES penalty, then the patron will gain the normal purple or
lavender border, even though the penalty also has a staff_alert setting of True
and triggers PATRON_HAS_STAFF_ALERT CSS.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Wed, 11 Apr 2012 04:08:41 +0000 (00:08 -0400)]
TPAC: Clear params when viewing lists in search results
Per LP977353, search terms are propagating when the list is being viewed
in "results" (HTML View), and therefore those search terms block the
display of most or all of the items in the list. Therefore, do not
propagate the other CGI params to the mkurl() call.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Scott [Fri, 6 Apr 2012 18:52:20 +0000 (14:52 -0400)]
Add pref_ou query filter for preferred library searching
Include the user's "preferred search library" (as set in search
preferences, falling back to home OU) in searches, specifically for the
purposes of ensuring that located URIs at the user's preferred library
would trigger hits where physical copies would be out of scope.
Practical example:
1. User sets preferred search library to BR1.
2. They jump onto the catalogue, log in (which changes their search org
to their preferred search library of BR1), but then for some reason
change their search org in the org selector to BR3.
3. They issue a search for "Harry Potter and the Philosopher's Stone".
BR3 doesn't hold any copies or have any located URIs, but SYS1 (BR1's
parent) has a PotterMore licence and has added their 856 $9 SYS1 to a
bib record.
As it currently stands, User is out of luck; they won't see any hits in
search results as there are no copies or located URIs in the BR3 scope.
The proposed enhancement would, however, make the search results contain
a hit for "Harry Potter and the Philosopher's Stone" at the user's
preferred search library.
Sites can trigger the preferred library as part of the query filters
using the "pref_ou(SHORTNAME)" syntax.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Scott [Mon, 9 Apr 2012 21:07:22 +0000 (17:07 -0400)]
Fix references to 2.2-beta2 throughout the upgrade document
There were a number of references to 2.2.beta1 instead of 2.2-beta1;
also, we're at beta2 now, so point to that. Also, point to the right
version upgrade script (now living in a new directory).
Dan Scott [Mon, 9 Apr 2012 13:37:57 +0000 (09:37 -0400)]
i18n: Robustify db-seed-i18n.py parsing
Faced with the perplexing use of a space before a comma in
oils_i18n_gettext() keys, db-seed-i18n.py's regex failed. The solution
for a sloppy regex? More powerful regex!
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Tue, 27 Mar 2012 04:12:43 +0000 (00:12 -0400)]
TPAC: Integrate i18n for TPAC into build process
Support the "standard" i18n build process for internationalization by
integrating the TPAC string extraction (via xgettext.pl) and update /
install bits. Also, add the base POT file to support translation in
Launchpad.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Dan Scott [Sun, 8 Apr 2012 22:13:26 +0000 (18:13 -0400)]
TPAC: Protect against requests for non-existent records
If a record request is received for a record that does not exist (say,
if 100 records have been loaded and someone submits a request for
/eg/opac/record/399), rather than dying with a server error, return
immediately.
Eventually we'll want to provide an explicit "record was not
found error" in the TPAC record details; for now the TPAC just displays
zero bib detail.
Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Mike Rylander [Wed, 29 Feb 2012 17:04:54 +0000 (12:04 -0500)]
Protect against empty default_CD_modifiers in opensrf.xml
If the app settings for the open-ils.search service in opensrf.xml had
an empty (but not entirely missing) <default_CD_modifiers> element, then
the open-ils.storage log would contain entries like the following:
Use of uninitialized value $class in hash element at
/usr/local/share/perl5/OpenILS/Application/Storage/QueryParser.pm
Protect against that problem with more defensive code in QueryParser.pm.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Scott <dan@coffeecode.net>