working/Evergreen.git
10 years agoFound a few last functions that need changing to native SQL
Ben Shum [Fri, 7 Feb 2014 06:18:08 +0000 (01:18 -0500)]
Found a few last functions that need changing to native SQL

These new uses probably went in more recently as authority fixes. Updated them to
use the native functions as well.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoKeep dropping and creating array_accum()
Dan Scott [Fri, 17 Jan 2014 01:59:13 +0000 (20:59 -0500)]
Keep dropping and creating array_accum()

We want to keep array_accum() around for now to support any custom SQL that
sites might have generated. Plus, we don't want it to show up in our search
path ahead of the native array_agg()!

We can always rebase this as a fix into the previous commit to squash history a
bit. "Nope, that never happened!"

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoMore native SQL functions
Ben Shum [Fri, 18 May 2012 04:27:24 +0000 (00:27 -0400)]
More native SQL functions

Found four more places that this needed to be changed.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoPrevent {NULL} values from blocking bib saving
Dan Scott [Tue, 3 Jan 2012 16:53:49 +0000 (11:53 -0500)]
Prevent {NULL} values from blocking bib saving

With both the old ARRAY_ACCUM and ARRAY_AGG, and with array_nulls on,
PostgreSQL 9.0 on Debian Squeeze was generating values of '{NULL}'
rather than actual nulls. This would in turn prevent bibs without ISBNs
or ISSNs from being saved successfully. A CASE statement protects
against that problem and returns a clean NULL.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoARRAY_ACCUM() -> ARRAY_AGG() for new authority nfi functions
Dan Scott [Sun, 16 Oct 2011 14:26:00 +0000 (10:26 -0400)]
ARRAY_ACCUM() -> ARRAY_AGG() for new authority nfi functions

Fix the new places where array_accum() has been able to sneak into the
schema.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoTeach asset.merge_record_assets about STRING_AGG()
Dan Scott [Thu, 13 Oct 2011 22:56:26 +0000 (18:56 -0400)]
Teach asset.merge_record_assets about STRING_AGG()

Now that asset.merge_record_assets() is working, cut over to
STRING_AGG() so it can iterate over those unnecessary nodes faster :)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoOne more STRING_AGG() conversion
Dan Scott [Thu, 13 Oct 2011 14:45:25 +0000 (10:45 -0400)]
One more STRING_AGG() conversion

Teach biblio.indexing_ingest_or_delete() to use STRING_AGG() where
appropriate.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoNative SQL functions for Vandelay
Dan Scott [Wed, 12 Oct 2011 18:20:46 +0000 (14:20 -0400)]
Native SQL functions for Vandelay

Use STRING_AGG() where appropriate instead of
ARRAY_TO_STRING(ARRAY_ACCUM()), and ARRAY_AGG() instead of
ARRAY_ACCUM().

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoReplace ARRAY_ACCUM() custom function with ARRAY_AGG()
Dan Scott [Wed, 12 Oct 2011 03:53:33 +0000 (23:53 -0400)]
Replace ARRAY_ACCUM() custom function with ARRAY_AGG()

Tested each replacement to ensure that the return of NULL instead of
'{}' empty array doesn't break anything - although some functions didn't
seem to work with either function (for example,
asset.merge_record_assets() doesn't seem to actually move an 856 from
the source to the target record).

Also replace ARRAY_TO_STRING(ARRAY_AGG()) with STRING_AGG() in a couple
of places; see
http://www.depesz.com/index.php/2010/02/17/waiting-for-9-0-string_agg/
for one reason why (likely performance gain).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoSkip duplicate username check when username unchanged
Jeff Godin [Wed, 30 Oct 2013 17:20:28 +0000 (13:20 -0400)]
Skip duplicate username check when username unchanged

Changing a username, then changing back to the user's current
username results in a duplicate username detection -- a false
positive due to the API call finding a user with that username --
the current user. This prevents you from saving any other changes
you may have made to the user.

This can be prevented by skipping the duplicate username check if
the user is not new and the username in the field matches the
username stored in the in-memory Javascript representation of the
user.

There's still a potential corner case which could be avoided by
using a new/modified API call to either accept an "except this
au.id" argument or to return the au.id of the found user, but I
don't see a need for that at this point.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoOpenSearch release note
Ben Shum [Thu, 6 Feb 2014 05:33:33 +0000 (00:33 -0500)]
OpenSearch release note

Add a short release note about the return of OpenSearch support.

Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoRestore OpenSearch support and use TPAC search
Dan Scott [Wed, 15 Jan 2014 04:46:41 +0000 (23:46 -0500)]
Restore OpenSearch support and use TPAC search

