Michael Peters [Thu, 4 Dec 2014 20:56:53 +0000 (15:56 -0500)]
LP#1361266 Patron self-registration form accepts date of birth in wrong format
This patch applys some basic javascript to validate that a date entered is
at least in ISO 8601 format. This prevents someone from entering "cupcake"
or 55/66/6666 as a valid date of birth by validating the stgu.dob input
at the time of submission.
Signed-off-by: Michael Peters <mpeters@emeralddata.net> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
If no search parameters or invalid search parameters are sent to the
patron search API, the API call exits early with zero results. This
avoids cases where empty searches can lead to heavy DB calls, querying
and sorting he entire patron data set.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
The fix for LP 1484281 broke the 0847.auth_overlay_generator.pg live
test. Since e was removed from the controlled subfield list for the
100 authority tag, it needs to be removed from the expected live test
results.
This commit does that.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Yamil Suarez [Mon, 17 Aug 2015 20:47:34 +0000 (16:47 -0400)]
LP# 1484281 auth control config update to prevent propagated data deletion
Remove subfield 'e' from authority.control_set_authority_field seed values
Removed from the auth tag 100 and 110, which should apply to bib tags
100,110,600,610,700,710
Added upgrade script, and pgTAP test.
How to test this patch
----------------------
[1] To test this bug you need 1 authority record and at least 1 bib record.
The auth record needs to have an auth 100 or 110 tag that has a subfield $e,
for example 100 $aDavis, Miles $ecomposer. (for the record, it is not good
cataloging practice to have $e in the auth record, but it can happen by mistake.)
The bib record needs to be have a matching bib 100 or 700 tag with the same
subfield $a and $e. In addition the matching bib tag has to be linked to the
authority record, i.e. the bib tag has to have a bib subfield $0 with the DB
id of the authority record.
[2] If you open up the authority record, in the authority MARC editor, and remove
the subfield $e; the subfield $e found in the bib record tag will be removed.
This is a mistake because normally bib record tags 100/110/700/710 do use subfield
$e, though the subfield $e should not be used in the auth record 100/110 tags.
[3] When this patch is applied, if a cataloger removes a subfield $e from an auth
100/110 tag, the deletion will not cascade to its linked bibs.
Signed-off-by: Yamil Suarez <yamil@yamil.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Wells [Fri, 14 Aug 2015 19:11:16 +0000 (15:11 -0400)]
LP#1484989 Don't close xacts with checkin-generated fines
If a transaction has checkin-generated fines, and previously had a
balance of zero, the rearranged billing code was prematurely closing
the transaction. This commit separates the closing step to run after
any possible fine generation.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Wed, 15 Apr 2015 16:10:27 +0000 (12:10 -0400)]
LP#1438136: Teach QP to be smart about attribute selectivity
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Expand safe token generation to include user ID in the cached data,
which can be retrieved later for activity logging. Add activity logging
directly to the open-ils.actor.safe_token.home_lib.shortname API.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Tue, 9 Jun 2015 21:59:42 +0000 (17:59 -0400)]
LP#1463590 Loosen read access to distribution formulas
Make it possible for ACQ staff that have the CREATE_PURCHASE_ORDER
permission to view distribution formulas (via PCRUD) , making it
possible to use them from the PO batch update operation.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Scott [Thu, 12 Mar 2015 20:06:16 +0000 (16:06 -0400)]
LP1431541: SRU UTF8 encoding issues
The SuperCat SRU service was encoding MARCXML using an encode_utf8()
call that ended up corrupting non-ASCII characters. In addition, the
HTTP header charset was not being set, meaning that the return header
would default to ISO-8859-1.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Thu, 7 May 2015 20:43:16 +0000 (16:43 -0400)]
LP#1419172 Optimize full_circ_count view to avoid seq scans
As reported by Chris Sharp:
"The reporter.classic_item_list view was modified in bug 1208572 to use
extend_reporter.full_circ_count to provide the use count for each item.
Unfortunately, this change was found to be the cause of consistently
long-running (2+ hours) reports queries in PINES as its query plan on
our PostgreSQL 9.3 server was resulting in sequential scans of both the
circulation and aged_circulation tables."
This commit restructures the view to avoid JOINs, and is in production
at PINES with noted improvement.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Ensure that future backdates are successully ignored in the checkin API.
The logic was in place to do this, but it failed to clear the values,
resulting in using the future backdate anyway.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
LP 1450561: Restore org. unit settings history limit function and trigger
The evergreen.limit_oustl function and the limit_log_oustl trigger on
config.org_unit_setting_type_log were missed in the upgrade scripts
when these were added to the base schema. This commit adds them and a
pgtap test to check that they exist after.
This commit also alters the body of the limit_oustl function to take into
account of the org unit when deleting entries from the log table. This
change allows multiple consortium members to have their own five history
entries. The original code only kept the last five entries of any given
setting across the whole installation.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Dan Wells [Thu, 7 Mar 2013 13:30:02 +0000 (08:30 -0500)]
LP#1112723 Consider copy-level opac_visible flag when ranking
The current unAPI calls consider opac_visibility of the status,
but not the copy itself. If you have a record with copies set to
opac_visible = false, you might see few or no copies in the OPAC
results list, as these invisible copies may be the first five
returned, and they then crowd out the visible copies.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
LP#1478123: fix leak of file descriptors by Apache workers
Apache backends handling TPAC requests and making requests
of the added content handler were not properly closing
their sockets. This patch adds a close() after the shutdown()
to plug the leak.
Jason Stephenson [Thu, 13 Aug 2015 19:22:33 +0000 (15:22 -0400)]
LP 1484655: ftp://ftp.mozilla.org moved to http://archive.mozilla.org
This commit changes the XULRUNNER_URL in Open-ILS/xul/staff_client/
Makefile.am from using ftp to talk to ftp.mozilla.org to using http
with archive.mozilla.org. This is necessary because Mozilla.org
have apparently declared the former to be closed and the latter to
be the canonical location for downloads.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Bill Ott [Tue, 28 Jul 2015 20:05:31 +0000 (16:05 -0400)]
LP#1394989: Do not include deleted users when retrieving for Collections
As a side effect of discovering that users with no cards were being retrieved
as part of the Collections API calls, those users ended up being mostly
made up of deleted users (merged with an actual lead record, etc.)
This patch contribued by Bill Ott changes the retrieval so that it skips
over those deleted users.
Signed-off-by: Bill Ott <bott@grpl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Michael Peters [Thu, 20 Nov 2014 22:41:44 +0000 (17:41 -0500)]
LP#1394989: Make users_of_interest test for defined actor.usr.card values
If the open-ils.collections.users_of_interest API encounters a patron that
has a null "card" value in actor.usr the API will crash with an error like:
Received Exception:
Name: osrfMethodException
Status: *** Call to [open-ils.collections.users_of_interest.retrieve] failed for session [1416515351.333446.1416515351406], thread trace [1]:
Can't call method "barcode" on an undefined value at /usr/local/share/perl/5.14.2/OpenILS/Application/Collections.pm line 299.
This patches users_of_interest to provide "undef" in the event that there is
not a proper barcode associated with the user when retrieving results for the
API call.
Signed-off-by: Michael Peters <mpeters@emeralddata.net> Signed-off-by: Ben Shum <bshum@biblio.org>
Kathy Lussier [Fri, 7 Aug 2015 15:00:46 +0000 (11:00 -0400)]
Documentation: Add 2.8 docs for void on claims returned
Adding docs for void on claims returned feature. Also, adding a reference
to new "no billing activity on zero balance transaction" in one area of
circulation that was missed. Branch includes some other updates to old
information.
Mike Rylander [Mon, 15 Jun 2015 19:32:20 +0000 (15:32 -0400)]
LP#1465385: Fix some syntax issues with make_release
Some versions of bash become confused when a unary = operator
is used in place of a binary == operator. Also, some variables
live without the protection of quoting, and thus further confuse
the shell when their contents are not as simple as originally
expected.
Here we adress those issues.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Yamil Suarez [Fri, 19 Jun 2015 14:50:45 +0000 (10:50 -0400)]
LP#1465830: authority linker now ignores $e and $4 in bib name headings
presence of relator terms or codes in $e or $4 can prevent authority
headings linking
To test
-------
[1] Create an authority record with a name heading like this
100 $a Example, Natalia $d 1945-
[2] Create a bib record that contains the name and a relator
code or term, e.g.,
100 $a Example, Natalia $d 1945- $4edt
[3] Run authority_control_fields.pl. Note that the
heading in the bib is *NOT* linked, as evidence
by no $0 being added to the bib heading and no
rows added to authority.bib_linking for that bib
and authority.
[4] Apply the patch and re-run step 3. This time,
the link gets established:
100 $a Example, Natalia $d 1945- $4 edt $0 (CONS)xxx
Ben Shum [Tue, 3 Mar 2015 02:40:47 +0000 (21:40 -0500)]
Remove alpha and RC scripts for 2.3-2.4
These were in the repository from the testing phase of 2.3-2.4 during the
2.4 alpha/RC period. These script are not required and may be confusing if
run. Remove as unnecessary.
Signed-off-by: Ben Shum <bshum@biblio.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Mike Rylander [Thu, 11 Jun 2015 12:49:21 +0000 (08:49 -0400)]
LP#902255: Correct "ILS Event at check in" logic
In a classic case of "fix a bug to reveal another" it turn out that
there was a small logic bug hiding in the check in hold-capture code.
The result of this bug was that the wrong ILS Event object was being
returned when we ran into the double-scan hold-capture situation by
overwriting the correct one immediately after we construct it, which
in turn prevented the previous commit from working as designed.
We now return the correct ILS Event immediately so that we can
properly detect the situation. Two birds with one branch.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Mike Rylander [Mon, 8 Jun 2015 15:11:04 +0000 (11:11 -0400)]
LP#902255: Protect against hold double-capture
When the staff client is in Fast Scan (async) mode, it is possible
to double-scan at checkin and cause two holds to be captured by the
same item. By creating a specially crafted unique index we ensure
that the database rejects this situation.
This protection would cause unhandled errors in the staff client, so
we also register a new string to be displayed when this particular
situation occurs, alerting staff to the possible double-scan of a
barcode at checkin IFF they are using async mode.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Adam Bowling [Fri, 16 Jan 2015 22:18:24 +0000 (17:18 -0500)]
LP#1365661 Found patrons with same name not opening
This patch fixes the error, while registering a new patron
and clicking the link "Found {$0} patron(s) with the same
name" did not previously work in the staff client.
To reproduce the bug, register a new patron with the name of an
existing patron. The little widget with the message described
above will appear. The message is a hyperlink, but nothing
appears to happen if you click it. The JavaScript console will
contain an error ReferenceError:js2JSON is not defined.
After applying this patch, clicking the hyperlink does a search
for matching patrons as intended. The ReferenceError also
disappears.
Signed-off-by: Adam Bowling <abowling@emeralddata.net> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Michael Peters [Tue, 9 Jun 2015 14:10:04 +0000 (10:10 -0400)]
LP#1154656 MARC Expert Search "Add Rows" adds duplicate row
This patch changes the behavior of the "Add Search Row" link
(JavaScript function from simple.js "addExpertRow()") so that
we are always cloning the initial "empty" row instead of
potentially cloning a row -- by way of cloneNode() -- with user
input in place, and causing duplicate search rows.
To reproduce the bug, go to Advanced Search, fill in all three
search fields with some text, click on Add Search Row. You wil
see that the Title search row along with the data in the text
box is duplicated and added to the search.
After this patch, the new row should be added with an empty
text box.
Signed-off-by: Michael Peters <mpeters@emeralddata.net> Signed-off-by: Rashma Kumaran <rkumaran@kcls.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Chris Sharp [Tue, 7 Apr 2015 00:17:30 +0000 (20:17 -0400)]
LP#1342227 - Allow EDI Ruby dependency installation on Ubuntu 14.04
Create a script for Ubuntu 14.04 ruby installation and installation
for EDI dependencies. Remove 'rcov', which has been deprecated for
Ruby 1.9.1 and install Bill Erickson's GIR improvements.
In the future we will need to remove this dependency altogether (see
bug 1373690), but for now, at least get it working on Ubuntu 14.04.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
This commit borrows two screenshots from the Sitka Evergreen Training
Manual to replace one in the Alternate Serial Control View section.
Thanks Sitka!
Chris Sharp [Wed, 15 Apr 2015 18:05:23 +0000 (14:05 -0400)]
LP1444623: Remove "Safe" CPAN dependency from Debian/Ubuntu Makefile.install files
Following up on IRC discussion at http://irc.evergreen-ils.org/evergreen/2015-04-15#i_170386
it was agreed that it is no longer necessary to install Safe from CPAN
since it is included in the standard Perl package.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Conflicts:
Open-ILS/src/extras/install/Makefile.debian-jessie
Terran McCanna [Wed, 10 Jun 2015 19:44:46 +0000 (15:44 -0400)]
LP#1396263: Fix for 'Return to Record' link breaks after texting
If user is already logged into OPAC when texting a call number from
the record screen, the 'Return to Record' link works properly. However,
if user is not logged in and is prompted to log in first, the 'Return to
Record' link actually returns the user to 'My Account.' This patch
corrects that problem and returns the user to the record regardless of
whether they were initially logged in or not.
Mike Rylander [Wed, 10 Jun 2015 18:17:37 +0000 (14:17 -0400)]
LP#1463973: Use dollar-quoting for report literals
When inserting string literal into SQL for Clark, we quote
apostrophes with a backslash. That worked fine until Postgres
changed its default for the standard_conforming_strings GUC to "on"
after which it no longer worked fine.
So, we will now use "dollar quoting" for string literals instead
in much the same way we do for our search queries.
Test plan
---------
Pre-patch: Try to run a report where a string value is required as
a filter parameter, and include an apostrophe in that string. The
report will fail with an SQL error.
Post-patch: Do the same, it will not fail.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Angela Kilsdonk <akilsdonk@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Chris Sharp [Wed, 22 Apr 2015 13:54:11 +0000 (09:54 -0400)]
LP#1446860 - Correct mistaken logic in previous fix.
See https://bugs.launchpad.net/evergreen/+bug/1446860/comments/2
for reference. The logic was not enforcing the "if the editing
staff member doesn't have permission to edit a user in this
permission group" check. This corrects that.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Chris Sharp [Tue, 21 Apr 2015 21:10:49 +0000 (17:10 -0400)]
LP#1446860 Staff were able to edit their own accounts.
This change reverses what appears to be a thinko in the
original programming. If the editing user is the same
as the user being edited, disable the Save button.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Jeff Davis [Thu, 16 Apr 2015 15:58:17 +0000 (08:58 -0700)]
LP#1074096: Remove Bib Call Number from query type selector
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Michael Peters <mpeters@emeralddata.net> Signed-off-by: Ben Shum <bshum@biblio.org>
Kathy Lussier [Thu, 28 May 2015 02:11:49 +0000 (22:11 -0400)]
LP#1403966: Remove publication-specific information from metarecord results page
The records that make up a matarecord search result typically contain different
publication information. Therefore, we should remove the master record's
specific publication information from that search results page.
Test plan
Prior to loading the patch, conduct a search on the Concerto dataset
for "brahms piano concerto no. 1" with "Group Formats and Editions" turned on.
In the brief view, you will see a call number and, in the more details view, you
will see publisher and physical description information. Run the same search
after loading the patch, and you will no longer see that information.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Andrea Neiman <aneiman@kent.lib.md.us> Signed-off-by: Ben Shum <bshum@biblio.org>
Blake Henderson [Mon, 8 Dec 2014 21:52:15 +0000 (15:52 -0600)]
LP#1194860: You have permission to override some of the failed holds. appearing when it should not for patrons in the OPAC Edit
A quick value check before assigning the override variable.
This should eliminate the OPAC showing the override option
for those who do not have the permission.
Josh Stompro [Sun, 31 May 2015 22:49:34 +0000 (17:49 -0500)]
LP#1456021 Enable apache modcgi during install for Debian Jessie
Apache mod cgi isn't enabled when installing apache2.4 on Debian Jessie,
this causes the /updates/manualupdate.html to not be processed and
to just return the raw code of that script since it uses mod cgi.
This adds 'cgi' to the list of apache modules to enable during the
dependency install.
Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Josh Stompro [Sun, 31 May 2015 22:19:58 +0000 (17:19 -0500)]
LP#1457094 Switch to package libtemplate-plugin-posix-perl for Debian Jessie
Debian Jessie includes a package for Template::Plugin::Posix that was
being installed via CPAN. This patch removes the CPAN install and adds
the Debian package.
Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Mike Rylander [Mon, 8 Jun 2015 21:30:52 +0000 (17:30 -0400)]
LP#1289486: Remove blocking constraint from audit table
The ACQ lineitem audit table was augmented with an fkey pointing
to the queued record that was related to the line item. That's
bad because there are also triggers which attempt to manage that
table. Hilarity ensues. We should not have an fkey on an audit
table, so, we now remove that.
In order to test this, first attempt to delete an ACQ queue and
have that fail. Apply the DB change, attempt again, and have it
succeed.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>