Ben Shum [Thu, 31 Jan 2013 17:20:20 +0000 (12:20 -0500)]
LP1071505 - Add 264 RDA tag to reporter views
Some reports draw from reporter.materialized_simple_record table and these
were not made aware of the new 264 tag which contains publisher related
information.
Change the view for reporter.old_super_simple_record, which feeds into the
other reporter table.
The included upgrade SQL will update this view and then update the table using
the new view.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Ben Shum [Wed, 10 Oct 2012 21:00:54 +0000 (17:00 -0400)]
LP1071505 - Add 264 RDA tag to TPAC pubinfo display
Prior to this, TPAC only retrieved the 260 tag for publication info. Allow for
the possibility that the 264 tag might exist and contain relevant information.
Special note: the 264 tag must have a second indicator value of 1 to be meant
for publication statement.
Also, this only picks out the first 260 or 264 tags in any given bib record.
Approach inspired by Dan Scott's approach taken for finding edition statements.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mike Rylander [Fri, 19 Apr 2013 20:14:13 +0000 (16:14 -0400)]
Correct subfield format for authority lookup
The Authority Control Set code expects the format of subfields
that it will be used to build a MARC.Field object to be of the
form: [[code,value],...] This commit makes that true.
Additionally, dojo.filter over a list of lists can cause the
nested array set to be flattened. So, instead, we loop directly.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Thu, 16 May 2013 13:11:50 +0000 (09:11 -0400)]
Repair faulty MARC editor authority validation
Repair how the JS inspects the results of
open-ils.search.authority.simple_heading.from_xml.batch.atomic, which is
used to look up matches for authority validation. It returns a more
complex structure in the brave new world of authority control sets.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Dan Scott [Tue, 29 Jan 2013 16:04:33 +0000 (11:04 -0500)]
Apply all 2.2 upgrades prior to running 2.3.0 upgrade
If users are expected to run all of the 2.2 upgrade scripts, then let's
make it easy for them. As PostgreSQL 9.1 does not include the \ir
"include relative path" command, we have to pause at the beginning of
the upgrade process to ensure that the user is running the script from
the right directory.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Ben Shum [Mon, 13 May 2013 18:19:06 +0000 (14:19 -0400)]
LP1179614 - fix Export All Records action
In the record buckets, the button for 'Export All Records' would work up
to the point where you chose where to save the file. After clicking where
to save, it would not show any saved files or prompts indicating it completed
the export process.
This fix changes the location of where to find the export tool and properly
exports the bibs as the file format selected.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Serials: MFHD::get_compressed_holdings() can reach infinite loop
Even controlled serials holdings involve the internal creation of MFHD
fields, upon which caculations are performed for such purposes as the
display of holdings summaries in the OPAC.
There are too many ways that incorrect MFHD (or MFHD that our code just
can't yet handle) can lead our MFHD routines to crash. We can't address
all these possibilities in a single bug fix. But we can avoid this
infinite loop.
A subroutine within open-ils.serial (_summarize_contents()) relies on
MFHD::get_compressed_holdings(). When the latter went into an infinite
loop the result would be an open-il.serial drone process consuming CPU
time indefinitely and, depending on the data that provoked the loop,
potentially writing repeating messages to stderr indefinitely.
End users will still see the item receiving fail in these cases, and be
obliged to work around the issue as before until more robust
holdings summarization code can be written, but at least the overall
condition of the running Evergreen system won't be affected, and there
will be better information in the error logs.
Bill Erickson [Fri, 29 Mar 2013 13:41:44 +0000 (09:41 -0400)]
LP1076411 Return updated circ object from checkin
Retrieve an updated copy of the circulation object to return to the
caller during checkin. This ensures the data in the circ object, in
particular date fields, are consistent with the database.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Remington Steed [Thu, 14 Mar 2013 18:37:17 +0000 (14:37 -0400)]
Add accepting_usr to IDL to fix reporter field
In the reporter interface, the view 'Payments: Brick-and-mortar' is
missing the 'Accepting User' field, which is present in the similar view
'Payments: Desk'. This field is already present in the database view and
is simply missing from the IDL. Since it is needed for certain kinds of
reports, this commit adds the missing IDL fields. It also adds the
missing 'reporter:datatype' to an existing instance of the IDL field.
Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Ben Shum <bshum@biblio.org>
Acq: re-use more code for two ways of creating invoices (EDI and manual)
This solves two problems.
1) With EDI invoices, we had been failing to disencumber fund debits
related to the invoiced lineitems, although that worked for manual
invoices.
2) With manual invoices, we would not automatically uncancel copies
when the user decided to invoice them despite their canceled status.
This was already working in EDI invoices though. This is especially
important since our schema lumps "backordered" in with "canceled,"
and in theory backordered things do show up eventually.
There were earlier version of this commit out there with bugs that
prevented the EDI workflow from working correctly (the manual invoice
flow worked and still should).
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jason Stephenson [Thu, 18 Apr 2013 14:49:06 +0000 (10:49 -0400)]
Minor change to chrome/content/util/list.js.
Change the initializer of this.count_for_display from 0 to 1 in
order to match the counting of other lists in the client and to
provide something that staff are likely to prefer.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
In list.js at start you create obj.columns for lineno, but later
you don`t process this value so it`s return default render
function. This code repairs this.
Signed-off-by: Dmitry Nechai <nechai.dmitry@gmail.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Mike Rylander [Fri, 5 Apr 2013 05:52:16 +0000 (01:52 -0400)]
Address SQL injection vulnerability in SQL ORM layer
If the user-supplied value and the db column are both numbers
(jsonObject->type == JSON_NUMBER, get_primitive(field) == "number") then
don't quote. Otherwise, quote.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Tue, 9 Apr 2013 17:45:24 +0000 (13:45 -0400)]
TPAC bucket item retrieval operates in streaming mode
TPAC bucket item retreive fleshes bib records with large blobs of MARC
data. When a bucket contains a few thousand items, the size of the
data passed around in atomic retreival mode will exceed the typical jabber
max stanza size and result in a failure. Retrieve the records in
streaming mode instead.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Steven Callender [Fri, 15 Jun 2012 17:27:33 +0000 (13:27 -0400)]
Avoid problems when auth recs are missing the 901c
Fixed the authority.normalize_heading function to better handle
INT's when there is no 901 present. Now we look for the best-fit
control set instead of throwing a db-level error.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Fri, 29 Mar 2013 17:36:17 +0000 (13:36 -0400)]
LP 1126545 repair staff 'return to results' tpac link
Strip the extra "/" from the URL created by the "return to results"
button in the staff client TPAC view. Havin the extra "/" in place
prevents the next/previous links from functioning.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Fri, 15 Mar 2013 18:47:53 +0000 (14:47 -0400)]
Allow access to public hold notes via hold "blob"
If a hold note is marked as "public", it seems reasonable that it
should be visible to anyone who can see that hold, regardless of
who created the note.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Kyle Tomita <ktomita@catalystitservices.com>
Dan Wells [Fri, 15 Mar 2013 18:42:24 +0000 (14:42 -0400)]
Fix reversed logic for hold "blob" notes
Hold notes (at least at the data level) allow for both staff and
"private" notes to be attached. This code intended to show "private"
notes to the hold owner and staff notes to staff, but had the logic
reversed.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Kyle Tomita <ktomita@catalystitservices.com>
Bill Erickson [Mon, 25 Mar 2013 19:19:14 +0000 (15:19 -0400)]
tpac : honor page locale in record detail copy grid
The query used to load the record detail copy grid now uses the same
locale value set as the default for all cstore-editor calls. This
solves the issue where copy location names, statuses, etc. are not
properly translated.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Fri, 22 Mar 2013 14:40:59 +0000 (10:40 -0400)]
More authority fixed-field cleanup
Even with the efforts by many to add and harmonize the authority fixed-field
setup, and maintain functionality, there were some missing bits. This commit
should take care of those by realigning the remaining field names and allwowing
those fields to be saved properly.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Changed the way authority tags were being pulled to specifically use an aggregate array.
There appears to have been a change in postgres at some point between 9.0 and 9.1
to the aggregate method. Because of this, postgres was not returning the proper
results when pulling tags for authorities. This change will force postgres to do
a proper aggregate array call and return the correct results.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Bill Erickson [Fri, 3 Aug 2012 19:08:51 +0000 (15:08 -0400)]
SIP re-login fetches correct auth session
After a login session expires and the SIP server logs in again to
acquire a new authtoken, be sure to use the new authtoken when fetching
the new session object. Otherwise, the login_session is left undef and
you may see errors like this when checking in items:
Can't call method "ws_ou" on an undefined value at
/usr/local/share/perl/5.10.1/OpenILS/SIP/Transaction/Checkin.pm line 77.
Incidentally, the checkin code is the only code that references
$sip_handler->{login_session}. And the problem listed above only occurs
when the login session expires just prior to a checkin call. In any
other scenario, the login_session would ultimately get repaired.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jeff Godin [Thu, 14 Mar 2013 18:15:28 +0000 (14:15 -0400)]
Fix detection of empty Syndetics AC data elements
Due to a change in how the vendor responds to requests for data
elements which are not present for a requested title, we need to
change how we detect "empty" data elements in the "data_exists"
function.
First, we check for the new "No Data Available" title element, then
we check for the previously-used value of "error".
This change resolves the symptom where the catalog would display
tabs for "Author Notes", "Excerpt", "Table of Contents", on every
record in the catalog, even when clicking each tab would show that
the content was not present / available.
Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Ben Shum [Fri, 22 Feb 2013 05:46:17 +0000 (00:46 -0500)]
LP1054322 - libparent-perl not needed for Ubuntu Precise
The newer version of Perl 5.14 which comes with Ubuntu Precise already
contains the contents of libparent-perl, which is now an obsolete package.
Remove this dependency from the extra debs installed for Debian and Ubuntu
but then add to the extras for Debian Squeeze and create a new extras just
for Ubuntu Lucid so that it continues to be installed on those systems and
not on Ubuntu Precise.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Ben Shum [Thu, 14 Mar 2013 21:40:04 +0000 (17:40 -0400)]
LP1103068 - Show titles and authors for pre-cat items
As noted in LP1103068, TPAC does not currently show anything when viewing a
pre-cataloged item in the my account summary of items checked out.
If the call number is -1 (pre-cat), then show the dummy title and dummy author
values, which fields are hopefully relevant as long as staff were good to put
something meaningful in those during creation of the pre-cat.
Also, wrap the title in a check for attrs.title.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Michael Peters <mpeters@emeralddata.net>
Restore previous behavior to the maintain_901() trigger
function so that bib records that are loaded without
explicitly setting the TCN have it set to the bib ID
when the cat.bib.use_id_for_tcn global flag is set, rather
than 'AUTOGENERATED-xxx'.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Serials: printing routing slips fails with Javascript error
The symptom (an error in the Javascript console about dijit.form.Button
and an empty page for routing slips that you try to print at batch
recieve) may or may not be affected by whether you're in a production
environment with the pre-built dojo 1.3.3 package installed or a
development environment without it.
This simple fix makes the problem go away in any case.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Thu, 28 Feb 2013 20:32:07 +0000 (15:32 -0500)]
Fix holding lib for certain distribution svrs
On a serial virtual record (svr), the holding lib is expected to be
just an ID. In one logic branch, Search/Serial.pm was attaching the
entire aou object, and we should instead attach just the ID of this
object.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Michael Peters [Tue, 12 Mar 2013 20:14:23 +0000 (16:14 -0400)]
LP#1154235 Allow inactive patron barcode to be loaded
This addresses LP#1154235 by modifying the evergreen.get_barcodes
function to allow users to retrieve patrons in barcode retrieve
who have inactive barcodes.
This returns to functionality in versions prior to around 2.2.x
series.
End result is staff receiving an alert that the patron was
accessed with an invalid barcode.
Signed-off-by: Michael Peters <mpeters@emeralddata.net> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Sat, 9 Mar 2013 03:41:08 +0000 (22:41 -0500)]
Show OPAC-invisible copies in TPAC in staff context
We were not calling the staff variation of the copy count method; thus,
the record details template was skipping the copy table in the event
that all copies for a given record were marked as OPAC-invisible via
either copy visibility or shelving location visibility.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Thu, 28 Feb 2013 19:49:16 +0000 (14:49 -0500)]
Don't populate the MFHD menu with distributions
If a distribution has no legacy record, it shouldn't get a menu
entry in the MFHD menus. A magic id of '-1' is used to indicate
this case, so we need to check for that when populating
mfhdDetails via the TPAC.
Also, entryNum must be an int, not a string, because it is
incremented prior to display. Removing the quotes solves this
display issue.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Ben Shum <bshum@biblio.org>
Bill Erickson [Wed, 21 Nov 2012 15:12:39 +0000 (10:12 -0500)]
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>
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>
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>
Galen Charlton [Tue, 5 Feb 2013 18:12:02 +0000 (13:12 -0500)]
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>
Mike Rylander [Mon, 11 Mar 2013 17:40:46 +0000 (13:40 -0400)]
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>
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>
Adam Bowling [Fri, 26 Oct 2012 14:59:54 +0000 (10:59 -0400)]
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>
This patch updates the seed data from the target list at
http://www.loc.gov/z3950/lcserver.html#addr. It also changes the
structure attribute for the 'lccn' search attribute to wordlist,
which means that LCCNs can be searched without having to enter
the leading spaces.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Galen Charlton [Sat, 19 Jan 2013 05:46:32 +0000 (00:46 -0500)]
LP#1086458: clean up after event listeners in circ/patron interface
Upon window unload, now removes event listeners, both ones explicitly
created by the page JavsScript as well as ones created by
util.list, util.controller, and persist_helper().
The same approach of defining cleanup fnctions used by unload
events can be applied to the rest of the staff client, but
this patch focuses on circulation first.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
EventListenerList allows one to maintain a list
of event listeners, then remove them all when it's
time to clean up a window.
Usage is:
var list = new EventListenerList();
// attach an event listener
list.add(node, 'command', function(ev) { alert('BOO!'); }, false);
...
// get rid of them
list.removeAll();
Based on an idea by Jason Etheridge.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Wed, 16 Jan 2013 20:05:17 +0000 (15:05 -0500)]
TPAC: Don't display serial headers without content
Currently, the TPAC serial display code will print a section
header, then see if there is any content to show. This causes
headers to show up when they are unnecessary or unwanted.
Now, we only show the header if we have content needing heading.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>