This enables users to easily add the Evergreen search engine to their browser's
built-in set of search engines, and most importantly directs searches to the
TPAC instead of the weird old Supercat interface.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP1271218 - clarify how opt-in user notifications are shown in my account
Ben Shum [Tue, 21 Jan 2014 18:52:49 +0000 (13:52 -0500)]
LP1271218 - clarify how opt-in user notifications are shown in my account

As reported in LP127128, end users may not need to be shown the message that
"No notification preferences are configured" when in fact this message is only
displayed when the user opt-in notification settings are not configured.

So, alter this to only show the table and div when there are settings to be
configured and otherwise show nothing.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP#1164720 Prevent empty names in TPAC lists
Bill Erickson [Thu, 9 Jan 2014 16:24:08 +0000 (11:24 -0500)]
LP#1164720 Prevent empty names in TPAC lists

Form submission for list creation with an empty name value now prevents
list creation and redirects the user to a new error page explaining why
list creation failed.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoBumping base schema version to match latest upgrade
Bill Erickson [Mon, 3 Feb 2014 20:50:51 +0000 (15:50 -0500)]
Bumping base schema version to match latest upgrade

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoRevert "Eliminate an annoying and useless warning in the JavaScript Console."
Ben Shum [Fri, 31 Jan 2014 20:45:08 +0000 (15:45 -0500)]
Revert "Eliminate an annoying and useless warning in the JavaScript Console."

This reverts commit bb4a797010201d6f26156c9e921d78690f265e35.

My fault for picking this in without more testing. This broke things like noted
in LP1275074.

10 years agoInclude RFID docs with full path
Dan Scott [Mon, 27 Jan 2014 15:50:31 +0000 (10:50 -0500)]
Include RFID docs with full path

Ben Shum noticed that the RFID docs weren't showing up in the documentation; we
need to include the full relative path to the RFID docs.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoFix copy_info variables for result and record view
Ben Shum [Sat, 25 Jan 2014 04:56:45 +0000 (23:56 -0500)]
Fix copy_info variables for result and record view

Because we yanked out the code that generates the link into a separate INCLUDE
file, the function was looking for something for copy_info. The one for result
was missing entirely and the one for record was backwards.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoKPAC library page: give the kids some style
Dan Scott [Thu, 23 Jan 2014 18:51:30 +0000 (13:51 -0500)]
KPAC library page: give the kids some style

Just the bare minimum: some padding around the body, and a font colour and size
that's reasonably consistent with the rest of the look of the KPAC for h2 and
h3 elements.

Yes, I know there is text-transform:uppercase and h2 is sized at 48px but that
seems to be used for "You saved it!" and "Get it!" banner things. On the
library info page, we're using headings for headings.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoClean up the breadcrumb trail in the KPAC
Dan Scott [Thu, 23 Jan 2014 17:10:50 +0000 (12:10 -0500)]
Clean up the breadcrumb trail in the KPAC

Links to the library pages don't maintain GET context, so we can't feed search
or "Get It" links in the breadcrumb trail, currently. We can revisit this,
of course.

Wasn't there some fairy tale about kids and a breadcrumb trail... once upon a
time?

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoKPAC root, OPAC root: we all live under one root
Dan Scott [Thu, 23 Jan 2014 17:05:20 +0000 (12:05 -0500)]
KPAC root, OPAC root: we all live under one root

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoBegin enabling KPAC-branded library info page
Dan Scott [Thu, 23 Jan 2014 16:41:52 +0000 (11:41 -0500)]
Begin enabling KPAC-branded library info page

This needs work and is going to get squashed like a bug when we're through.

Yeesh.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoKPAC: Won't somebody think of the children's record details?
Dan Scott [Thu, 23 Jan 2014 14:10:59 +0000 (09:10 -0500)]
KPAC: Won't somebody think of the children's record details?

Factor out the library name link logic into a separate template that can be
included by TPAC search results, TPAC record details, and KPAC record details.

Notice along the way that the KPAC is devoid of copy-level structured data,
but save that for later.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoTPAC: Link library in results page to library page
Dan Scott [Wed, 22 Jan 2014 15:12:37 +0000 (10:12 -0500)]
TPAC: Link library in results page to library page

