LP#1501471: add DB function for batch retrieval of OU settings
This adds a new stored function and a utility routine that uses it
for retrieving a set of OU settings in one fell swoop. This offers
a significant speed boost for the Dojo patron editor, which loads
about 70 OU settings when it initalizes itself.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Steven Callender [Thu, 14 Nov 2013 20:07:33 +0000 (15:07 -0500)]
LP#1251415: Use the juvenile setting when removing juvenile flag.
When calling the API open-ils.storage.actor.user.juvenile_to_adult,
most notably from the juv_to_adult.srfsh support script, instead of
strictly using the hardcoded passed value, first check the
global.juvenile_age_threshold from the settings based on the user's
home library. If the setting does not exist, then fall back on the
hardcoded passed value.
This will allow each library to be able to set different juvenile
thresholds if needed and at the very least, give control to the
settings rather than rely strictly on the hardcoded passed value.
Signed-off-by: Steven Callender <stevecallender@esilibrary.com> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Trap warnings from MARC libraries in marc_export so we can report the
id of the record that triggered the warning.
Use warn to print our warnings, instead of print STDERR. This includes
the existing errors, trapped by eval, that were being printed to STDERR.
To test
-------
[1] Ensure that a record has an error that would become apparent
during export. An easy way to do this is to insert the "‡"
character in the contents of a subfield, then use
--encoding MARC8 when exporting the record.
[2] Run the MARC export, e.g.,
cat id_list | marc_export -i > /tmp/bibs.mrc
[3] Verify that a warning is reported, e.g.,
Warning from bibliographic record 1: no mapping found at position 0...
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Report "no_import" records, which occur when a record fails to import
due to merge rules, quality rules, etc. (i.e. non-error conditions) as
failures to the client.
Also deprecates the "--queue" parameter, suggesting instead to use
--bib-queue or --auth-queue.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Add support for importing authority records to marc_stream_importer and
clean up some cruft along the way. A single instance of the script can
import either type of record. The record leader is inspected to
determine if it's an authority record or not.
These map to the new --bib-* versions for now, but will be removed
in a future version for clarity / consistency. The script will
print a deprecation warning when these are used.
Cleanup:
--import-by-queue is no longer supported. This option serves no
particular purpose and is a bad idea when re-using the same queue over
and over as most people do, because queue bloat will increase run times.
--noqueue (AKA "direct import") is no longer supported. All imports go
through Vandelay now.
Opens a new XMPP connection with each forked child during child init.
Previously, a single XMPP connection was shared by all forked children,
which lead to crossed streams and chaos.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
LP#1340852: Retain search params for copy location groups
The order in which we determined what to 'selected' in the "Library"
dropdown put the resolved locg first (which allows for shortnames, e.g.
BR1). That only gives us half the location group though, which is why
it was bumping up a level. Now, if we have a location group selected,
it will use that first (since they don't have shortnames); the remaining
select order will be the same.
Yamil Suarez [Mon, 22 Jun 2015 18:33:28 +0000 (14:33 -0400)]
LP#1467634: Hide saved searches from screen readers for non-staff client
This commit will only allow screen readers to see the saved searches for
users that are logged through XUL client.
Assuming that a screen reader can be attached to the XUL client.
It should also work for a user logged in through the web staff
client that is using a screen reader.
To test
-------
[1] Apply the patch, then perform a search in the public catalog and
view the HTML source. Verify that there's no "sr-only" heading
for "Saved searches".
[2] Set the opac.staff_saved_search.size library setting to a non-zero
value.
[3] In the web staff client, perform a search using the embeded OPAC;
verify that the recent searches list is displayed.
[4] Repeat step 4 in the XUL client.
Galen Charlton [Wed, 7 Oct 2015 17:49:19 +0000 (17:49 +0000)]
LP#1503782: fix horizontal scrollbar in MARC import queue inspector
In the XUL client (and webstaff), attempting to view the contents
of a MARC record import queue displays a table that, due to
its width, will almost always have a horizontal scrollbar. However,
attempting to actually use the scrollbar often causes the
focus to jump to the top of the table instead. This patch
fixes that.
To test:
[1] Create a bib queue that has at least a dozen records or so.
[2] Inspect the contents of the queue, scroll to the bottom of
the table, and interact with the horizontal scrollbar.
[3] Observe that doing so typically results in jumping up
to the top of the table.
[4] Apply the patch, clear cache and refresh, and try step #2
again.
[5] This time, the horizontal scrollbar should act normally.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Ben Shum <bshum@biblio.org>
Galen Charlton [Thu, 29 Oct 2015 19:30:31 +0000 (19:30 +0000)]
LP#1406786: fix remapping copies during parts merge
This patch fixes an issue with how copies are mapped
on the target part when using "Merge Selected" in the
Monograph Parts interface.
To test:
[1] Create some monograph parts on a record and assign
some copies to use them.
[2] Use the merge parts function to collapse all of the
parts created in step 1 onto a single part.
[3] Verify that the copies whose original parts were removed
are now mapped onto the part that was the target of the
merge.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1482336 - Add *.adoc support to create_release_notes.sh
This allows release note entries under /docs/RELEASE_NOTES_NEXT to
use the .adoc extension. It also changes the output file format to .adoc
because why not.
Dan Pearl [Mon, 2 Jun 2014 14:03:27 +0000 (10:03 -0400)]
LP#1504615: include part names when sorting copies for public catalog display
This adds a level of sorting to allow certain parts to be more
easily found in the list.
The hierarchy will now be:
Org Unit / Call Number / Part Label Sortkey / Copy Number / Barcode
Previously, the hierarchy was
Org Unit / Call Number / Copy Number / Barcode
To test:
[1] Create a record with several copies under one volume
using different monograph parts. Observe that the
order of copies in the record details page in the
public catalog is not sorted by part.
[2] Apply the patch and view the records details page; this
time, the copies should be sorted by part.
Signed-off-by: Dan Pearl <dpearl@cwmars.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bill Erickson [Tue, 27 Oct 2015 18:08:53 +0000 (14:08 -0400)]
LP#1510641 Always show actions selector in PO view
Ensure the actions selector is always visible for PO's, even when no
lineitems are present. This allows printing and history view (and
potentially future actions) for PO's that only contain direct charges.
The custom Add Brief Record button is no longer present, since the same
action is accessible from the actions selector.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
An unclosed phrase search that has a modifier can cause QueryParser to
enter an infinite loop, tying up open-ils.storage backends.
Examples of such searches include:
-"cats and dogs
subject:+"physical chemistry
This patch fixes the bug by allowing the end of the query string
to terminate a phrase (in addition to a quotation mark).
To test:
[1] Verify that the t/21-QueryParser.t unit test passes
[2] To test in a *development* database, before applying the patch
run one of the example queries. Observe that no
results are returned, and that one of the open-ils.storage
drones is running at 100% CPU.
[3] Apply the patch and restart the open-ils.storage service.
[4] Try the query again; this time, it should return results
immediately without causing an open-ils.storage drone to
peg a CPU.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
Bill Erickson [Mon, 12 Oct 2015 15:12:07 +0000 (11:12 -0400)]
LP#838525 DoB as date SQL upgrade repairs
1. Modify auditor.actor_usr_history DoB column in the same manner
as actor.usr to ensure consistent date truncation.
2. let update_auditors() recreate auditor.actor_usr_lifecycle for us.
3. Wrap the whole shebang in a PLPGSQL "DO" block so we can easily test
for the presence of optional reporter views that depend on actor.usr, so
they can be recreated as needed.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Release Notes: Move/copy relevant sections to Upgrade Notes
This commit moves two sections from "New Features -> Administration ->
Upgrade Notes" to the main level "Upgrade Notes" section, which had been
accidentally left empty and was causing AsciiDoc-to-ePub conversion
errors. This commit also copies two other sections to the main "Upgrade
Notes" section, since they contain information relevant to the upgrade
process.
LP 1502156: Fix marc_export error when dumping authorities.
There is a chance that marc_export will attempt to call a nonexistent
field on MARC::Record if an error occurs while exporting authority
records. The bug could only be triggered if a conversion error
occurred while exporting the authority as either MARCXML or USMARC.
The fix is to rename a couple of variables in the Marque::Authority->next
method to be more like those used in Marque::Biblio->next. This will have
the side effect of making marc_export easier to maintain, since the
variables used in one method will now have the same meaning as those
in the other.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Remington Steed [Fri, 2 Oct 2015 13:41:39 +0000 (09:41 -0400)]
Docs 2.9: Add summary of Web Client changes
This commit adds the Web Client release notes summary to the appropriate
docs section. It also updates the wording and links regarding the
completed UI Style Guide internship.
Next we need to copy the Cataloging content into the web client section
and provide web client screenshots.
Dan Scott [Thu, 1 Oct 2015 20:13:45 +0000 (16:13 -0400)]
Doc build: update the implicit ID for release notes
The implicit ID for a given heading changes each release as we update
the release notes, so bump 2.8 to 2.9 so that the reference to the ID
can be resolved.
Dan Scott [Thu, 1 Oct 2015 20:15:12 +0000 (16:15 -0400)]
Doc build: link to the right media file
The screenshot for the list of call numbers is a PNG image, not a JPEG
image, so referring to it with the appropriate extension will make it
show up in the docs and enable the epub and PDF builds to successfully
complete.
Dan Scott [Thu, 1 Oct 2015 20:11:57 +0000 (16:11 -0400)]
Doc build: use XML-compliant IDs
Doc builds that depend on an intermediate XML transform (epub, PDF) also
need to use IDs that comply to the XML standard. In this case, numbers
are not valid NameStartChars:
http://www.w3.org/TR/REC-xml/#NT-NameStartChar
Dan Scott [Thu, 1 Oct 2015 20:10:41 +0000 (16:10 -0400)]
Avoid duplicate IDs in doc build
Defining the same ID twice in the same document results in broken builds
that depend on an intermediate XML transform (epub, PDF), so redefine
the second ID in this document.
Bill Erickson [Tue, 29 Sep 2015 16:10:53 +0000 (12:10 -0400)]
LP#838525 libdbi DATE types translated via gmtime
libdbi assumes a date (w/ no time or timezone) is GMT. Parse the date
via gmtime() instead of localtime() to ensure the date returned to the
caller matches the date in the DB.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Bill Erickson [Tue, 29 Sep 2015 16:10:31 +0000 (12:10 -0400)]
LP#838525 Store date of birth as SQL DATE type
Upgrade script translates DoB ahead 3 hours before translating to DATE
(from TIMESTAMPTZ) to ensure dates stored in alternate daylight savings
TZ (e.g. -05 vs. -04) are translated to the proper date.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Documentation for negative balance settings in 2.9. The updates in this branch
include:
* Updates of the circulation, patron record, and library settings sections
to reflect the new features contained in the negative balance work.
* General updates, consolidation, and re-organization of some components
of the billing section.
A new understanding and confiuring billing section is still to come, but this
branch brings existing documentaiton up to date.
Chris Sharp noticed another ERROR: cannot ALTER TABLE
"record_attr_definition" because it has pending trigger events
with the 2.8.4 to 2.9.0 upgrade script. I have rearranged the
transactions so that there are now 3.
1. One for the initial inserts and other changes up to 0937.
2. One for the two alter table statements in 0937.
3. One for 0938 to the end (0944).
This resolves the issue and works for me on an upgrade from a
clean 2.8.4 installation.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Jason Stephenson [Thu, 17 Sep 2015 19:12:40 +0000 (15:12 -0400)]
LP 1496977: Duplicate Code in OpenILS::Application::Cat::AssetCommon
It looks like two lines of code got duplicated in commit e2f6cca0 in
AssetCommon. This duplication can lead to data loss for the function
update_fleshed_copies. It also lead to the following warning when
you use OpenILS::Application::Cat::AssetCommon in a script:
"my" variable $sc_entries masks earlier declaration in same scope at
/usr/local/share/perl/5.18.2/OpenILS/Application/Cat/AssetCommon.pm
line 371.
After this patch, the warning disappears.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
Docs: Apache config includes examples for "no image"
This commit adds a note about the new commented config blocks in the
example Apache vhost file for providing a custom image for items with no
image. This commit also moves a related section into the "External
Content" section, so all external content info is together.
Docs 2.9: Update and add detail for Holdings Import profile
In order to add details about the new ability to import Stat Cat data
for a copy, this commit adds a table of all the import fields available
in the Holdings Import Profile. It also duplicates some content from
another section about batch importing, and updates the screenshot and
some wording in the original section.
We missed acknowledgements for a few code contributors during the 2.8.3
point release. Adding them here as well as a fix to get the header to display
properly for the 2.8.4 release notes.
Adjusting the release notes entry for conditional negative balances to reflect
recent changes in the code and adding ackwnowledgements. Also, cleaning up some
grammar and removing entries that already made it into point release notes as
bug fixes.
Dan Wells [Tue, 15 Sep 2015 19:28:44 +0000 (15:28 -0400)]
LP#1494544 Complete XUL UI for adjustment vs. void options
This commit does several things to complete the adjustment UI changes.
1) Adds "Adjust to Zero" to the "Actions" menu. It was previously only
on the right-click popup.
2) Shows or hides the void/adjustment controls based on permissions.
3) Generates a new force-verified warning if you attempt to void, but
there is also some chance that doing so would be contrary to your
negative balance policy settings.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Dan Wells [Mon, 14 Sep 2015 15:12:38 +0000 (11:12 -0400)]
LP#1494544 Add ADJUST_BILLS permission to seed data
This commit adds the new ADJUST_BILLS permission to the seed data.
Note that the upgrade script only adds the perm and avoids adding it
to any groups, as that should only be done with local discretion.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Fixes an error that occurs when attempting to refund a negative balance from
the patron's bill record. We removed the staff.patron.bills.handle_refund.
confirm_message string, which caused the error when the handle_refund function
tried to retrieve the string. It turns out the string never displayed in the
client. Therefore, in this branch, we stop the handle_refund function from
trying to retrieve the string. I did the confirmation message for the
adjust_to_zero function since the same issue was occurring there.
Test case: Find a negative balance transaction and, from the patron's bills
record, select the transaction and select the option to Refund. Pre-patch, this
action will generate an error message. Post-patch, this action should generate
a prompt asking the user to confirm the action.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Bill Erickson [Thu, 10 Sep 2015 00:52:14 +0000 (20:52 -0400)]
webstaff: Phys Char Wiz various additions and repairs
* Show <unset> as selector value when no value is selected
* Properly handle gaps (undefined slots) in 007 field value
* Return to origin value when dialog Cancel is chosen
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
webstaff: flat MARC editor now updates model on blur, not change
This fixes a problem where attempting to type in the flat
MARC editor would result in a fromBreaker()/toBreaker() cycle
being run with each keystroke, which (among other things) made
the user have to fight for control of the insertion cursor.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>