Galen Charlton [Tue, 6 Mar 2018 23:00:23 +0000 (18:00 -0500)]
LP#1721807: fix webstaff report templates that have might_have and has_many joins
This patch fixes a bug where using a virtual field in the web staff
report template editor to join another table would result in a syntax
error in the generated SQL.
To test
-------
[1] Apply the patch and verify that the regression test in the previous
commit passes.
[2] Create new report template in the web staff client that include
virtual fields and joins and verify that they work. One example
would be a report that uses ILS User as the base source and joins
in the patron notes virtual field.
[3] If available, clone a report template originally created in the web
staff client that had previously failed, then save it. The new
report should work.
This adds an automated regression test as well as some additional
unit tests for the web staff reporter app and template service. This
patch could be applied by itself to verify that the regression
test (run using 'npm run test' for master or 'grunt test' for rel_3_0)
fails.
Kathy Lussier [Tue, 6 Feb 2018 16:40:11 +0000 (11:40 -0500)]
LP#1746365 Change default staff link colors to provide adequate contrast
The default link color from bootstrap works well on white backgrounds, but
doesn't provide adequate contrast once the background color is changed.
This introduces accessbility problems, particularly in cases where linked
text displays on a selected grid row that uses a light blue background
color. This change provides a darker default link color.
Galen Charlton [Mon, 5 Feb 2018 23:04:12 +0000 (18:04 -0500)]
LP#1691263: discourage input of newlines in MARC editor
This patch catches and discards enter keydown events when the
focus is in a contenteditable subfield value div; otherwise, newlines
can infect the MARC record.
Cesar Velez [Mon, 4 Dec 2017 17:45:35 +0000 (12:45 -0500)]
LP#1691263: make webstaff MARC editor wrap long fields
This patch makes the MARC editor wrap long fields (e.g.,
bibliographic 505 fields) so that they fit the width of the enclosing
window or modal. The approach taken is replacing the text input
elements with contenteditable divs, which in turn can be better
styled.
To test
-------
[1] Apply the patch.
[2] Locate a record with a long 505 field and open it in the
MARC editor. Verify that the contents of the field wrap.
[3] Verify that record editing and saving work as expected.
Remington Steed [Wed, 14 Mar 2018 12:54:52 +0000 (08:54 -0400)]
Docs: Fix AsciiDoc list formatting
AsciiDoc lists (numbered or bulleted) generally need to be preceded by a
blank line. If not, they will be absorbed into the previous paragraph of
text. This commit fixes two occurrences of this.
blake [Mon, 13 Jun 2016 20:58:13 +0000 (15:58 -0500)]
LP1411422 Copy details repeated in search results when item/volume moved with parts attached
Added the code in perl to respect the existence of parts. Both "transferring volume"
and "transferring items". "Transferring items" was coded to use
open-ils.cat.asset.copy.fleshed.batch.update which means most of the work was done in js.
The web based staff client is coded to use open-ils.cat.transfer_copies_to_volume.
Decided to use that method for xul as well. Making it more consistent with the "transferring
volume" code. Considered coding it to move the part level holds to the destination part but
it's possible that the source part still has items.
Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
LP#1748466: Fix http -> https /eg/staff rewrite on Apache 2.4.
Remove the SSLRequireSSL directive from the Location /eg/staff stanza
in Open-ILS/examples/apache_24/eg_vhost.conf.in so that the rewrite
from http to https works for the web staff client without the user
getting a 403.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Ben Shum <ben@evergreener.net>
Since the display is not refreshed until the payment finishes, it
is possible to fire off a second payment by double-clicking.
This commit is a simple way to disable the button while a payment is
in process, then enable it again after the display refreshes.
Since the 'sendPayment()' function is wrapped, we may need to move
this logic up, but this being a single promise is simpler, and it
solved the problem in testing.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jason Stephenson <jason@sigio.com>
Galen Charlton [Thu, 25 Jan 2018 21:58:33 +0000 (16:58 -0500)]
LP#1745486: avoid retrieving user by id::numeric during auth init
During open-ils.auth.authenticate.init, if looking up the user by barcode,
the actor.usr row is subsequently fetched by ID. However, the ID was
turned into a float, meaning that the query as sent to the database
was equivalent to
SELECT * FROM actor.usr WHERE id = 123.0000;
While PostgreSQL will accept this, it ends up doing a sequential
scan of the actor.usr table rather than an index lookup, making the
retrieval up to two orders of magnitude slower than it needs to be
and adding a couple percent unecessary I/O load on large, heavily
used database. This patch fixes that.
To test
-------
[1] Turn on PostgreSQL statment logging and log in as a user
by barcode. Note that there's a retrieval of actor.usr by
a float form of the ID.
[2] Apply the patch and repeat step 1. This time, the query
retrieves the row by the integer form of the ID.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Ben Shum [Wed, 20 Sep 2017 19:49:37 +0000 (15:49 -0400)]
LP#1718549: Use Nodejs source install for all distributions
Due to dependency issues and the need for newer NodeJS version, install
from source for all distributions, not just the ones without pre-packaged
apt sources.
Remington Steed [Thu, 7 Dec 2017 15:55:41 +0000 (10:55 -0500)]
Docs: Use new images for in-house use
The In-House Use docs previously had new web client screenshots, but a
recent commit accidentally reverted them to the old XUL client images.
This commit changes the references back to the new images.
This patch ensures that when a hard due date (or hard due date value)
is created or edited, the ceiling date is set to the end of that day.
This fixes a problem where a ceiling date would not be applied for
loans checked out earlier on the ceiling date itself.
This patch intentionally does not touch existing hard due date
values. It also does not use the database or middle layer to coerce
the ceiling dates to end of day to leave upon the possiblity that
an Angular version of the hard due date editor will allow operators
to set both date and time. (Note that Dojo does not readily have a
combined date/time picker.)
To test
-------
[1] Apply the patch, then in the hard due date editor, verify that
when creating a hard due date _value_, the date gets saved as
ending at 23:59:59 in the local time zone.
[2] Similarly, verify that when editing an existing hard due date value,
the date gets saved as ending at 23:59:59.
[3] Repeat steps 1 and 2, but this time for hard due dates.
Alex Cautley [Thu, 16 Nov 2017 23:03:11 +0000 (23:03 +0000)]
lp1705133 view holds patron info redaction
Removed extra or sensitive patron information from patron and record
hold grid
Signed-off-by: Alex Cautley <acautley@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/templates/staff/cat/catalog/t_holds.tt2
modified: Open-ILS/src/templates/staff/circ/patron/t_holds_list.tt2
In bug 1713064 I added a directive to make it possible to use
a String as a Model in an Input tag with type Number. Unfortunately
there was also a formatting function in that branch that works well
sometimes but is far more frustrating than it is helpful for enough
workflows that it should be removed.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Jason Stephenson [Thu, 15 Jun 2017 18:11:41 +0000 (14:11 -0400)]
LP 1698176: Return undef with die event in Actor.pm _add_patron function.
If the CStoreEditor create_actor_user call fails in the _add_patron
helper function in OpenILS/Application/Actor.pm, the CStorEditor's
die_event is returned as a scalar value. The caller expects a list
return with two values: the user object in index 0 and the event, if
any, in index 1.
Returning just the event causes the caller to use the event as if it
were the user object. This leads to a different error message later
in the code: Can't call method "billing_address" on unblessed
reference at /path/to/perlib/OpenILS/Application/Actor.pm line 743.
This commit changes the return value in the event of a database insert
failure to be the two member list as expected by the caller with undef
in index 0 and the die_event in index 1. This returns the proper
error message to the client.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Kyle Huckins [Mon, 30 Oct 2017 15:55:24 +0000 (15:55 +0000)]
LP#1708487 Add Title and Barcode to Bill Print Templates
- Add additional documentation to Bills, Current; Bills, Payment; and Bills,
Historical print templates.
- Convert xacts to objects containing all required information for print
templates
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2
modified: Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2
modified: Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2
modified: Open-ILS/web/js/ui/default/staff/circ/patron/bills.js
LP#1672435: Make BR4's sample theses copy location holdable
All of the part copies in the sample dataset live in a non-holdable
copy location, usually BR4's Theses location. This commit makes
that copy location holdable so that we can better test part holds
out of the box.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <ben@evergreener.net>
Jason Boyer [Thu, 19 Oct 2017 03:05:05 +0000 (22:05 -0500)]
LP1724725: Handle ident_type2 in Web Staff User Editor
While it was fairly harmless to not be able to set an ident_type2
value in the webstaff editor, the way things worked out if a user
had one set from the XUL client or direct manipulation an attempt
to save such a user would crash the cstore backend.
To test
-------
[1] Use the patron editor to edit a patron that has a value set
for ident_value2. Save a change, but note that nothing is
displayed and that eventually an open-ils.cstore error is
reported in the browser console.
[2] Apply the patch and repeat step 1. This time, the patron
editor will display the secondary identification type field
and allow you to save changes to the record.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
This patch checks for suffix and prefix of call number before merging
assets and ensures that unused call number records are marked
deleted.
To test:
[0] Apply the patch.
[1] Attempt a record merge where each record has a volumes with the
same call number label and owning library but different
affixes. Verify that the volumes and their associated copies
are not merged onto the same volume..
[2] Attempt a merge with records having matching volumes. Verify
that the copies are moved to one volume and that the other is
marked deleted.
LP#1671635: Maintain search parameters throughout place hold process
Add hidden fields to the Place Hold form for the search query, type
and locg fields so that they will appear correctly in the search bar
on the holds confirmation page. This commit also keeps the query
parameter in the URL after clicking the Place Hold link from the search
results page.
Test Plan:
Log into the public catalog and perform a search that is limited to a library
that differs from the user's preferred search library and using a search type
that is not keyword (e.g. title or author). Place a hold on any title from
either the search results or record page. After submitting the form, look
at the search parameters in the search bar on the hold confirmation page.
Pre-patch, the query terms will not appear, the search type will revert back
to the default of keyword, and the search library will be the user's preferred
search library.
Post-patch, the query parameters will be maintained in the search bar.
Jeff Davis [Fri, 6 Oct 2017 18:15:05 +0000 (11:15 -0700)]
LP#1706147: handle multiple matches on patron barcode completion in web client
To test:
1. Add a barcode completion rule for BR1, applying to users and set to
active, where "BR1" is the prefix.
2. Create a user with barcode "BR100001" and home library BR1.
3. Create another user with barcode "00001".
4. Login to the web client with BR1 as your working location. Go to
"Check Out Item" and enter barcode "00001". EG will retrieve one of
the two accounts you created; it ought to present a dialog that
allows you to choose between BR00001 and 00001 (or none of the above).
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Mon, 30 Oct 2017 15:36:29 +0000 (11:36 -0400)]
LP#1728122 Webstaff survey display avoids deep fleshing
Avoid collecting survey/question/answer data via deep pcrud fleshing.
Opt instead to organize the data locally using the values fleshed
directly on the response object.
Additional fixes included:
1. Avoid displaying survey responses for out-of-scope surveys.
2. Format survey response dates using the configured date format instead
of display a bare ISO date.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Remington Steed [Wed, 25 Oct 2017 15:21:52 +0000 (11:21 -0400)]
Docs: Fix PDF build errors
This commit fixes two minor errors that were preventing the PDF build
process from completing (a duplicate section ID, and a link to a
non-existing section ID).
Cesar Velez [Thu, 28 Sep 2017 14:48:58 +0000 (10:48 -0400)]
LP#1715423 - fix issues with the display of IDs in patron summary pane
The Patron summary pane was not properly displaying the values
for the primary ID and secondary ID. Also added the type name of
the ID in next to primary ID label.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Cesar Velez [Wed, 4 Oct 2017 18:01:25 +0000 (14:01 -0400)]
LP#1712686 - display completed barcode on copy grids not partial input
The check in, check out, and renew interfaces were not displaying
the actual complete(d) barcode when barcode completion is on.
This saves the inputted partial barcode in row_item.input_barcode
and let's the returned acp.barcode be in row_item.copy_barcode for
display.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Cesar Velez [Thu, 28 Sep 2017 17:08:48 +0000 (13:08 -0400)]
LP#1714060 - fixes thinko when obeying patron.password.use_phone setting in patron regctl
There was a bug, an undefined variable was being used to assign the last
four digits of the day_phone to usr.passwd when this library setting
was being used.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Cesar Velez [Thu, 12 Oct 2017 21:31:37 +0000 (17:31 -0400)]
LP#1719967 - Add alert message field to volcopy editor
As 1676608 was deferred to 3.1, this adds a copy alert_message
field, to the volcopy editor. The defaults tab "Alerts" checkbox has
been replaced by "Alert Message" and this new field will be active until replaced by
the changes of 3.1.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Triggering a file download from dojo pages within the web client
requires a new technique. This commit borrows from the acq lineitem
table export (acq/common/li_table.js) and applies the technique to the
vandelay feature.
This repatch was requested by Galen Charlton to make it easier for
upgrades to avoid adding the entries or failing if the entries already
existed.
Also drops the unnecessary i18n tagging for the billing type names
since it does not work with applying upgrade scripts (only for sourcing
db.seed data for translation to PO file)
Signed-off-by: Ben Shum <ben@evergreener.net> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Chris Sharp [Tue, 21 Feb 2017 13:03:55 +0000 (08:03 -0500)]
LP#1666512 - Add billing types from 2009-era features.
For systems that were running Evergreen 1.2 or so and upgraded to 1.4
or so, there were billing types added that did not make it into an
upgrade script. We add them here just in case you don't have them.
Systems installed since Evergreen 1.4 are probably not affected.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Ben Shum <ben@evergreener.net> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Docs: Adding information on using native browser functionality
The section on setting a home page seemed out of place in the Log in section.
I moved it to a new section that covers best practices for using the browser,
which also includes earlier documentation on using tabs and new documentation
on disabling popup blockers.
Docs: Update login chapter
Some things have changed in the web client since this documentation was
first created. Removing the note that workstation registration is not required
and updating the caution on what happens when exiting the browser.
Previously, workstation registration was part of installing the staff client,
but since we have nothing to install, I added it to the logging in section. I
also removed a xul client feature from the main root.adoc.
Bill Erickson [Thu, 21 Sep 2017 20:04:03 +0000 (16:04 -0400)]
LP#1643927 Copy note captures initials; shows date
Fixes thinko in copy note staff initials tracking. Offloads the
formatting of the copy note to egStrings. Adds the workstation org unit
to the initials block a la the XUL client.
This does not add the create date to the initials block as with the XUL
client, because the create date is part of the note. Instead, we now
display the note create date in the copy note display form.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Show warning message to user when an unknown barcode is scanned in the
copy bucket pending list UI. Also, after a barcode failure occurs, select
the barcode text (instead of clearing it) so it can be seen and easily
replaced, consistent with the item status UI.
After successful scan, clear and re-focus the barcode input box.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Bill Erickson [Thu, 14 Sep 2017 22:09:08 +0000 (18:09 -0400)]
LP#1712637 Patron edit hold pickup location repairs
1. Allow setting the hold pickup location independant of the home
library.
2. Disable org units in the pickup lib selector that are not viable hold
pickup locations (can_have_vols=f)
3. Consistent w/ the XUL client, allow a patron to be created without
selecting a default pickup location.
To test:
[1] Register a new patron and confirm pickup location is initialy unset.
[2] Confirm pickup lib options are viable pickup locations.
[3] Apply a pickup location different from the home library and confirm
the home library selector remains unchanged.
[4] Confirm saving the patron applies the expected pickup location value.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP#1708951: fix tabbing in webstaff catalog app for Firefox
This patch works around an issue where Firefox appears to require
that the iframe for the embedded OPAC not have a null catalog_url
value. It also fixes an issue where navigating to the OPAC View tab
after retrieving the record with a different default view set would
cause it to jump back to that default view... the first time.
To test:
[1] In the web staff client, retrieve a bib record and set the default
view to a tab other than 'OPAC View'.
[2] Retrieve another bib by TCN or ID. Note that although the default tab
will briefly display, the page will jump over to the OPAC view and
display an empty record.
[3] Apply the patch and repeat step 2. This time, it should display the
record with the current default view.
[4] Select the 'OPAC View' tab and verify that it loads the record details
page.
LP#1716475: Add label for mobile carrier select menu
Replace the empty string with a label in the SMS carrier select menu due to
issues that arose when putting an empty string in the translation file. It
also is good usability.
Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <ben@evergreener.net>
Cesar Velez [Fri, 11 Aug 2017 21:52:13 +0000 (17:52 -0400)]
LP#1599894 - OPAC disable Add to MyList when doing metabib search
Since adding a result to MyList yields to a random title
(due to bad id) being added to temp. lists, disable MyList if
metabib search is on, i.e "Group formats and editions"
checkbox is checked.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Support default values for boolean user opt-in settings during patron
registration. A default value of True, true, T, or t (or really
anything starting with a 't') is treated as true. Any other value
(including null) means false.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Cesar Velez [Tue, 27 Jun 2017 19:06:48 +0000 (15:06 -0400)]
LP#1695029-Webstaff Fix Patron Registration page never loading
It looks like there was a variable mistype causing the page
to not load, but the setting that the lp bug mentions wasn't being
properly bound and needed to be wrapped to a boolean.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Cesar Velez [Thu, 24 Aug 2017 21:17:11 +0000 (17:17 -0400)]
LP#1710512 - OPAC js strings need to be i18n-izable
Adds a way to translate displayed string messages, in OPAC
JS source code alerts and other outputs. This is done by having
js.tt2 include i18n-strings.tt2 which contains an explosed/global
JS blob variable called eg_opac_i18n. This is intended to work
in similar fashion as base_js.tt2 in the webstaff ng client.
Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Conflicts:
Open-ILS/src/templates/opac/parts/js.tt2
Skye Howard [Thu, 17 Aug 2017 21:52:08 +0000 (21:52 +0000)]
LP#1629298: Web Client Checkout Fails For Barcodes With Spaces
Web Client checkout trims spaces from patron barcodes differently than xul client checkout
The web client was not removing the whitespaces before checking barcode searches
this commit includes a step where the whitespaces are removed.
Signed off by Skye Howard <showard@catalyte.io>
Signed off by Cesar Velez <cesar.velez@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
McCanna [Fri, 25 Aug 2017 13:53:14 +0000 (09:53 -0400)]
LP#1712840 Ebook tabs always visible in My Account
Corrects a problem in My Account where the ebook tabs
on the checkouts and holds pages were always visible
regardless of whether the ebook_api.enabled value was
set to true or false.
Transfer checkout history rows to the destination user during patron
merge.
To Test:
1. Enable circ history tracking for 2 users, ideally 2 with same
last name for easy searching.
2. Check out items to both patrons.
3. Load the 2 patrons in the patron search UI and merge one into the other.
4. action.usr_circ_history rows previously linked to the deleted patron
will now be linked to the active/lead patron.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Jason Boyer [Thu, 24 Aug 2017 21:34:02 +0000 (17:34 -0400)]
LP1712922: Exclude Deleted ACPL in Vol/Copy Editor
Just what it says on the tin. When loading the list of ACPL
in the editor only retrieve the non-deleted locations.
Tester's note: there's no database contraint that strictly
prevents a copy from linking to a deleted location, so for
items like that, the copy location selector will be blank. This
is an uncommon situation, but Evergreen admins can identify
such items by running the following query:
select acp.id, acp.barcode, acpl.name
from asset.copy acp
join asset.copy_location acpl on (acpl.id = acp.location)
where not acp.deleted
and acpl.deleted
order by acp.id;
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>