Dan Wells noticed that the links on results pages went to a different location
(potentially, depending on the "prefer external library uri" OUS) than the
links on record pages. Make things consistent.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoForward port 2.5.2 upgrade script
Dan Wells [Thu, 23 Jan 2014 15:04:01 +0000 (10:04 -0500)]
Forward port 2.5.2 upgrade script

Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoTranslation updates - newpot
Dan Wells [Wed, 22 Jan 2014 21:40:36 +0000 (16:40 -0500)]
Translation updates - newpot

Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoTranslation updates - po files
Dan Wells [Wed, 22 Jan 2014 21:24:32 +0000 (16:24 -0500)]
Translation updates - po files

Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoStamping 0854: data.min_max_prices
Jeff Godin [Wed, 22 Jan 2014 14:56:34 +0000 (09:56 -0500)]
Stamping 0854: data.min_max_prices

Stamping 0854 and resolving permission ID conflicts due to drift.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoRelease notes for lp1207903: new lost billing min/max setting
Remington Steed [Tue, 24 Sep 2013 20:54:37 +0000 (16:54 -0400)]
Release notes for lp1207903: new lost billing min/max setting

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoAdd new option for max/min lost item pricing
Dan Wells [Fri, 14 Dec 2012 19:02:22 +0000 (14:02 -0500)]
Add new option for max/min lost item pricing

In addition to a 'default' price when price is missing or zero,
we can also accommodate a range of prices by saying it should be
at least 'X' and not more than 'Y'.  This also allows you to
effectively set a fixed price for all lost items by setting min
and max to an equal amount.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
10 years agoLP#842991 Reports needs to error when deleting fails
Remington Steed [Wed, 27 Nov 2013 14:55:35 +0000 (09:55 -0500)]
LP#842991 Reports needs to error when deleting fails

When attempting to delete a report template, the reports interface
incorrectly shows "Action Succeeded" even when it partly fails. If the
user performing the delete does not own all the dependent reports and
outputs, then the perl function returns 1 to indicate that some were
deleted, but not all. However, the javascript that calls that function
does not check for a return value of 1. This commit adds that check, and
also improves the formatting of the related error messages.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoSerials: improve routing slips per Dan Wells' suggestions on LP #1229349
Lebbeous Fogle-Weekley [Mon, 28 Oct 2013 18:28:37 +0000 (14:28 -0400)]
Serials: improve routing slips per Dan Wells' suggestions on LP #1229349

  - Don't repeat the same address for the same user
  - Label mailing vs. billing
  - Border to separate mailing and billing addresses
  - [Also] move some inline styles to a CSS file

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
10 years agoStamping 0853: 'Prefer external URL' OUS
Dan Wells [Tue, 21 Jan 2014 20:07:29 +0000 (15:07 -0500)]
Stamping 0853: 'Prefer external URL' OUS

Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoRelease notes for the TPAC library web pages
Dan Scott [Wed, 15 Jan 2014 03:12:16 +0000 (22:12 -0500)]
Release notes for the TPAC library web pages

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoAdd upgrade script for lib.prefer_external_url OUS
Dan Scott [Wed, 15 Jan 2014 02:33:34 +0000 (21:33 -0500)]
Add upgrade script for lib.prefer_external_url OUS

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoCopy details link to Evergreen library page by default
Dan Scott [Mon, 6 Jan 2014 19:33:04 +0000 (14:33 -0500)]
Copy details link to Evergreen library page by default

Add a new library setting, 'lib.prefer_external_url', to force library names in
copy details pages to link to their associated 'lib.info_url' setting rather
than the Evergreen-generated page. In the absence of a 'lib.info_url' setting,
the name will fall back to being linked to the Evergreen-generated page.

Per discussion with Ben Shum and Kathy Lussier.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoImprove label for library's external web site
Dan Scott [Mon, 6 Jan 2014 18:59:50 +0000 (13:59 -0500)]
Improve label for library's external web site

Normal humans will find "Library web site" more meaningful than "External web
site"; thanks to Kathy Lussier for the suggestion!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years ago%l instead of %H if we're using AM/PM for default time formats
Dan Scott [Mon, 6 Jan 2014 18:19:17 +0000 (13:19 -0500)]
%l instead of %H if we're using AM/PM for default time formats

Thanks again to the indefatiguable Ben Shum for this catch!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoUse the 'format.time' OUS to format library hours
Dan Scott [Mon, 6 Jan 2014 17:22:28 +0000 (12:22 -0500)]
Use the 'format.time' OUS to format library hours

Sparked by a concern that Ben Shum had over the display of library hours in 24
hour format, I eventually figured out that we could use the Template::Toolkit
Date module to format the times according to library preferences. And given
that we already have a format.time OUS, let's use it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoTPAC Library schema info - add some caching
Dan Scott [Mon, 28 Oct 2013 15:26:55 +0000 (11:26 -0400)]
TPAC Library schema info - add some caching

