Galen Charlton [Tue, 15 Dec 2020 23:07:00 +0000 (18:07 -0500)]
lp1863252 toward geosort
* fix swap of lat/lon that broke Math::Trig-based distance calculations
TODO: might want to drop that entirely in favor of delegating to a DB
call that uses earthdistance
* first pass at implementing display of distance in the OPAC
* include "Distance" label on mobile view of copy table
* display warning if address input is not translated to coordinates
* add distance column to TPAC copy table
* add default item sort button to both TPAC and Bootstrap
* changes to open-ils.geo registration
- don't register with the public router
- add to param redaction list
* add temporary caching of address => coordinates results
By default, coordinates are cached in memcached for 5 minutes. The
cache key is derived from a SHA-2 hash of the input address.
* implement query parameter log redaction as a PerLogHandler
* Don't need perl-script for a PerlLogHandler
Jason Etheridge [Thu, 3 Dec 2020 15:08:44 +0000 (10:08 -0500)]
lp1863252 toward geosort
From the release notes:
Sort Holdings by Geographical Proximity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This functionality integrates 3rd party geographic lookup services to allow patrons
to enter an address on the record details page in the OPAC and sort the holdings
for that record based on proximity of their circulating libraries to the entered
address. To support this, latitude and longitude coordinates may be associated with
each org unit. Care is given to not log or leak patron provided addresses or the
context in which they are used.
squashed commits:
* actor.org_address
* config.geolocation_service
* config.global_flag
* opac.holdings_sort_by_geographic_proximity OUS
* opac.geographic_proximity_in_miles OUS
* opac.geographic_location_service_for_address
* permission.perm_list
* Geo.pm, opensrf*.xml, ils_events.xml
* Org Unit Configuration
* OPAC Record Details
* release notes
* remove base_url
* provide an open-ils.actor wrapper for open-ils.geo.retrieve_coordinates
* some error trapping
This will throw the GEOCODING_LOCATION_NOT_FOUND event for a wider range of problems.
With the Google service, you can test by providing a bad API key or sending the
copyright symbol as an address to lookup.
* distribute permissions to stock perm groups
* prerequisite cpan modules
* live_t/ tests
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
This commit causes the record detail copy table to be restricted to
lasso orgs of the user-selected lasso. The copy and hold summary
information is still making use of the last context org selected, but
it's unclear how to adjust those because they are (currently) strictly
hierarchical via the org tree.
This commit adds logic to the org selector (and backing context building
logic) to allow the library dropdown to render Library Groups in a way
mechanically similar to location groups. This is used in the basic
search interface to simplify the Library Group feature.
The advanced search interface still uses separate Library and Where
dropdowns, as this allows advance search to retain the depth selection
capability, and more directly shows the (real) relationship between a
library and the location groups, library groups, and depths that are
relevant to it.
This branch implements Library Groups (what used to be called "lassos") for
Evergreen.
Evergreen has, internally, a concept called "lassos" that allows an
administrator to define a group of org units to search that has no relation
to the hierarchical org tree. For instance, one might create a group of law
or science libraries within a university consortium, or group all school
libraries together.
In addition to the previous always-visible type of Library Group (lasso), one
can now make them context-aware so that that only show up if the current
search location is included as one of the org units in the Library Group.
This is implemented without regard to the org unit hierarchy, and so requires
that the relevant ancestor and descendent org units be included in the group
along with those that actually hold copies, but allows for complete
flexibility in context-aware Library Group configuration.
Galen Charlton [Wed, 10 Mar 2021 22:48:08 +0000 (17:48 -0500)]
LP#1918511: make the Bootstrap skin the default for the public catalog
To test
-------
[1] Perform a fresh installation of Evergreen, or at least
put in the updated eg_vhost.conf.
[2] Verify that the public catalog is using the Bootstrap skin.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Jane Sandberg [Sat, 23 Jan 2021 00:33:15 +0000 (16:33 -0800)]
LP1907977: Display course name and number in course material editor
To test:
1) Go to Administration > Local > Course List
2) Make sure you have a variety of courses added.
3) Double click on a course that already has materials
attached to it.
4) Go to the materials tab.
5) Select a material and choose Edit
6) Note that the Course combobox shows both the course
number (HST243) and course name (History of Indonesia).
7) Note that you can blank out that field and type to
complete to get other courses in the same format.
- restrict the attribute reingest just to records whose item_type
is 'g'
- don't break the transaction if a composite attribute definition
whose coded_value is 1738 already exists
Jane Sandberg [Fri, 5 Mar 2021 03:28:05 +0000 (19:28 -0800)]
LP1917826: Add All Videos option to the Search Format dropdown
To test:
1) Make sure that you have not added an "All Videos" option or a
config.coded_value_map with ID=1738 to the system you are testing
on.
2) Run the upgrade script, including the reingest.
3) Open the OPAC.
4) Perform a basic search using Format="All Videos".
5) Make sure that all the videos you expect show up, and no non-videos
appear in the results.
6) Try building the database from scratch, using the seed data from this
branch
7) Repeat steps 3-5.
Kyle Huckins [Thu, 19 Mar 2020 23:04:29 +0000 (23:04 +0000)]
lp1861319 Expired Patron Item Renewal
- SQL Upgrade for the new Org Unit Setting
- Perl Constant for new Org Unit Setting
- Include YAOUS to allow/disallow renewal of items
to expired patrons
Signed-off-by: Kyle Huckins <khuckins@catalyte.io> Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: John Amundson <jamundson@cwmars.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Wed, 23 Sep 2020 15:45:42 +0000 (11:45 -0400)]
LP1865898 Missing pieces mult-scan work flow improvements
After an item is marked as missing pieces, select/focus the barcode
input so another item can easily be marked as missing pieces without
having to manually clear the form / reload the page.
Tweaks the "Cancel" button to use the text "Reset Form" once the current
item has been processed, since it can no longer be canceled, but the
form can be forceably cleared if desired.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Mike Risher <mrisher@catalyte.io> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Mon, 2 Mar 2020 19:17:55 +0000 (14:17 -0500)]
LP1865898 Scan Item as Missing Pieces Angular Port
Port the 'Scan Item As Missing Pieces' staff client interface to
Angular. Interface displays additional data (title/author/callnum)
during the staff confirmation step.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Mike Risher <mrisher@catalyte.io> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Mike Risher [Mon, 2 Dec 2019 20:38:15 +0000 (20:38 +0000)]
lp1852321 Angular Shelving Location Groups UI Port
Port Shelving Location Groups interface from DOJO to Angular. Features
ported include creating and editing Location Groups, dragging and dropping
Location Groups to change their saved order, adding and removing
Group Entgries, and sorting Shelving Locations in the same order as the old
interface.
Signed-off-by: Mike Risher <mrisher@catalyte.io> Signed-off-by: Jennifer Weston <jennifer.weston@equinoxinitiative.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
This feature allows staff to add multiple users to a named hold group
bucket and place title-level holds for a record for that entire set of users.
Users can be added to such a hold group bucket from either the patron
search result interface, via the Add to Bucket dropdown, or through a dedicated
Hold Groups interface available from the Circulation menu. Adding new
patrons to a hold group bucket will require staff have the PLACE_HOLD
permission.
Holds can be placed for the users in a hold group bucket either directly from
the normal staff-place hold interface in the embedded OPAC, or by supplying the
record ID within the hold group bucket interface. In the latter case, the
list of users for which a hold was attempted but failed to be placed can be
downloaded by staff in order to address any placement issues. Placing a
hold group bucket hold will requires staff have the MANAGE_HOLD_GROUPS
permission, which is new with this development.
In the event of a mistaken hold group hold, staff with the
MANAGE_HOLD_GROUPS permission will have the ability to cancel all unfulfilled
holds created as part of a hold group hold event.
A link to the title's hold interface is available from the list of hold group
hold events in the dedicated hold group hold interface.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Dawn Dale <ddale@georgialibraries.org> Signed-off-by: Chauncey Montgomery <chauncey@yourcl.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
This is a shot term change intended to prevent the "I don't know how
to filter" default message from showing up when the datatype 'interval'
is filtered.
Jason Boyer [Tue, 9 Feb 2021 18:06:32 +0000 (13:06 -0500)]
LP1895679: Simplify and genericize the refund policy
Don't refrence the "email above" since that's not always
the case and simplify the languge slightly, though most
users will still likely want to customize it.
OPTIONS:
--get-token
Generate OverDrive API basic token.
--key
Client key supplied by OverDrive. Required with --get-token.
--secret
Client secret supplied by OverDrive. Required with --get-token.
--token
Your OverDrive API basic token (clientKey:clientSecret, Base64-encoded).
Required unless using --get-token.
--account
Your OverDrive API account ID (e.g. 1234). Not required for generating
a basic token; required for everything else.
--oauth-endpoint
OverDrive API endpoint for OAuth token requests.
Default: https://oauth.overdrive.com/token.
--endpoint
OverDrive API endpoint that you wish to test.
Default: https://api.overdrive.com/v1/libraries/<account>
--content
JSON content of main API request. Required only if you have specified
an endpoint that expects JSON message content.
--oauth-only
Only request an OAuth token; do not attempt further API requests.
--patron-auth
Submit a patron authentication request.
--barcode
Patron barcode. Required with --patron-auth.
--password
Patron password. Required with --patron-auth if your library requires
password for patron authentication.
--websiteid
Website ID supplied by OverDrive. Required with --patron-auth.
--authorizationname
ILS name supplied by OverDrive. Required with --patron-auth.
--verbose
Print full HTTP requests and responses.
--help
Print this help message.
EXAMPLES:
To generate your basic token, given a client key and client secret supplied
by OverDrive:
Somewhere along the way, openils_dojo.js was removed,
but references remained. This removes them, hopefully
helping to speed up page loads.
Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jason@sigio.com>
Mike Risher [Thu, 22 Oct 2020 20:19:51 +0000 (20:19 +0000)]
LP1843969 Composite Attribute Entry Defs
Create a port of the Coded Value Maps UI from Angular JS to
Angular. Allow creation and edits of the Composite Attribute
Entry Definitions.
Signed-off-by: Mike Risher <mrisher@catalyte.io> Signed-off-by: Jason Boyer <boyer.jason@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
This commit adds Shibboleth integration to Evergreen for use in the
OPAC. Using Shibboleth, libraries can authenticate patrons against a
wide variety of 3rd party services, using many different protocols and
standards.
Several settings control if, when and how to make use of the Shibboleth
integration:
* Enable Shibboleth SSO for the OPAC
- The main on/off switch.
* Allow both Shibboleth and native OPAC authentication
- By default only one or the other will be allowed. This enables both
native and Shibboleth login.
* Log out of the Shibboleth IdP
- If supported by the IdP configured for use on the other side of
Shibboleth, this tells Evergreen to tell Shibboleth to log out of
the IdP on Evergreen logout.
* Shibboleth SSO Entity ID
- If multiple IdPs are configured for Shibboleth, and available to a
particular hostname, this setting defines the one to use for a
given context org unit.
* Evergreen SSO matchpoint
- The Evergreen-side user field to use when looking up the patron
after successful SSO login.
* Shibboleth SSO matchpoint
- The Shibboleth-side field, defined in the attribute map, that
contains the IdP user identifier value used to look up the Evergreen
patron.
Two apache sesttings control how Evergreen interacts with Shibboeth:
* SetEnv sso_loc XXX, which acts in a way analogous to the physical_loc
environment variable to define the context OU for SSO settings.
* ShibRequestSetting applicationId XXX, which helps Shibboleth identify
the correct set of entity ID and attribute mapping configuration.
Additional Shibboleth-focused documentation and examples will be
provided for system administrators.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Christine Burns <christine.burns@bc.libraries.coop> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Terran McCanna [Thu, 25 Feb 2021 14:58:23 +0000 (09:58 -0500)]
LP#1916904 Bootstrap OPAC: Call number on Search Results Page
This adds the call number to the search results page when
"Show More Details" is not selected. (This brings back the same
behavior as the pre-bootstrap OPAC.)
In the record bucket administration UI, the act of adding or removing
items from a bucket are now done in batch to avoid too many parallel
requests.
These changes include new batch create/delete API calls that can operate
on any bucket type, so other UI's can be similarly batched as needed.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Terran McCanna [Fri, 19 Feb 2021 00:37:35 +0000 (19:37 -0500)]
LP1916085 Bootstrap OPAC - Pagination on copy table
This adjusts some of the display logic in the Bootstrap OPAC
copy table pagination that had been causing the Next / Prev and
Show Fewer Copies links to be hidden when they shouldn't be.
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Mike Risher [Thu, 7 Jan 2021 19:55:45 +0000 (19:55 +0000)]
LP1871510 Update Interface Titles
Update titles on several local admin interfaces so that they match the page listing all Local Admin interfaces.
Signed-off-by: Mike Risher <mrisher@catalyte.io> Signed-off-by: Jennifer Pringle <jennifer.pringle@bc.libraries.coop> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
When the authtoken received from the client is the unquoted literal
string "null" in a pcrud request, the drone processing the request
will crash with a segmentation fault as the session verification code
passes a NULL pointer to strcmp.
To reproduce this bug, make the following request via srfsh:
After patching Evergreen with this commit, repeat the srfsh request
again. This time, the call should return almost immediately with an
osrfMethodException: "permacrud received a bad auth token: (null)."
When you grep syslog for segfault this time, you should find no new
occurrences.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jason Stephenson <jason@sigio.com>
Bill Erickson [Tue, 9 Feb 2021 16:10:41 +0000 (11:10 -0500)]
LP1908743 Hold pickup lib does not require have-users; repairs
To match the TPAC, only disable org units where can_have_vols is false
in the hold pickup library selector (plus those explicitly disabled via
setting).
Also fixes a thinko in the settings retrieval code.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Bill Erickson [Mon, 11 Jan 2021 19:15:33 +0000 (14:15 -0500)]
LP1908743 Staff catalog honors org-not-pickup-lib
In the Angular staff catalog, disable org units in the pickup library
selector that have the 'opac.holds.org_unit_not_pickup_lib' org unit
setting applied, plus those that have false values for can-have-users or
can-have-vols.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Mike Rylander [Fri, 14 Aug 2020 19:35:10 +0000 (15:35 -0400)]
LP#1858114: Fix thinko in template-parameter collection
Minor thinko in the use of Array.prototype.concat() when gathering the
"where" and "having" template parameters -- concat() does not alter the
array it is called on, so we need to assign the result back to the
array.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Angela Kilsdonk <akilsdonk@equinoxinitiative.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Mike Rylander [Fri, 14 Aug 2020 14:35:06 +0000 (10:35 -0400)]
LP#1858114: Record template filter values for aggregate columns
Currently the "having" clause does not record template-level filter
values in the template, but forces use of a report-level parameter.
This commit allows "having" to receive a value in the same way that
"where" does.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Angela Kilsdonk <akilsdonk@equinoxinitiative.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Mike Rylander [Thu, 13 Aug 2020 17:05:19 +0000 (13:05 -0400)]
LP#1858114: Present proper input widget for aggregate parameters
There's currently logic to override the filter widget for all columns
that have a selector defined, such as the ID column of many tables. When
we transform the column with an aggregate transform, though, we don't want
to pick a particular selector-labeled value.
While I can imagine using a min or max aggregate to get a representative
value for a group, when other dependent filters would make the value
stable or where the value in particular doesn't matter but isn't needed
in a count (say), all the other aggregate transforms that are currently
supported are specifically numeric (sum, average, count, and
count_distinct). Because of that, and the most likely use case of
matching a count to "0" or "1", we should only present the "remote
object widget" for non-aggregates, and just use the baseline text string
input here.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Angela Kilsdonk <akilsdonk@equinoxinitiative.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Previous to this commit, the item display order for carousels was
undefined. Now, ordering is stable and predictable.
For Newly Cataloged Item and Newest Items by Shelving Location
carousels, the order is from most recently cataloged to least
recently cataloged.
For Recently Returned Item carousels, the order is from most recently
returned to least recently returned.
For Top Circulated Items carousels, the order is from most circulated
to least circulated.
For Manual carousels (as of now, without the ability to adjust the
Position of items) it is the order they are added to the backing bucket.
Thus emptying and refilling the bucket allows reordering.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Mike Rylander [Thu, 30 Jul 2020 15:48:46 +0000 (11:48 -0400)]
LP#1772955: Only include xacts with balance in summary
This commit adds a new view and IDL definition that shows the total
owed/paid/balance for transactions that have a balance other than 0.
This new view is used in the patron summary bar, and access is provided
wherever the all-open-transactions version is available in case we want
to move to the new one elsewhere.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Ruth Frasur <rfrasur@library.in.gov> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Zavier Banks [Thu, 5 Mar 2020 16:19:49 +0000 (16:19 +0000)]
LP1670457 Action Menu Grid Selection Change
I reworked the grid to disable certain actions, if
an item was needed. However, if there were actions, were
there was no item needed, they would still be available.
Bill Erickson [Mon, 14 Sep 2020 14:52:05 +0000 (10:52 -0400)]
LP1468132 MARC search honors search scope
Adds a 'Results from All Libraries' checkbox to the MARC search form in
the Angular staff catalog. When unchecked, the MARC search will limit
to results with holdings in the search scope.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Bill Erickson [Mon, 14 Sep 2020 15:33:45 +0000 (11:33 -0400)]
LP1468132 Staff MARC Search API supports copy filtering
Teaches the MARC search code to filter results on records with items
attached (though not necessarily opac-visible) for scoped staff
searches. Prior to this patch, the scope of staff searches was
effectively ignored.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
Jason Boyer [Mon, 8 Feb 2021 19:20:32 +0000 (14:20 -0500)]
LP1914116: Apply html filter to mkurl() output
Because of the way that mkurl() generates its query parameters they're
generally escaped correctly, but nowhere do we run the output of mkurl()
through the html filter to correctly handle ampersands. Rather than adding
"|html" to every invocation of mkurl, it's just added to the macro directly.
Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org> Signed-off-by: Garry Collum <gcollum@gmail.com>
Galen Charlton [Thu, 10 Dec 2020 22:23:47 +0000 (17:23 -0500)]
LP#1474029: teach Evergreen how to prevent expired staff from logging in
This patch adds the ability to prevent staff users whose
accounts have expired from logging in. This is controlled
by the new global flag "auth.block_expired_staff_login", which
is not enabled by default. If that flag is turned on, accounts
that have the `STAFF_LOGIN` permission and whose expiration date
is in the past are prevented from logging into any Evergreen
interface, including the staff client, the public catalog, and SIP2.
It should be noted that ordinary patrons are allowed to log into
the public catalog if their circulation privileges have expired. This
feature prevents expired staff users from logging into the public catalog
(and all other Evergreen interfaces and APIs) outright in order to
prevent them from getting into the staff interface anyway by
creative use of Evergreen's authentication APIs.
Evergreen admins are advised to check the expiration status of staff
accounts before turning on the global flag, as otherwise it is
possible to lock staff users out unexpectedly.
Bill Erickson [Wed, 9 Dec 2020 19:04:52 +0000 (14:04 -0500)]
LP1907115 MARC editor avoid ID collisions
Generate DOM IDs for editable content components via incrementing int
instead of a random int. This addresses cases where records with higher
numbers of MARC fields could result id DOM ID collisions, leading to
empty subfield values.
Also remove use of Renderer2, which is considered harmful and overkill
for simple document.getElementById()-equivalent calls.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Bill Erickson [Mon, 7 Dec 2020 18:28:56 +0000 (10:28 -0800)]
LP1907115 MARC editor correctly absorbs breaker changes
MARC editor now correctly extracts MARC field data from the new
underlying MARC record when it is changed as a result of a breaker text
change and re-absorb.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Elaine Hardy <ehardy@georgialibraries.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Lp 1913219: Use window.open for staff catalog edit link
To avoid the "Scripts may close only the windows that were opened by
them" console message in Chrome 88, and a similar message in Firefox
84, when clicking "Save & Exit" in the Volume/Copy editor of the
AngularJS staff client after opening it via the "edit" link in the
copy table of the TT OPAC record summary, we use an onclick handler
with window.open instead of a standard href in the edit anchor.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Since the OpenSRF Java libraries no longer build and are out of date
with the latest OpenSRF changes, this commit removes the remaining
Java code and build steps from Evergreen as it is now useless.
Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>