Add fixed fields missing from previous configuration, namely for MAP and SER record types.  Incoporate previous changes for AUT record types from 1040381.

Signed-off-by: Adam Bowling <adbowling@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
lp1040381: match up Subj and SubjUse fixed labels

Update the labels used in the fixed field editor for
authority records to match OCLC's labels specified at

http://www.oclc.org/support/documentation/worldcat/authorities/authformat/default.htm

This is consistent with commit's e675b854 change to the
OCLC labels, and also fixes a problem where changing the
008/11 and 008/15 was not reflected in the fixed field boxes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Reify required authority fixed field names

Adam (and Art, by way of Adam's patch) added a goodly pile of fixed
field definitions that were lacking previously.  The change in this
commit simply changes the label of two (008/11 and 008/15) to those
in use by other parts of the code.  In particular, internally, we call
the field holding a thesaurus code value "Subj" and use that name during
ingest of authority records.  Therefore, that should not change.  This
required a subsequent change to the label of another, to SubjUse.

I've included a duplication in the backend-only (probably deprecated)
version of this mapping to allow the front-end labels to work.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
LP#1116509: prevent null SVF attribute value from breaking record import

Fix problem where a record could fail to be staged for import
with the following error:

ERROR: query string argument of EXECUTE is null
CONTEXT: PL/pgSQL function "extract_rec_attrs" line 72 at EXECUTE statement
SQL function "extract_rec_attrs" statement 1

This error would be triggered if at least one SVF attribute has a normalization
function defined that is applied to a null value during record import.

Patch is based on a suggestion by Bob Wicksall.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade script for null SVF attribute value fix

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Pulls the Copy Notes for the records, shows in the table, introduces a new style

Signed-off-by: edoceo <code@edoceo.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Remote Account Conify UI

Admin interface for config.remote_account.  To date, remote accounts
have been managed solely as EDI accounts, which have their own
interface.  If one wishes to add/manage non-EDI remote accounts, then
this new UI is needed.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Conflicts:
	Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul

[minor, related to adjacent addition]
Exclude copies that have been deleted from showing up on the browse holds shelf list.

If an item had been deleted while it had a status of On Holds Shelf, it would permanently show up on
the browse holds list. This will exclude deleted copies from the results.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Fix divergence of stock serials schema and upgraded schema

And additionally make a function used in a constraint on
serial.issuance.holding_code a little bit smarter.

These issues were reported to me by Galen Charlton.

The upgrade script included here will set serial.issuance.holding_code
to NULL in cases where the value doesn't validate, but in those cases
there is no part of Evergreen that could have made use of the data
anyway, and the data is just plain bad.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade for serials harmonization

Signed-off-by: Mike Rylander <mrylander@gmail.com>
extract PO name from picklist upload

If a PO name is encoded in a lineitem (via provider attribute
definition), extract that PO name when creating a new purchase order
from lineitems that were previously only linked to a selection list.
This allows staff to create selection lists first, then orders second,
while retaining the encoded purchase order name.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
rank_ou() honors pref-lib in non-global context

When determining how to sort an org unit (e.g. sorting copies by circ
lib for display in the catalog), allow the pref-lib to affect the sort
order in global and non-global searches.

Org units are now sorted with the following criteria in the following
order.  For example, assume we are sorting a copy circ_lib:

1. circ_lib matches the search_lib
2. circ_lib matches pref_lib
3. distance of circ_lib from pref_lib when pref_lib is a child of
   search_lib, if circ_lib is a child of pref_lib.
   (For example, searching CONS with pref_lib SYS1, items at BR1 will
   sort ahead of items at BR3, since BR1 is a child of the pref_lib).
4. proximity of circ_lib to search_lib, when circ_lib is a child of
   search_lib.
5. In all other cases, circ_lib is sorted to the bottom with the rest of
   the riffraff.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Stamping upgrade for relaxing rank_ou sorting

Signed-off-by: Ben Shum <bshum@biblio.org>
unapi exclude_invisible_acn

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
"exclude_invisible_acn" unapi holdings filter

When present in the unapi includes array, this filter ensures that no
call numbers with 0 opac-visible copies are included in the holdings_xml
output.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Show local call number in TPAC My Lists display

If an opac-visible call number exists that is owned by an org unit
relevant to the patron, show the (most relevant) call number label in
the My Lists display for each record in the list.  Call number is
displayed in both saved and temporary lists.

A call number is considered relevant if its owner is one of:

physical location library
preferred library (plib, home, etc.)
search library

This code leverages the new "exclude_invisible_acn" unapi filter to
ensure that we are only required to retrieve 1 call number in the unapi
output instead of an arbitrarily large set of call numbers, against
which we may have to filter non-visible call numbers.

This commit also addresses and outstanding TODO item in the tpac Perl:
Replace the last use of fetch_marc_xml_by_id with get_records_and_facets
and remove fetch_marc_xml_by_id

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
TPAC My List Call-Number Release Notes

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Consistent response type from TPAC pref lib lookup

In some contexts, the $user->home_ou field is fleshed with a real org
unit object.  Ensure that the response value from _get_pref_lib in the
TPAC takes this into consideration when finding the ID of the user's
home org unit.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
tpac avoid more org_unit template var leaks

Avoid using the variable name 'org_unit' in misc_utils (when compiling
copy visibility info) since the value can leak into the org_selector
template, disrupting the rendering of the org selector.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
TPAC my-list call number includes child orgs

For my-list call number display, if the most relevant call number is a
child of any of the context org units (physical/pref/search), it is
considered relevant for purposes of call number display.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>