Rather than hitting the database every time, cache our requests for a
period of time. It's unlikely that hours of operation or addresses are
going to change very often...

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoLink from copies to library info page
Dan Scott [Tue, 17 Dec 2013 21:29:35 +0000 (16:29 -0500)]
Link from copies to library info page

In the absence of a specific lib.info_url org unit setting, link to the library
info page.

If we _do_ have a lib.info_url org unit setting, link from the library info
page to to the external web site.

Rather than wrapping everything in the table cell as the seller, focus
on the <a> and give it an explicit Library typeof attribute; then we can
offer up the name of the library as the name attribute, should the
crawler be too lazy to follow the link.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoFirst inklings of schema.org support for library pages
Dan Scott [Sat, 26 Oct 2013 21:32:22 +0000 (17:32 -0400)]
First inklings of schema.org support for library pages

Adds a TPAC page where the information for a given library can be publicly
exposed; in addition, that information is marked up with schema.org structured
data so that, for example, a search engine can offer up the hours of operation
and contact information for a given branch right on the search results page.

We give the content-wrapper a main-content for indentation, to be consistent
with other pages in the TPAC.

We also add the cargo-cult common-full-pad div for a bottom margin.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoFixed title/author display at checkout for non-pre-cat items.
Steven Callender [Thu, 10 Oct 2013 20:09:06 +0000 (16:09 -0400)]
Fixed title/author display at checkout for non-pre-cat items.

Fixed a display problem on checkout where items that were formely pre-cats
were still displaying the pre-cat data. Now it will make sure the item is
still a pre-cat before using the dummy data.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoLP969312: No warning for Delete All from Catalog in Copy Buckets
Pasi Kallinen [Tue, 28 May 2013 17:18:06 +0000 (20:18 +0300)]
LP969312: No warning for Delete All from Catalog in Copy Buckets

Add a confirmation dialog popup.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoTPAC: Display authors using inline-block
Dan Scott [Thu, 16 Jan 2014 03:33:25 +0000 (22:33 -0500)]
TPAC: Display authors using inline-block

Rather than letting author credits wrap willy-nilly, use inline-block mode so
that each line will begin with a new author. Devices with constrained screens
in particular benefit from this, as the list of authors is much easier to scan,
and wider screens can still fit multiple authors on a single line.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoTPAC: Use indexed subfields only in author search links
Dan Scott [Wed, 15 Jan 2014 20:25:02 +0000 (15:25 -0500)]
TPAC: Use indexed subfields only in author search links

Addresses LP# 1267231 in which we found that the titles of works in the added
author field (such as subfield t) were showing up in the link ahead of the
author's birth and death date (if applicable). Now we reserve the link for
only the indexed author subfields (depends on whether the name is personal,
corporate, or conference, but generally subfields a/b/c/d/e/n/q), then the
extra subfields go after the name + dates, then we finally put the relationship
into the parentheses after everything else.

We also simplify the markup so that each name is contained in a single <span
class="rdetail_author_div"> element to make it easier to control the layout.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoSerials: Batch Receive interface Copy Location widget was inert
Lebbeous Fogle-Weekley [Thu, 14 Nov 2013 20:59:55 +0000 (15:59 -0500)]
Serials: Batch Receive interface Copy Location widget was inert

Choosing a value from the Copy Location widget wasn't working.  You'd
get a default copy location (or the one supplied by the Receive Unit
Copy Template) no matter what you set that control too.

This is fixed.  One does not read from XUL menulist element by using its
'value' property.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
10 years agoLP#882586: In Serial Control View, show copy templates owned by ancestors
Lebbeous Fogle-Weekley [Wed, 15 Jan 2014 22:53:25 +0000 (17:53 -0500)]
LP#882586: In Serial Control View, show copy templates owned by ancestors

When creating/editing distributions, dropdowns for Receive Unit Template
and Bind Unit Template now show copy templates owned not only at the
distribution's holding lib, but at any of the holding lib's ancestors.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoPull forward previous upgrade scripts
Mike Rylander [Mon, 20 Jan 2014 16:17:29 +0000 (11:17 -0500)]
Pull forward previous upgrade scripts

Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoCreate 008 - take only the first field/subfield combo
Dan Scott [Mon, 20 Jan 2014 03:24:07 +0000 (22:24 -0500)]
Create 008 - take only the first field/subfield combo

In the event that there were multiple $a subfields in, say, 044, the create 008
function could spew raw XML into the 008 field. Avoid that by taking the primary
instance.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAllow generating fixed data in control field 008 quickly user/dbs/008ism
Pasi Kallinen [Thu, 18 Jul 2013 18:00:31 +0000 (21:00 +0300)]
Allow generating fixed data in control field 008 quickly

