Add cast to int of scalar used on arrays in more places where it seems
necessary.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jeff Davis [Thu, 8 Apr 2021 02:41:49 +0000 (19:41 -0700)]
LP#1923076: ensure length of empty array is treated as a number when retrieving hold counts
Thanks to Jason Stephenson for suggesting this solution.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jane Sandberg [Tue, 13 Jul 2021 03:56:01 +0000 (20:56 -0700)]
LP1935693: Add circulation modifier to course page
Also makes some strings extractable for translation that
were previously missed.
To test:
1) Enable the course materials module
2) Add some courses
3) Add some materials to those courses, using a mix of
circulation modifiers
4) In the OPAC, use the Course Search to search for
your courses
5) Click on the course you created
6) Note that physical items associated with the course
display their circulation modifiers in the circulation
modifier column.
Also removes the underlying component, since it's not longer used
anywhere.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Bill Erickson [Wed, 28 Jul 2021 14:17:48 +0000 (10:17 -0400)]
LP1910452 Staff catalog Patron View button
Adds a Patron View button to the Angular staff catalog record detail
page which opens the catalog in a new browser tab.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
LP#1912852: add jump-on-one-hit support to Angular staff catalog
This patch add support for the opac.staff.jump_to_details_on_single_hit
library setting to the Angular staff catalog.
To test
-------
[1] Apply the patch.
[2] Ensure that the opac.staff.jump_to_details_on_single_hit setting
is off for your workstation.
[3] Perform searches using the Angular staff catalog. Verifying that
searches that return any number of results display them on the
results page.
[4] Set the library setting to true and reload the staff catalog.
[5] Perform keyword, numeric, and MARC searches using terms that
result in a single-record result set. Verify that the interface
redirects to the single-record page for that hit.
[6] Perform searches that would return zero results. Verify that
the results page indicates zero hits fuond.
[7] Perform searches that would return more than one result. Verify
that the results are displayed on the results page.
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org> Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
When a staff person tries to schedule curbside appointments
after their UTC equivalent time moves to the next day, the
timeslots for the next day are shown, and appointments get
made for the next day.
For example, when CST is the local timezone (UTC-6), after 6pm
appointments for the current day are scheduled for the next day.
Appointments for the next day get scheduled for the day after.
This happens because toISOString is used to grab the current date,
but toISOString always returns UTC time. The date widget will show
the correct date, but the time slots will actually be for the next
day. This is more noticeable if days have different schedules.
Another clue is that the time slot selector will show all timeslots for
the day, not just the ones that are upcoming.
Testing Plan:
1. Enable curbside for test location, and set org unit hours to
be at least through 8pm for open hours.
2. Wait until after 4PM (Pacific), 6pm CST, 7PM EST, or
change your computer clock.
3. Try to schedule an appointment for the current day.
4. The appointment should get scheduled for the next day.
5. Apply the fix.
6. Try to schedule another appointment and see that the correct
date gets selected.
Jason Boyer [Sat, 10 Nov 2018 22:53:16 +0000 (17:53 -0500)]
LP1802682: Use Default Net Access Level OUS
This branch does two things: makes use of the OUS
that determines the default Net Access Level, and
also changes the type of the coust entry to make
using it more user friendly.
Terran McCanna [Thu, 22 Oct 2020 22:05:37 +0000 (18:05 -0400)]
LP1901028 Print Template for Checkout Missing Fields
The fields are actually available, but the hints in the template
were incorrect. This fixes the hints for call number, owning library
name, owning library short name, and circulation modifier.
This patch makes the form in the self-registration screen in the Bootstrap
opac a little responsive on smaller devices.
To test.
1. Turn on self-registration in the library settings.
2. Go to the self-registration screen and make the screen as small as possible.
3. Apply the patch.
4. Notice that the form labels and input boxes are now more aesthetic.
5. Create some self-registration requests to make sure the form captures the data.
Garry Collum [Thu, 27 May 2021 17:49:00 +0000 (13:49 -0400)]
LP1929839 Load Shared Bucket text error
Changes the title of the Load Shared Bucket pop-up box from "Load Shared
Bucket Bucket by ID" to "Load Shared Bucket by ID". I decided not to
change it to "Load Shared Bucket by Bucket ID" since "Bucket ID" is
displayed next to the input field.
This affects all 3 types of buckets: item, record and user.
Bill Erickson [Tue, 3 Aug 2021 20:58:29 +0000 (16:58 -0400)]
LP1934184 Vandelay Delete Queue action repair
Fixes the Queue Details page Delete Queue link. Before it did nothing,
now it prompts the user to confirm deletion followed by deleting the
queue (when confirmed).
To test, go to Cataloging => MARC Batch Import/Export => Inspect Queue
=> Double-click a queue => Click Delete Queue (under Queue Actions) and
confirm that the confirmation dialog appears and deletion works.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Christine Morgan <cmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Galen Charlton [Fri, 6 Aug 2021 15:35:49 +0000 (11:35 -0400)]
LP#1450519: remove unauthorized access to library setting history
This patch changes the current Library Settings editor so that
it doesn't display the setting history for a setting that the user
doesn't have the underlying view permission for. It also removes
the coustl IDL class [config.org_unit_setting_type_log] from PCRUD.
Access to the setting history is now done through a new method,
open-ils.actor.org_unit.settings.history.visible.retrieve, which
accepts an authtoken and a setting name. If the user has the
relevant view permission, setting history entries at all of the
OUs that they have the permission at are returned. If the user
lacks the permission, an empty array is returned. If the setting
has no permission associated with it, all history entries for
the setting are returned. The user must have at least STAFF_LOGIN
to retrieve any entries at all.
To test
-------
[1] As an administrator, make some changes to the values of
a privileged library setting (such as one of the credit card
ones) and an unprivileged one (e.g., lib.info_url).
[2] Log in as a staff user without administration privileges
and go to the library settings editor. Note that while the
current value of privileged settings are not displayed, clicking
on the history link displays the full history of the setting.
[3] Apply the patch and repeat step 2.
[4] This time, history for the privileged setting is not displayed,
while history for an unprivileged setting continues to be
available.
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Shula Link <slink@gchrl.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
Jason Boyer [Thu, 22 Jul 2021 17:50:53 +0000 (13:50 -0400)]
LP1937299: Collections Exempt User Setting Repair
The collections exempt user setting was never added to the seed data
meaning that depending on the age of your database it may or may not
be there. Additionally, correct the label for this setting in the
user editor.
The method of playing audio alerts seems to not be working in modern browsers.
It seemed to work in firefox V40, but no longer in V68.
Adding the autoplay element and then immediately removing it prevents the audio
from playing. I've also noticed in the past that the audio had been cut off
before the file was fully played.
Using the .play() method does seem to work in newer versions of Firefox
and Chrome. Tested with Chrome V90 and Firefox V78.10.1esr.
Testing Plan:
1. Enable Self Check Audio Alerts Library Setting.
2. See the docs for setting up the default audio alerts.
https://docs.evergreen-ils.org/reorg/3.1/command_line_admin/_self_check_interface.html
3. Launch self check interface, create a workstation and try to trigger an alert.
https://eg-server.you.com/eg/circ/selfcheck/main
4. entering a fake barcode will trigger an alert which should not be audible.
Apply the fix:
1. Launch self check interface, and reload/clear cache.
2. Enter a fake barcode to trigger an audio alert.
3. The audio alert should now be audible.
Jane Sandberg [Wed, 14 Jul 2021 16:20:03 +0000 (09:20 -0700)]
LP1718782: follow up to fix failing test
LP1718782 added a missing fixed field, but failed to also add it to
the expected data in this pgtap test. This commit updates the
expected data to also include a SRCE fixed field.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Bill Erickson [Mon, 5 Jul 2021 20:04:56 +0000 (16:04 -0400)]
LP1910808 Staff catalog show call number
In the search results page, show the first call number for each record
(sorting by label sortkey) that is owned either by the user's preferred
library or the search library.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Jane Sandberg [Thu, 10 Sep 2020 18:35:22 +0000 (11:35 -0700)]
LP1718782: Add the Srce fixed field to the Angular MARC editor
To test:
1) Without using private browsing, open up a bibliographic record in
the Angular catalog MARC editor.
2) Notice that there is a gap between the ELvl and Audn fixed fields.
3) Apply this patch.
4) Open up the same bibliographic record, this time using private
browsing (since the Angular MARC editor caches fixed field values).
5) Notice that the Srce fixed field is available between the ELvl and
Audn fixed fields.
6) Notice that you can right click inside the fixed field to get a list
of three possible values.
7) Repeat the test with different record types (e.g. BKS, SCO, VIS)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Mary Llewellyn <mllewell@biblio.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Jane Sandberg [Sun, 10 Jan 2021 06:20:29 +0000 (22:20 -0800)]
LP1910891: Add new booking perms to appropriate groups
Steps to test:
1) Without this patch, create a reservation for a BR1 resource at BR1.
2) Log in as a circulator at BR1.
3) Go to Booking > Manage Reservations. Note that you can't see your reservation.
4) Run this upgrade script.
5) Repeat steps 2-3. Notice that you can now see the reservation.
6) Wipe your database and re-install it with the additions to the seed data
in this commit. Repeat steps 1-3 and notice that you can see the reservation
as expected.
Bill Erickson [Fri, 2 Jul 2021 20:57:40 +0000 (16:57 -0400)]
LP1908722 Staff catalog Show More Details
Adds a "Show More Details" (and "Show Fewer Details") buttons to the
Angualr staff catalog. Similar to the TPAC, activating the button means
more holdings details are displayed in the search results page.
Adds a new workstation setting type called
'eg.staff.catalog.results.show_more'
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Jane Sandberg [Tue, 2 Feb 2021 02:04:02 +0000 (18:04 -0800)]
LP1913221: Don't display blank course section number in OPAC
To test:
1) Use the Library Settings Editor to turn on the Course Materials
Module.
2) In Local administration, go to the course reserves list.
3) Add several courses, some with section numbers, others without.
4) In the OPAC, use the Course Search function to search for the courses
you just added.
5) Notice that the search results page has a place for section numbers,
whether or not the course has one.
6) Click into some of the courses. Notice that the course page also
includes a place for section numbers, whether or not the course has
one.
7) Apply this patch.
8) Repeat steps 4-6. Notice that the blank "section number" areas no
longer appear.
Garry Collum [Tue, 11 May 2021 19:43:34 +0000 (15:43 -0400)]
LP1928005 Bootstrap Opac: Current charges not aligned on mobile.
This patch removes the classes from the charges table that presents the table in a vertical format.
It wraps the table in a <div> that uses the table-responsive class.
To test add some charges to a patron record.
Bring that patron's account up in the opac and view the charges table in the smallest browser size
possible.
Notice that the table switches to a vertical format and the column names are mis-aligned.
Apply the patch.
View the table again. The table should now be horizontal with all of the columns correct.
Galen Charlton [Fri, 4 Jun 2021 20:17:33 +0000 (16:17 -0400)]
LP#1929136: (follow-up) reduce bounce time to 500ms
During testing, 500ms was enough to avoid excessive
PCRUD calls while still keeping the interface's display
of duplicate or missing barcode warnings responsive.
Jeff Davis [Thu, 20 May 2021 21:51:17 +0000 (14:51 -0700)]
LP#1929136: delay barcode lookup on change in holdings editor
In the Holdings Editor, any change to the barcode field results in an
immediate API call. Thus, if you type the barcode "123456789", you
would get 9 separate calls: 1, 12, 123, 1234, 12345 ...
This commit adds a 1000ms delay to avoid excessive pcrud calls when
typing a barcode.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Galen Charlton [Mon, 14 Jun 2021 15:34:51 +0000 (11:34 -0400)]
LP#1930933: fix issue with over-escaping in search results title attributes
This patch fixes an issue where a record with a title containing the
word "hidden" can have its title, ironically enough, not show up
on public catalog search results.
To test
-------
[1] Create an OPAC-visible record whose 245 is something like:
=245 04$aThe hidden one <script>alert('title!')</script>
[2] Search for the record in both the TPAC and Bootstrap skin. Note
that the title isn't displayed.
[3] Apply the patch and repeat step 2. This time, the full title
should be displayed.
[4] Verify that the OPAC does not display an alert box.
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Bill Erickson [Mon, 4 Jan 2021 21:12:50 +0000 (16:12 -0500)]
LP1910145 Angular Hold Detail Notes & Notifications
The hold detail view now displays hold notes and hold notification
records. Notes and Notifications may be created by staff. Notes may be
deleted by staff.
The catalog under the Holds tab in the Checkout interface
doesn't load the default search or preferred library if
you haven't visited the main catalog page earlier in the
session.
This branch sets these settings as cookies in the
AngularJS wrapper for the catalog embedded in the Checkout
interface under the Holds tab.
Test:
1. Close browser, open browser, log into Evergreen
2. Admin->Workstation set search & preferred library
3. Open a patron record -> Holds tab -> Place Holds
4. Search for an item owned by your preferred library
5. Note the library's copies aren't separately indicated
6. Apply patch and repeat steps 1-5
7. Note the library's copies are separately indicated
Jason Etheridge [Thu, 1 Oct 2020 15:45:44 +0000 (11:45 -0400)]
lp1895738 need eg.orgselect.hopeless.wide_holds
This fixes the following:
ERROR Error: Uncaught (in promise): No user or workstation setting type exists for: "eg.orgselect.hopeless.wide_holds".
Create a ws/user setting type or use setLocalItem() to store the value locally.
However, it exposes a different (harmless?) error within the /eg2 holds grid:
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value for 'ng-untouched': 'true'. Current value: 'false'.
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Jane Sandberg [Fri, 28 May 2021 02:32:27 +0000 (19:32 -0700)]
LP1922120: Add to carousel action in angular catalog
To test:
1) Create several manual carousels, and make sure they are
set to active.
2) Open a bib record in the Angular staff catalog.
3) Under Other Actions, choose the "Add to Carousel" action
4) Choose your preferred carousel.
5) Click Add to carousel.
6) Go back to carousel administration (or look at the carousel
itself), and confirm that the record has been added to the
carousel in question.
Bill Erickson [Thu, 28 Jan 2021 15:32:11 +0000 (10:32 -0500)]
LP1913338 Catalog search form visibility stickiness
On pages in the Angular staff catalog where the search form is collapsed
by default, users may now also manually expand and re-collapse the form.
The last used choice will be sticky via new workstation setting.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Gina Monti <gmonti@biblio.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Garry Collum [Fri, 30 Oct 2020 19:55:35 +0000 (15:55 -0400)]
lp1902302 Opac. SMS and Carriers appear in Edit Holds Regardless of OU Setting.
The SMS Number field and Default Carrier field display when editing an
individual hold in the opac, regardless of the 'Enable features that send SMS text messages' setting.
This patch rectifies that behavior.
To test.
Set the 'Enable features that send SMS text messages' to False.
Place a hold for a patron.
Login to the opac as that patron and view the holds.
Edit the hold, and notice that the SMS and Carrier fields are displayed.
Apply the patch.
Refresh the edit form. The fields no longer display.
Set the 'Enable features that send SMS text messages' to True.
Refresh the edit form. The fields now display.
Jason Boyer [Fri, 30 Oct 2020 20:06:17 +0000 (16:06 -0400)]
LP1901710: Properly nest HTML tags and TT2 directives
This is a first pass at cleaning these up and the W3C's
HTML validator is a lot happier about some of the pages,
but the advanced search page at least needs some TLC.
I'm having trouble getting the shelving location selector
to appear at all and the aria complaints will require more
fixing.
Garry Collum [Thu, 25 Feb 2021 21:02:50 +0000 (16:02 -0500)]
LP1916936-Bootstrap opac: item tags display as separate copies on small screen.
This fixes the display of item tags and item notes in the bootstrap opac.
It also cleans up some <a> tags that had class defined twice.
To test.
1. Add an item tag and an item note to an item.
2. In the bootstrap opac make the screen as small as possible.
Notice that the display shows the tags and items as copies.
3. Apply the patch and repeat. The tags and notes should be displayed with the item that they are associated with.
Garry Collum [Tue, 5 Jan 2021 21:26:55 +0000 (16:26 -0500)]
LP1910288 Bootstrap opac: E-items lines always display in account summary.
The E-item summary of ckos and holds always display in the My Account Summary of the Bootstrap Opac
regardless of the ebook_api.enabled flag in config.tt2. This fixes that issue.
It also sets both the ebook_api.enabled and ebok_api.ebook_test.enabled flags to default to false.
To test:
1. Set ebook_api.enabled in config.tt2 to false.
2. Look at a patron's account summary and notice that it displays the e-item lines.
3. Apply the patch.
4. The E-item lines are now suppressed.
Garry Collum [Thu, 18 Mar 2021 17:49:32 +0000 (13:49 -0400)]
LP1920042 Bootstrap Opac: Simple Selector in Advanced Search
Fixes the simple selector in advanced search.
To Test:
1. Go to Administration - Server Administration - MARC Coded Value Maps
2. Assign the 'Is Simple Selector' option to some record attributes.
In concerto:
Lang - French, German
Type - Musical Sound Recording
Are good choices to test searching.
3. Notice in advanced search that these options no longer appear in the
Language or Item Type search filters.
4. Apply the patch.
5. The simple selector options should now appear at the top of each search
filter category.
6. Perform some searches using the simple selector options.
Jeff Davis [Mon, 26 Apr 2021 21:33:51 +0000 (14:33 -0700)]
LP#1923225: clean up some double-escaping of HTML in record display
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
LP#1923225: have search highlighting stored procedure do HTML-escaping
This patch builds on the previous work to have the stored procedures
that produced highlighted and unhighlighted versions of display
attributes HTML-escape the source values, then adjusts the TPAC
and Bootstrap templates to avoid double-escaping.
Dan Briem [Thu, 20 May 2021 17:05:21 +0000 (13:05 -0400)]
LP#1928684 Catalog view holds tab sort by patron barcode error
This changes the Patron Barcode column name to ucard_barcode to
match the field name in the database.
Note: due to the name change, users who saved the column on the
grid will have to add it again.
To test:
1. Go to the View Holds tab on a record that has hold requests
2. Add the Patron Barcode column to the grid
3. Sort by the barcode column and note that it works
4. It's a good idea to test that the grid settings save properly