Galen Charlton [Mon, 23 May 2016 14:29:09 +0000 (10:29 -0400)]
LP#1584801: fix tagging of previous circs in metarecord search results
This patch fixes a bug where previously-checked-out items were not
indicated as such in search results when doing a metarecord search.
To test:
[1] Ensure that the opac.search.tag_circulated_items library setting
is enabled and that you are testing with a user that has opted-in
to retaining circ history.
[2] Make a couple loans to that user.
[3] Log into the public catalog using that user.
[4] Perform a catalog search, choosing search terms such that
the previously-loaned items appear in results.
[5] Verify that "I have checked this item out before" is displayed
on the relevant hits.
[6] Click the "Group Formats and Editions" checkbox; note that
after the page refreshes, previously-borrowed hits are /not/
tagged.
[7] Apply the patch and restart the open-ils.search service.
[8] Repeat step 6; verify that this time previously-borrowed hits
are tagged.
Josh Stompro [Wed, 30 Mar 2016 13:47:57 +0000 (08:47 -0500)]
LP#1517556 - Exclude inactive event defs from find_event_def_by_hook.
Currently when find_event_def_by_hook is called to find an appropriate
event_def based on the hook, it doesn't exclude inactive event defs. So
strange behavior can happen if inactive event defs are present.
I ran into this issue when I was trying out different versions of the self
check receipt event def. I had one ative and one inactive while I was
troubleshooting, and when the system would grab the inactive event def by
chance, the self check UI would freeze. I think it is a resonable expectation
that an event def marked inactive doesn't get used by the system.
To test this out, clone one of the self check event defs, such as
"Self-Checkout Items Out Receipt" and mark the copy as inactive. Now
go and trigger this event in the self check interface by attempting to
print from the Items Out screen. It should now fail 50% of the time, since
both the active and inactive defs are returned.
After the fix the inactive event def will always be excluded, so the action
should no longer fail.
This patch fixes a typo in the error message presented
if the queued record could not be cleaned up for some
reason; it also reports the correct type of the record.
Delete the successfully imported authority record from the vandelay
authority queue instead of the bib record that happens to have the same
ID as the imported authority record.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kathy Lussier [Mon, 23 May 2016 23:17:36 +0000 (19:17 -0400)]
LP#1447746: Fix lp957466_update_date_and_source regression test
The new code introduced through LP1447746 adding an update_bib_source flag to
Vandelay merge profiles broke a test that was verifying the bib source and
edit fields were updated in Vandelay uploads.
This patch fixes the test and also adds a new test to ensure the flag works as
expected when set to both true and false. It also renames the test since the
it's now testing the newer code rather than the previous expected behavior.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <ben@evergreener.net>
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Ben Shum <ben@evergreener.net> Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org>
As with other dependencies, the hotkeys package name changed since the
last update. It's now cfp-angular-hotkeys
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Ben Shum <ben@evergreener.net> Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org>
The script was not inserting the version into config.upgrade_log when
run standalone because the line to do so was still commented out.
This commit removes the comment characters.
Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Galen Charlton [Sat, 7 May 2016 01:40:12 +0000 (21:40 -0400)]
LP#1579225: fix handling of passwords in patron registration
This patch improves how the new password hashing is invoked
by open-ils.actor.patron.update; in particular, it fixes
a problem whereby newly registered patrons could not
log in. It also fixes other issues:
- actor.usr.passwd would be set to an MD5 of the password
for new users, vitiating the strong hashes in actor.passwd
- certain types of updates via patron registration, such as
adding or deleting addresses, could result in the patron's
password getting doubly-hashed, thereby locking them out
of their account.
To test
-------
[1] Register a new patron; verify that they can log in.
[2] Edit an existing patron and change their password; verify
that they can log in.
[3] Edit an existing patron but do NOT change their password;
verify that they can still log in.
[4] Inspect the actor.usr rows for these patrons and verify
that actor.usr.passwd is set to the value MD5(''), not
the MD5 of their password.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mike Rylander [Fri, 8 Apr 2016 18:49:10 +0000 (14:49 -0400)]
LP#1568046: Use CTE instead of connectby for group tree queries
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org> Signed-off-by: Ben Shum <ben@evergreener.net>
As suggested by Mike Rylander, keep the escape_email_header helper
around to avoid breaking templates that already adopted it, but make it
a no-op as the SendEmail reactor now encodes the email headers of
interest by default.
Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Galen Charlton [Fri, 25 Mar 2016 20:46:24 +0000 (16:46 -0400)]
LP#1562153: fix case where changing sort order to relevance can fail
This patch fixes a cause where sending a 'sort' CGI parameter
with the empty string as value (which specifies relevance sorting)
fails to override a previously-set sort order.
To test:
[1] Do a public catalog search starting from the advanced search form,
e.g., keyword = "cats"
[2] Change the sort order to (say) Title A-Z from the results page.
[3] Note that the query string changes to "sort(titlesort) cats" and
that the results are re-sorted
[4] Attempt to change the sort order to relevance.
[5] This time, the sort order does not change ... and it should have.
[6] Apply the patch and repeat steps 1-5. This time, the sort order
should be successfully changed.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Galen Charlton [Wed, 30 Mar 2016 17:29:10 +0000 (13:29 -0400)]
LP#1563531: add libpcre3/libpcre3-dev deps for Jessie
This patch adds libpcre3 and libpcre3-dev to the list
of packages installed when installing Evergreen on Debian
Jessie. Evergreen's direct dependency on libpcre3 is new in 2.10
(see bug 1468422); it happens that libpcre3 and libpcre3-dev
are installed on Wheezy by virtue of a different dependency
chain.
To test
-------
[1] On a fresh Debian Jessie netinstall, follow the OpenSRF
and Evergreen installation instructions. Verify that with
this patch in place, Evergreen's "configure" step succeeds.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
This patch fixes a regression introduced in LP#1501471
where the Library Settings Editor could fail to retrieve
the values of org unit settings if more than 99 were
requested at a time.
To test
-------
[1] Open the XUL library settings editor and ensure that
no search filters are in effect. Note that values
are not displayed for any of the OU settings, and that
the Pg log contains error messages like this:
"ERROR: cannot pass more than 100 arguments to a function"
[2] Apply the patch.
[3] Repeat step one, and verify that values are now retrieved
for all of the OU settings that have values set.
[4] Verify that the pgTAP tests in live_t/aous_batch.pg pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Steven Callender [Wed, 13 Apr 2016 15:15:27 +0000 (11:15 -0400)]
LP#1569884 Allow deleted monograph parts to be recreated.
Changed the constraint on the biblio.monograph_part table to allow for a
monograph part to be created if a duplicate deleted version is found.
To test:
[1] Add a monograph part to a bib.
[2] Delete that monograph part.
[3] Attempt to add a monograph part to the same bib using
the same part label. Without the patches installed, this
will fail; upon applying the database update, this operation
should succeed.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This pgTAP test verifies that if you logically delete a monograph part,
you can subsequently add a new one with the same label as that of the
deleted one.
Bill Erickson [Wed, 30 Mar 2016 21:57:59 +0000 (17:57 -0400)]
LP#1564079 Checkout history skips nonexistent items
Modify the user checkout history migration process
(2.9.3-2.10.0-upgrade-db.sql and 0960.schema.decouple_co_history.sql) to
avoid inserting history rows for circulations whose copies do not
exist in the database.
For reference, this is a rare condition that cannot be recreated in a
modern EG system short of modifying constraints.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Remove the target_copy foreign key constraint on action.usr_circ_history
so that it does not prevent creation of rows from circulation's that
link to serial.unit objects. Similar to action.circulation, the foreign
key constraint is enforced via a evergreen.fake_fkey_tgr trigger
instead.
This modifies the 2.9.3-2.10.0-upgrade-db.sql and 0960 upgrade scripts,
since without this change, the scripts may fail.
A separate upgrade script is added to drop the constraint for those who
have already successfully run the the 2.9.3-2.10.0-upgrade-db.sql script
(i.e. those who don't use serials). For simplicity, the
evergreen.fake_fkey_tgr trigger is only applied in this separate upgrade
script (in addition to the base schema, of course).
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Now that Debian Squeeze's LTS (long-term support) period
has ended, Evergreen no longer offers community support
for that distribution. This patch removes references
to Squeeze from the installation scripts and documentation.
To test:
[1] Verify that Debian Squeeze is no longer referenced in
the installation documentation.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <ben@evergreener.net>
Conflicts:
docs/installation/server_upgrade.txt
LP#1554714: (indirectly) bump up PhantomJS version
It turns out that PhantomJS 2 or later is required for
angular-mocks to succesfully inject dependencies; this patch
updates karma-phantomjs-launcher to a version that will
bring in a recent-enough version of PhantomJS.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Bill Erickson [Thu, 10 Mar 2016 18:08:00 +0000 (13:08 -0500)]
LP#1554714 Migrate eg-date-input to ui-datepicker-popup
Also add support for uib-timepicker as an option secondary component of
the input.
Refactor existing use of eg-date-input to use <eg-date-input/>-style
declaration to better differentiate between a normal <input> and the
more complete/stylized date input div.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Angular 1.4+ requires that each controller be instantiated via the
module.controller() function. No more global functions. The patron
reg. controller, shared by 2 different modules, was defined as a global
function. Resolve this by hanging it off the core module (when loaded).
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
We had some overlap in numbers at the beginning of test file names.
The OCD in me think this should be straightened out. This branch
renumbers the duplicates starting with 10-.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Ben Shum <ben@evergreener.net>
Mike Rylander [Fri, 25 Mar 2016 17:52:54 +0000 (13:52 -0400)]
LP#1539084: webstaff: sort column picker entries by class path and column labels
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Conflicts:
Open-ILS/web/js/ui/default/staff/services/grid.js
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>