Language and country codes come from 041a and 044a,
Date1 comes from 260c, and the record date is set to current day.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Conflicts:
Open-ILS/xul/staff_client/server/cat/marcedit.js

10 years agoLP#1235474: fix failure of authority browse context menu to render
Galen Charlton [Fri, 4 Oct 2013 21:44:56 +0000 (14:44 -0700)]
LP#1235474: fix failure of authority browse context menu to render

This patch fixes a situation where if an authority record that would
be brought up by the authority browse context menu in the MARC editor
lacks an 003 field, the context menu would not be rendered all, meaning
that the default context menu (e.g., cut/copy/paste/etc.) would be
displayed instead.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoNew live test for fetching and update bre/MARC data
Bill Erickson [Thu, 10 Oct 2013 20:05:57 +0000 (16:05 -0400)]
New live test for fetching and update bre/MARC data

Fetch a record, test the title, add a new subfield, update the record,
and test that the new subfield survived the update.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoMove hard-coded style out of the copy status layout.
Pasi Kallinen [Tue, 18 Jun 2013 06:01:30 +0000 (09:01 +0300)]
Move hard-coded style out of the copy status layout.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLP104785: Selfcheck needs to be run with HTTPS
Elliot Voris [Mon, 9 Dec 2013 18:57:20 +0000 (12:57 -0600)]
LP104785: Selfcheck needs to be run with HTTPS

Redirect attempts to connect to the self-check via HTTP to the more secure
HTTPS instead. Addresses this bug reported in launchpad:
https://bugs.launchpad.net/evergreen/+bug/1047485

Based on work for Apache 2.2 by Michael Peters <mrpeters@library.in.gov>,
updated and applied to 2.4 by Elliot Voris.

Signed-off-by: Elliot Voris <evoris@slcconline.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoMore explicit database configuration instructions
Dan Scott [Sun, 19 Jan 2014 18:52:20 +0000 (13:52 -0500)]
More explicit database configuration instructions

These README tweaks should help new folk install Evergreen with
a few less hurdles.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoFedora: Net::SSLeay 1.55 is too new for Net::HTTPS::Any
Dan Scott [Sun, 19 Jan 2014 16:30:57 +0000 (11:30 -0500)]
Fedora: Net::SSLeay 1.55 is too new for Net::HTTPS::Any

Although Net::HTTPS:Any wants Net:SSLeay 1.30 or later, 1.55 is apparently too
late, or something. The alternative is Crypt::SSLeay, which seems to work, so
let's go with that.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLP#1269884 repair MVR id / doc_id thinko
Bill Erickson [Thu, 16 Jan 2014 18:03:34 +0000 (13:03 -0500)]
LP#1269884 repair MVR id / doc_id thinko

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoReplace deprecated javascript escape() with encodeURIComponent()
Pasi Kallinen [Fri, 28 Jun 2013 05:47:11 +0000 (08:47 +0300)]
Replace deprecated javascript escape() with encodeURIComponent()

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Conflicts:
Open-ILS/xul/staff_client/chrome/content/auth/controller.js
Open-ILS/xul/staff_client/chrome/content/util/error.js
Open-ILS/xul/staff_client/chrome/content/util/print.js
Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js
Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAnd renaming the test
Mike Rylander [Thu, 16 Jan 2014 20:46:41 +0000 (15:46 -0500)]
And renaming the test

Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoRenumbering the test
Mike Rylander [Thu, 16 Jan 2014 20:44:58 +0000 (15:44 -0500)]
Renumbering the test

Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoRenumbering the upgrade script
Mike Rylander [Thu, 16 Jan 2014 20:44:48 +0000 (15:44 -0500)]
Renumbering the upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoTest for Mike's proximity adjustment fix two commits back
Lebbeous Fogle-Weekley [Thu, 16 Jan 2014 19:59:25 +0000 (14:59 -0500)]
Test for Mike's proximity adjustment fix two commits back

Being placed in Open-ILS/src/sql/Pg/live_t, the test requires stock and
Concerto data be loaded.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoUpgrade script
Mike Rylander [Thu, 16 Jan 2014 19:11:34 +0000 (14:11 -0500)]
Upgrade script

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoFix proximity adjustment calculator
Mike Rylander [Thu, 16 Jan 2014 18:58:12 +0000 (13:58 -0500)]
Fix proximity adjustment calculator

The canonical use case for proximity adjustment is to use it broadly
to effect the local proximity of items within a particular area, in
a like manner, across many parts of the org tree.  However, in cases
where it is lightly used, or used with non-overlapping criteria columns,
there are cases where the adjustment will spread beyond its intended
range of influence.

