Galen Charlton [Mon, 23 May 2022 23:06:48 +0000 (19:06 -0400)]
LP#1930617: reduce parallel requests initiated by AngularJS holdings editor
This patch decreases the number of parallel requests spawned by the
AngularJS holdings editor. This can reduce load on open-ils.pcrud when
the editor is used to handle a large number of items in one batch.
This patch takes the following approaches:
- the fetching of call number affixes now only makes one request
per relevant org unit
- item alerts are now retrieved via fleshing when the batch of items
is requested (as opposed to doing a PCRUD request for each copy)
- fetching monograph parts is now done serially
To test
-------
[1] Apply the patch.
[2] Create a bucket with a few hundred items and edit all of them
in the AngularJS holdings editor (which is what you get when
you edit items from the bucket interface).
[3] Verify that the editing loads itself without causing errors
or PCRUD drone spikes.
[4] Verify that item alerts and monograph parts are loaded
[5] Verify that the call number prefix and suffix drop-downs
are correctly populated.
[6] Verify that copy alerts can be attached to newly-created items
and saved.
This commit adds a new internal flag, auto-created at the time of need,
to control whether record ingest will cause immediate updates to the
symspell dictionary, or if those updates will simply be recorded for
later incorporation. Inline symspell dictionary updates can cause
record updates to be logically serialized, impacting the preformance of
other tools used for batch reingest.
pingest.pl is changed to allow an administrator to make use of this
feature via the --delay-symspell command line flag.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Fri, 4 Mar 2022 15:38:12 +0000 (10:38 -0500)]
LP#1931737: DYM can cause deadlocks w/ parallel ingest
This patch causes all symspell dictionary updates to occur at then end
of metabib search field updates in one go, which allows Postgres' INSERT
... ON CONFLICT mechanism to properly lock and serialize changes when
necessary.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Jane Sandberg <js7389@princeton.edu> Signed-off-by: Jason Stephenson <jason@sigio.com>
This commit adds a new internal flag, auto-created at the time of need,
to control whether record ingest will cause immediate updates to the
symspell dictionary, or if those updates will simply be recorded for
later incorporation. Inline symspell dictionary updates can cause
record updates to be logically serialized, impacting the preformance of
other tools used for batch reingest.
pingest.pl is changed to allow an administrator to make use of this
feature via the --delay-symspell command line flag.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mike Rylander [Mon, 7 Jun 2021 19:57:32 +0000 (15:57 -0400)]
LP#1931162: DYM needs some situational optimization
For some data sets and some queries the Did You Mean search suggestion
logic can be much too slow. This is mainly in cases where a "misspelled"
word of sufficient length greater than the symspell prefix length is
checked against many short prefixes that have many long suggestions
attached to them.
This commit optimizes for that case in particular by testing the length
of suggestions and prefix keys against the user input to avoid
unnecessary tests. Futher, it captures the edit distance of suggestions
that pass that test in-line, avoiding expensive retesting, and caches
the short-cutoff edit distance when in low-verbosity mode to avoid
future different-but-not-too-different suggestions coming from the same
prefix key.
It additionally provides a general optimization by batching the capture
of suggest counts to avoid per-suggestion secondary lookups, and a
micro-optimization of ordering suggestions by length at distance cache
time.
Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Shula Link <slink@gchrl.org>
Adds the patron's database id to the info being passed to Stripe
so that payments that Stripe collected that didn't get registered
in Evergreen can be more easily tracked down.
Bill Erickson [Tue, 19 Apr 2022 17:27:17 +0000 (13:27 -0400)]
LP1956626 Copy editor loads all needed copy locations
The item-location-select component now allows the caller to pass in a
set of context org unit IDs (in lieu of just a single id) for loading
copy locations across different areas of the org unit tree (without
having to load *all* copy locations).
Changes applied to the Angular copy location editor to pass the needed
context org units to the item location select component.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Terran McCanna [Mon, 31 Jan 2022 19:29:16 +0000 (14:29 -0500)]
LP1958265 Angular Holds Grids Not Printing Barcode
This adds the ability to print (or download CSV) the Current Item
and Requested Item barcodes from the Holds Pull List and from the
Holds tab of the bib record.
Jeff Godin [Fri, 28 Jan 2022 22:54:38 +0000 (17:54 -0500)]
Avoid fleshing standing penalty org unit children
When fleshing the org unit on standing penalties, exclude child org
units. We don't need them, and they can cause issues when your
standing penalty has a Depth of "Everywhere": you end up with a full
copy of the org unit tree, and you will include this when editing
and saving the user.
Garry Collum [Tue, 16 Nov 2021 18:43:17 +0000 (13:43 -0500)]
LP1838580: Holds Shelf detail view record summary doesn't populate
Fixes the record summary of the detail view from the holds shelf. After
the patch is applied the bibliographic data displays in the detail view.
To test:
1. Go to Holds Shelf
2. Select a line
3. Click on the Detail View button, and notice that the bibliographic
information doesn't populate.
4. Click on the MARC link, to see to that the link does not take you to the
MARC view.
5. Apply patch.
6. Repeat 1-4. The bibliographic information now displays, and the MARC link
takes you to the correct page.
Bill Erickson [Fri, 3 Dec 2021 18:27:01 +0000 (13:27 -0500)]
LP1951162 Migrate copy templates setting
Rename the user setting "webstaff.cat.copy.templates" to
"cat.copy.templates" and migrate any existing values. This operation is
not performed for any databases where a "cat.copy.templates" user or
workstation setting type already exists.
Teach the Angular copy editor to avoid looking up templates in local
storage, since only XUL templates are stored there, which are not
compatible.
Galen Charlton [Tue, 9 Nov 2021 23:22:07 +0000 (18:22 -0500)]
LP#1950394: isolate attribute extraction of metarecord
This patch ensures that calling the Template Toolkit block
get_marc_attrs() on the metarecord's lead record's MARCXML
does not interfere with attributes already parsed from the
current bib's MARCXML on the record summary page in the Bootstrap
OPAC.
This fixes an issue where electronic resource links could fail to
be displayed under the following conditions:
- the MARC record has an 856 field with ind1 = 4 and ind2 = 0 or 1
and is NOT a located URI
- the bib is part of a metarecord set with at least one other member
- the master record in the metarecord set does not have 856 fields
To test
-------
[1] Create a setup where two bibs are in the same metarecord set, one
with 856 fields and one without. Arrange that the one without
856 fields is the lead record in the metarecord.
[2] View the one that has 856 fields in the Bootstrap OPAC's record
summary page. Note that the electronic resource links do not
appear.
[3] Apply the patch and repeat step 2. This time, the links should
appear.
Fixes the barcode search in the patron search modal in the holds screen.
To test:
1. Navigate to the 'place a hold' screen in a bib record and open
the patron search modal.
2. Enter a patron barcode.
3. The search for the patron fails.
4. Apply the patch and repeat.
Galen Charlton [Wed, 10 Nov 2021 15:06:36 +0000 (10:06 -0500)]
LP#1950468: make Replace Barcode from Item Status detect duplicate barcodes
This patch makes the Replace Barcode action when invoked from
Item Status properly detect and warn if the replacement barcode
is a duplicate of one already found in the system. This is a complement
to the fix for bug 1890498.
To test
-------
[1] Enter an item barcode into Item Status.
[2] Try 'Replace Barcode' from detail view and set the
replacement barcode to one that is already active in
Evergreen. Note that the dialog closes without
updating the barcode or warning about the duplicate and
that a error is logged in the browser console.
[3] Repeat step 2, but this time from list view. Note
the problem remains the same.
[4] Apply the patch and repeat steps 2 and 3. Note that
now the dialog will remain open and will display an
error message complaining about the duplicate barcode.
Galen Charlton [Thu, 11 Nov 2021 16:21:11 +0000 (11:21 -0500)]
LP#1949910: serialize deleting items from item bucket
This patch serializes the fetching and fleshing of items to delete
when the delete-from-item-bucket action is invoked, thereby
avoiding possible drone starvation from open-ils.search. It
also throws up the progress dialog for good measure while
the deletion occurs.
To test
-------
[1] Set up an item bucket with 25-50 items.
[2] From the item bucket intervace, invoke the action to delete
all of the items.
[3] Note that the open-ils.search.asset.copy.fleshed2.retrieve calls,
one for each item, are all made simultaneously. Assuming stock
max_children settings, this will cause open-ils.search to log
that some requests are hitting the backlog.
[4] Apply the patch and refresh the item bucket page, then repeat
step 2 (it doesn't matter for this purpose that the items have
already been deleted). This time, the open-ils.search API calls
are made serially and a progress bar is displayed while the
deletion takes place. Verify that no requests hit the backlog.
Terran McCanna [Fri, 12 Nov 2021 22:10:51 +0000 (17:10 -0500)]
PINES Custom - Make buttons on hold cancel dialogs consistent
This makes the order and wording of the AngularJS and Angular cancel hold
options consistent between the patron account and the hopeless holds interface.
This adds a new link in the carousel block that will open the
contents of that carousel in a result list format so that a patron
can see everything at once.