The changes here create a much stricter and correct test for rule
matching, which will end in the correct choice of rules in all cases.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agomake_release cleanup and options
Bill Erickson [Wed, 18 Dec 2013 18:31:18 +0000 (13:31 -0500)]
make_release cleanup and options

* Avoid packaging the XULRunner packages within the Evergree tarball

* Skip the inline SQL upgrade script edit step by default; continue
  supporting option inline editing with a new -r option.

* New -i option forces the script to bypass the lengthy i18n process,
  which is primarily useful for quickly testing changes to this script.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoIn prereq installer, don't try to chown extracted files to original UID/GID
Lebbeous Fogle-Weekley [Tue, 14 Jan 2014 22:11:45 +0000 (17:11 -0500)]
In prereq installer, don't try to chown extracted files to original UID/GID

As this Makefile is designed to be used by a make process running as
root, this will avoid problems on some systems when tar extracts
files and tries to give them the same UID/GID as they have in their
archives, but those accounts don't exist on the local system.

e.g, libdbi has files set 1000/1000. On most systems, there's a user
and a group with these IDs, but there can be systems where nothing
uses those IDs, and where tar fails with e.g. 'tar: libdbi-0.8.3:
Cannot change ownership to uid 1000, gid 1000: Invalid argument'

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoLP#1234201: fix menu item to display patron requests (if summary is horizontal)
Galen Charlton [Tue, 14 Jan 2014 18:30:48 +0000 (13:30 -0500)]
LP#1234201: fix menu item to display patron requests (if summary is horizontal)

This patch adds a missing command element to the horizontal
patron summary display so that the 'Acquisition Requests' menu
item will work.

To test:

[1] Set the Patron circulation summary is horizontal library setting
    to true.
[2] Retrieve a patron and try using the Acquisition Requests menu
    item.  It will do nothing.
[3] Apply the patch and clear cache in the staff client.
[4] Repeat step 2.  This time, the Acquisitions Request menu item
    should bring up the list of the patron's requests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Srey Seng <sreyseng@gmail.com>
10 years agoStamping 0851 - changes for Encode.pm 2.54+
Dan Wells [Tue, 14 Jan 2014 19:59:56 +0000 (14:59 -0500)]
Stamping 0851 - changes for Encode.pm 2.54+

Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoUpgrade file for Encode.pm 2.54+ changes
Dan Wells [Tue, 14 Jan 2014 19:12:53 +0000 (14:12 -0500)]
Upgrade file for Encode.pm 2.54+ changes

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
10 years agoAdd pgTAP test for normalized MARC records
Dan Scott [Fri, 25 Oct 2013 17:54:35 +0000 (13:54 -0400)]
Add pgTAP test for normalized MARC records

Specifically, we're concerned about ensuring that any changes related to
the fix for Encode (requiring the removal of the effectively useless but
now erroring decode_utf8()) do not inadvertently change the content of
the MARC records on ingest. Because we wouldn't want to have to reingest
everything to normalize search, etc.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
10 years agoTest Perl Unicode normalization process
Dan Scott [Thu, 24 Oct 2013 21:44:00 +0000 (17:44 -0400)]
Test Perl Unicode normalization process

Add some basic tests of our Unicode normalization (and entityization)
process.

Also, 'use utf8;' tells the script that it contains UTF8 characters,
not binary bytes, and resolves a test problem.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEncode.pm change to the UTF8 flag
Dan Scott [Mon, 21 Oct 2013 15:58:06 +0000 (11:58 -0400)]
Encode.pm change to the UTF8 flag

In the past, decode_utf8() silently ignored attempts to decode data
with the UTF8 flag on. However, Encode.pm changed around 2.53 and
resulted in wide-character errors preventing the likes of
--load-all-sample from working.

Since our data should already be UTF8 when it hits these functions, we
should not be trying to decode it in the first place.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLP#1269042: prevent acq seach from building dropdown of every copy ID in the DB
Galen Charlton [Tue, 14 Jan 2014 16:00:38 +0000 (11:00 -0500)]
LP#1269042: prevent acq seach from building dropdown of every copy ID in the DB

This patch ensures that if a user sets a search field in the
acquisitions general search form to the line item details copy ID
(labeled "LID - Evergreen Copy ID"), the form presents a normal
input widget rather than trying to build a drop-down containing
every copy ID in the database.  Except for very small databases,
the previous behavior would mean that an open-ils.pcrud backend
would eventually consume a great deal of memory trying to service
a request for all copies in the system.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
10 years agoTreat empty username as invalid in user editor
Jeff Godin [Wed, 30 Oct 2013 19:29:24 +0000 (15:29 -0400)]
Treat empty username as invalid in user editor

There seems to be undesired interaction between the required
attribute and the isValid method on a dojo/dijit ValidationTextBox.
If both are set, isValid needs to check for an empty value,
otherwise the field is considered valid the moment it gains focus.

We don't want an empty username to be considered valid, because we
know that we will be unable to save the user.

We can work around this by teaching the isValid function to consider
an empty value as invalid.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Melissa Ceraso <mceraso@biblio.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoFedora needs Locale::Maketext::Lexicon too user/csharp/fedora_maketext_signoff
Dan Scott [Thu, 9 Jan 2014 17:19:38 +0000 (12:19 -0500)]
Fedora needs Locale::Maketext::Lexicon too

Per commit 66c45b647, install Locale::Maketext::Lexicon on Fedora to satisfy
that dependency. How did _this_ one slip by so long! Thank heavens for
tests.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
10 years agoLP#1267224: repair another fm_IDL.xml typo
Galen Charlton [Thu, 9 Jan 2014 17:05:55 +0000 (12:05 -0500)]
LP#1267224: repair another fm_IDL.xml typo

vam.eg_record points to authority.record_entry, not
biblio.record_entry.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoLP#1267224: Repair IDL typo for vandelay authority match / rec link
Bill Erickson [Wed, 8 Jan 2014 19:35:05 +0000 (14:35 -0500)]
LP#1267224: Repair IDL typo for vandelay authority match / rec link

"vqbr" should be "vqar" for authority records.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Yamil Suarez <yamil@yamil.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoTests: Ensure TT2 templates parse cleanly
Dan Scott [Sat, 13 Oct 2012 05:23:35 +0000 (01:23 -0400)]
Tests: Ensure TT2 templates parse cleanly

File::Find and Test::Output make it easy to check for any stderr
returned from the TT2 extractor.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoLP1038240 - Patron editor field documentation does not display text
Kyle Tomita [Tue, 24 Sep 2013 16:55:02 +0000 (09:55 -0700)]
LP1038240 - Patron editor field documentation does not display text

Changed the legend tag to have a closing tag.
Also modified the css id uedit-help-div, to add a top margin so
it does not overlap the save div.

Signed-off-by: Kyle Tomita <tomitakyle@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoRepair the live_t regression tests
Dan Scott [Thu, 9 Jan 2014 03:39:57 +0000 (22:39 -0500)]
Repair the live_t regression tests

When we added more realistic hours of operation for some of the branches,
several of the live_t regression tests failed because they depended on the
default hours of operation for BR4. Rather than change the regression test,
just switch BR4 back to the default hours of operation and use BR1 as the
closed-on-weekends branch instead.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agoLP#1266937: Fix missing/incorrect regex for authority in Vandelay.pm
Srey Seng [Tue, 7 Jan 2014 22:30:49 +0000 (14:30 -0800)]
LP#1266937: Fix missing/incorrect regex for authority in Vandelay.pm

Add in missing "~" in function import_record_list_impl when
type is authority records. Also replace "auth" with "authority"
so that the generated values match up with functions in the
database.

Signed-off-by: Srey Seng <sreyseng@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
10 years agofix pub date data type in reporter.classic_item_list
Chris Sharp [Wed, 8 Jan 2014 19:51:59 +0000 (14:51 -0500)]
fix pub date data type in reporter.classic_item_list

As noticed by Ben Shum in IRC, reporter.classic_item_list
had pub_date, a free text field, classified as "int". This
changes that to "text" to prevent errors.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoFix bug that caused deleted holdings to be visible in SRU/Z39.50 results
Jeff Davis [Wed, 8 Jan 2014 21:21:13 +0000 (13:21 -0800)]
Fix bug that caused deleted holdings to be visible in SRU/Z39.50 results

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoTPAC: Add Notes label to that row in small-screen My Account->Holds
Lebbeous Fogle-Weekley [Mon, 6 Jan 2014 16:44:56 +0000 (11:44 -0500)]
TPAC: Add Notes label to that row in small-screen My Account->Holds

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoTPAC: Display public hold notes in user holds list
Dan Scott [Mon, 30 Dec 2013 06:47:19 +0000 (01:47 -0500)]
TPAC: Display public hold notes in user holds list

If a given hold has a note marked as public, and not marked for staff, then
display the note in the My Account -> Holds list. This enhancement also
includes sample notes for each hold, to include data that ensures that the TPAC
does not display any hold notes that are not marked public, or which are marked
for staff.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
10 years agoTPAC: Get rid of all unneccessary uppercase and some bold
Lebbeous Fogle-Weekley [Mon, 6 Jan 2014 16:27:57 +0000 (11:27 -0500)]
TPAC: Get rid of all unneccessary uppercase and some bold

This gets rid of all places in the TPAC where CSS uses text-transform:
uppercase or capitalize.  The former is bad for readability, and the
latter can only confuse users when strings might appear to be
capitalized differently in one context than another (esp. users'
personal names).

This mostly, but not exclusively, affects the My Account section.
Also, one wholly unused CSS class was removed altogether.

It also gets rid of some bold style that was applied too liberally to
the whole contents of tables.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoMake sample phone numbers "(xxx) xxx-xxxx" format
Dan Scott [Mon, 6 Jan 2014 16:07:17 +0000 (11:07 -0500)]
Make sample phone numbers "(xxx) xxx-xxxx" format

The extra hyphen between the closing parenthesis and the 4th digit was just
plain weird. Thanks to Ben Shum for mentioning this in IRC!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoSample library external URLs, phone numbers, and emails
Dan Scott [Tue, 17 Dec 2013 18:05:43 +0000 (13:05 -0500)]
Sample library external URLs, phone numbers, and emails

Supply reasonable URLs and contact information for the branches.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAdd sample library addresses and hours of operation
Dan Scott [Tue, 17 Dec 2013 17:02:56 +0000 (12:02 -0500)]
Add sample library addresses and hours of operation

Provide branch-level granularity of addresses and hours of operation, using
different addresses in some cases for mailing vs. billing vs. ILL vs. holds for
more realism.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoMove default actor.org_unit entries into sample data
Dan Scott [Tue, 17 Dec 2013 15:16:32 +0000 (10:16 -0500)]
Move default actor.org_unit entries into sample data

The only actor.org_unit entry we absolutely require in the sample data is the
consortium, as many things are owned by it. Otherwise, we should treat the
libraries and associated settings such as addresses as sample data.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoStamping 0850 - translate icon labels
Ben Shum [Wed, 18 Dec 2013 18:36:39 +0000 (13:36 -0500)]
Stamping 0850 - translate icon labels

Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoTranslate the icon labels in TPAC
Thomas Berezansky [Tue, 10 Dec 2013 18:54:40 +0000 (13:54 -0500)]
Translate the icon labels in TPAC

Instead of just using English.

Also, in the event we have a search_label, use it.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoDocs: bug fixes in new files
Remington Steed [Tue, 17 Dec 2013 16:17:25 +0000 (11:17 -0500)]
Docs: bug fixes in new files

This commit fixes a small bug in the new Action Triggers chapter and a
few small formatting bugs in the new subsection in the Holds Management
chapter. It also fixes a small wording typo in the Holds Management intro.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
10 years agoStamping 0849 - desk renewal description
Ben Shum [Tue, 17 Dec 2013 19:59:44 +0000 (14:59 -0500)]
Stamping 0849 - desk renewal description

Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoUpdated the label on the desk renewal global setting.
Steven Callender [Thu, 12 Dec 2013 20:13:57 +0000 (15:13 -0500)]
Updated the label on the desk renewal global setting.

Updated the label on the desk renewal global flag circ.desk_renewal.use_original_circ_lib
to properly explain the it's the workstation library that will not be used rather than the
user home library. The OPAC renewal uses the users home library and desk renewals use
the workstation library.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoBreak out of focus() in cat/z3950.js if obj.active_services is undefined.
Jason Stephenson [Wed, 11 Dec 2013 15:05:18 +0000 (10:05 -0500)]
Break out of focus() in cat/z3950.js if obj.active_services is undefined.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoEliminate an annoying and useless warning in the JavaScript Console.
Jason Stephenson [Wed, 11 Dec 2013 14:50:09 +0000 (09:50 -0500)]
Eliminate an annoying and useless warning in the JavaScript Console.

Timestamp: 12/10/2013 02:52:51 PM
Warning: Empty string passed to getElementById().
Source File: oils://remote/xul/rel_3_0_20131206_120120/server/OpenILS/global_util.js
Line: 354

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
10 years agoAsciidoc fix
Angela Kilsdonk [Tue, 17 Dec 2013 16:37:23 +0000 (11:37 -0500)]
Asciidoc fix

Another asciidoc fix for 2.5 documentation:
-Disable patron credit.

Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com>
10 years agoDocumentation for 2.5
Angela Kilsdonk [Tue, 17 Dec 2013 16:22:41 +0000 (11:22 -0500)]
Documentation for 2.5

asciidoc fixes for:
-Disable Patron Credit
-Lost and Long Overdue Colors
-PV Supa Goodstuff Integration

Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com>