This patch adds a keydown event listener onto the flatpickr instance and
looks for the down arrow key. When such an event is detected we take
that to mean the user wants to keyboard navigate the calendar widget and
so disable the buggy allowInput option allowing keyboard navigation to
work as expected.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 31 Aug 2021 19:23:21 +0000 (19:23 +0000)]
Bug 28937: Use Flatpickr on circulation and patron pages
This patch replaces the use of jQueryUI's datepicker on circulation and
patron-related pages.
The patch modifies Flatpickr's default configuration (in calendar.inc)
so that it has the following features:
- A Flatpickr input with a "futuredate" class will require that the
selected date be after today.
- The Flatpickr input field will be wrapped in a container to
facilitate better CSS styling.
- Generic handling of paired date fields is enabled using
".flatpickrfrom" and ".flatpickrto" field classes. This mimics the
same feature we have for jQueryUI datepickers using ".datepickerfrom"
and ".datepickerto".
This patch also removes an unused function which was repeated in three
templates: validate1.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Go to Circulation and check out to a patron.
- Open the Restrictions tab and click "Add manual restriction."
- In the "Expiration" field, test that the Flatpickr widget works
correctly and limits to dates after today.
- Enable the SpecifyDueDate preference if necessary.
- Test the behavior of the SpecifyDueDate controls: Setting a date,
clearing a date, session persistence.
- Enable the SuspendHoldsIntranet system preference if necessary.
- Check out to a patron with existing holds.
- Open the Holds tab and click the "Suspend" button for one of the
holds.
- In the modal window which appears, check that the Flatpickr
widget works correctly and limits to dates after today.
- At the bottom of the table of holds, test that the "Suspend all
holds" Flatpickr works correctly and limits to dates after
today.
- Perform this same test from the patron details page.
- Enable the BatchCheckouts system preference if necessary.
- Open a patron record and click "Batch check out" in the left-hand
sidebar menu.
- Test that the "Hard due date" Flatpickr works correctly as a date
and time picker.
- Go to Circulation -> Overdues.
- Test that the date due filters in the sidebar work correctly and
are linked, e.g. the "to" field cannot be before the "from" field.
- Perform the same test here: Circulation -> Holds to pull; and
here: Circulation -> Hold ratios.
- Enable the HouseboundModule system preference if necessary.
- Check out to or view details of a patron.
- Click "Housebound" in the sidebar menu.
- Save delivery day and frequency settings for that patron.
- Click "Add a new delivery."
- Test that the "Date" Flatpickr widget works correctly.
- Go to Patrons -> A patron record -> Edit.
- Test that Flatpickr widgets work on the following fields:
- Date of birth
- Registration date & Expiration date (linked).
- Patron restrictions -> Add manual restriction -> Expiration.
- View a bibliographic record and start the process of placing a hold.
- After selecting a patron, test the "Hold starts on" and "Hold
expires on" date fields. The fields should be linked and each
should limit to future dates.
- Confirm that the dates are saved correctly when you submit the
hold.
- Locate a bibliographic record with multiple holds and view the holds.
- In the table of holds, test each date field: Date, expiration, and
suspend-until.
- Test that Flatpickr's static "formatDate" method is working
correctly:
- Locate a bibliographic record's item so that there is text in both
the "Public note" and "Non-public note" field.
- Check that item out to a patron.
- After the page reloads the public and non-public notes should be
shown under the checkout title highlighted in red.
- Check for references to a "validate1" function. There should be none.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Tue, 31 Aug 2021 20:36:37 +0000 (20:36 +0000)]
Bug 28933: Add subscription class to each subscription in opac-detail
To Test:
1. Go to a record with some subscriptions, have some closed and some
open.
2. Go to the opac-detail page, click on the subscription tab and use
your developer tools to inscept the element.
3. Notice the hierarchy of HTML structure, everything is a sibling of
the next.
4. Apply patch
5. Reload the same opac-detail page and again inscept the element.
6. Now every individual subscription should be wrapped in an element
with the class name of 'subscription'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 15 Sep 2021 17:40:19 +0000 (17:40 +0000)]
Bug 29030: Make authorized value and description fields required
This patch modifies the markup of the "Create a new authorized value"
modal so that a minimum set of fields is required: Authorized value and
description.
The patch also modifies the JavaScript which handles the submission so
that the jQuery Validation plugin can handle the field checks.
The spelling "authorised" is changed to "authorized" following coding
guidelines.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Locate a record in the catalog which has items and open an item for
editing.
- In the add item form, test the process of adding an authorized
value on the fly with the following fields: Withdrawn, Lost,
Damaged, Use restrictions, Not for loan, Collection code, Shelving
location, and Shelving control number.
- In each case you should be able to type a new value in the
dropdown's search box and be shown the option "Select to create."
- Selecting should trigger a modal window, "Create a new authorized
value."
- Test that both "Authorized value" and "Description" fields are
required, and the form can't be submitted without them.
- Test that an error message shows up when you submit an authorized
value which already exists, e.g. authval "1" for "DAMAGED."
- After triggering this error, click the "Cancel" button and try
creating another new authorized value. When the modal reopens the
form should be reset: No previously-entered data, no error messages.
- Submitting a valid form with a new authorized value should work
correctly. The modal window should close automatically.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 6 Aug 2021 18:50:35 +0000 (18:50 +0000)]
Bug 28826: Add FacetOrder system preference
This bug adds a system preference to control ordering of facets and
adds the control to both Zebra and Elasticsearch
To test:
1 - Have a koha that can use both Zebra and ES
2 - Set 'displayFacetCount' to true
3 - Search in ES and Zebra
4 - Note facets in Zebra sorted alphabetically, ES by usage
5 - Apply patch, updatedatabase
6 - Search in ES and Zebra, facets are alphabetically sorted in both
7 - Find new syspref FacetOrder and set to 'by usage'
8 - Search in both engines, facets sorted by usage
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t
The biblio and item action hooks pass a biblionumber or itemnumber now
to the plugin at time of deletion.
This patch adds a tiny refinement to Biblio_and_Items_plugin_hooks.t
and the associated test plugin to be sure of that.
Test plan:
Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Alex Arnaud [Thu, 22 Jul 2021 11:45:15 +0000 (11:45 +0000)]
Bug 28484: ES clean title in biblio detail
Test plan:
- Create a biblio with title like "osteuropa:" or "osteuropa!"
- Go the this biblio detail pages (cgi-bin/koha/catalogue/detail.pl)
=> Error
- Apply bug 28316 and this one
- test again
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 23 Sep 2021 11:54:43 +0000 (11:54 +0000)]
Bug 29091: Correct display of lists and tags on search results
This patch makes a minor change to CSS to fix the display of tags and
lists on the OPAC search results page so that the list doesn't have
extra padding.
To test, apply the patch and rebuild the OPAC SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- To test you should be able to perform a catalog search in the OPAC
which will return results which have one or more tags and which are on
one or more lists.
- In the OPAC search results, confirm that there isn't extra padding
between the "Tags:" and "Lists:" labels and their values.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Nind [Sat, 18 Sep 2021 21:57:41 +0000 (21:57 +0000)]
Bug 28438: (follow-up) Capitalization: Various corrections
One mdditional correction.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 9 Jun 2021 12:27:29 +0000 (12:27 +0000)]
Bug 28438: Capitalization: Various corrections
This patch makes capitalization corrections to many templates in the
OPAC and staff interface. A exhaustive test plan would be huge, so I
recommend examining the patch to confirm that it contains correct case
changes.
If you want to make it easier to examine changes you can try:
https://github.com/so-fancy/diff-so-fancy
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29078: Resolve division by zero in touch_all scripts
Illegal division by zero at misc/maintenance/touch_all_biblios.pl line 102.
Trivial fix.
Funny that the percentage is not even shown without verbose flag ;)
Test plan:
Run misc/maintenance/touch_all_biblios.pl -where 'biblionumber<0'
You should now see:
Good: 0, Bad: 0 (of 0) in 0 seconds
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Wed, 1 Sep 2021 19:16:15 +0000 (19:16 +0000)]
Bug 28940: In spinelabel-print.tt call IntranetUserJS only once
1. In IntranetUser add some JS that will target spinelabel-print.tt, I used this:
if ( $('#labels_spinelabel-print').length ) {
$('#labels_spinelabel-print').append('<div>TEST</div>');
console.log('TEST');
}
2. Generate a quick spine label
3. Once you have entered a barcode the JS will go off 2x. With the jQuery added you will see 2 div's with the word 'TEST'. Look at the console and you will also see TEST console logged 2x.
4. Apply patch
5. Try seto 2 and 3 again, the JS should only be called once.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title
We can never reach the first [% ELSE %]Koha online[% END %] block in OPAC
messaging preferences title, so it's dead code.
This patch removes the useless duplicate if-statement.
To test:
1. Enable EnhancedMessagingPreferencesOPAC system preference
2. Go to /cgi-bin/koha/opac-messaging.pl
3. Observe title Your messaging settings > Koha online catalog
4. Apply patch
5. Refresh page /cgi-bin/koha/opac-messaging.pl
6. Observe same title Your messaging settings > Koha online catalog
7. See patch content
8. Confirm there are no functional changes in the new logic
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28934: Make the OPAC registration form design consistent
The gender/sex and GDPR inputs were slightly misaligned (by
1.5em). Now they are aligned with the other inputs which have a width
of 10em (9em width + margin 1em). The label assignments and required
attributes for input elements are made also consistent.
To test:
1) Enable GDPR_Policy syspref
2) Apply patch, run "yarn build --view opac", restart plack
3) Go to /cgi-bin/koha/opac-memberentry.pl
4) Check that the GDPR input box shows the required text now in red
color
5) Check that the alignment of sex/gender and GDPR input matches with
the other inputs perfectly.
Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29064: Remove duplicate term Most popular titles
To test:
1. Enable system preference OpacTopissue
2. Go to OPAC /cgi-bin/koha/opac-topissues.pl
3. Observe title Most popular titles › Koha online catalogMost popular titles
4. Apply patch
5. Observe title Most popular titles › Koha online catalog
6. See that this path complies with Bug 27742
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 3 Jun 2021 11:29:52 +0000 (07:29 -0400)]
Bug 28510: Remove unnecessary conditional
It makes sense to use items by branch to get the list of branches, as it
already tells use which branches have available items. We could use
branches to pull from instead, but all we would accomplish is added
extra ununsed loop iterations. We already know that any additional
branches in the branches to pull loop have no items to fill holds.
If they did, they would be in the items_by_branch hash.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 3 Jun 2021 10:44:59 +0000 (06:44 -0400)]
Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled
Right now we skip closed branch's items as we iterate over all items looking for ones to fill a hold. If HoldsQueueSkipClosed is enabled, no items held be a closed library can be targeted, so it would be more efficient if we never selected the items from those branches to begin with. This is how the holds queue works if we are not using the transport cost matrix, so we should make it work the same way if we *are* using the matrix.
Test Plan:
1) Apply this patch
2) prove prove t/db_dependent/HoldsQueue.t
3) All tests should continue to pass
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Mon, 20 Sep 2021 23:38:17 +0000 (23:38 +0000)]
Bug 29070: Accessibility OPAC Purchase suggestions box on search results page has insufficient contrast
This patch changes the text colour for the purchase
suggestion box on the OPAC search results page to
make the text easier to read and improve accessibility.
To test:
1. Log in to the OPAC and search for something
2. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to check the contrast ratio
3. Confirm that the Purchase suggestion text
fails to meet accessibility requirements
4. Apply the patch and rebuild CSS:
yarn build --view opac
5. Confirm the text contrast ratio now meets
minimum accessibility requirements
6. Check that the OPAC still looks ok after
the changes.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Mon, 20 Sep 2021 22:45:55 +0000 (22:45 +0000)]
Bug 29068: Accessibility OPAC search results summary text has insufficient contrast
This patch changes the colour of the label text in
OPAC search results to increase the contrast ratio,
improve accessibility and make the text easier to read.
To test:
1. Search for something on the OPAC
2. Use an accessibility tool (e.g. Chrome's Lighthouse
tool) to check the contrast ratio
3. Confirm that the labels (Edition, Format etc.) in the
results summary have insufficient contrast
4. Apply the patch and rebuild CSS:
yarn build --view opac
5. Use the accessibility tool to confirm the contrast
ratio now meets minimum accessibility requirements
6. Check that the OPAC still looks ok after the changes
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Mon, 20 Sep 2021 22:27:23 +0000 (22:27 +0000)]
Bug 29065: Accessibility OPAC clear search history link has insufficient contrast
This patch changes the colour of the clear search history link
on the OPAC to increase the contrast ratio, improve accessibility
and makes the text easier to read.
To test:
1. Go to the OPAC homepage
2. Use an accessibility tool (e.g Chrome's
Lighthouse tool) to check the contrast ratio
3. Confirm that the clear search history link
has insufficient contrast
4. Apply the patch and rebuild css:
yarn build --view opac
5. Confirm that the contrast ratio now
meets minimum accessibility requirements
6. Check the OPAC still looks ok after the changes
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Mon, 20 Sep 2021 21:10:15 +0000 (21:10 +0000)]
Bug 29038: Accessibility OPACUserSummary heading doesn't have sufficient contrast
This patch changes the colour of the OPAC User Summary heading text to
increase the contrast ratio, improving accessibility and making the
text easier to read.
To test:
1. Log in to the OPAC homepage as a user with items checked out
2. Use an accessibility tool (e.g. Chrome's Lighthouse tool) to test the
contrast ratio.
3. Confirm the UserSummary heading has insufficient contrast.
4. Apply the patch and rebuild css:
yarn build --view opac
5. Use the accessibility tool to confirm the contrast ratio now meets
accessibility requirements
6. Check that the OPAC still looks ok after the changes
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Thu, 16 Sep 2021 07:55:01 +0000 (07:55 +0000)]
Bug 29037: Accessibility: OPAC links don't have sufficient contrast
This patch changes the colour of links on the OPAC
to improve the contrast ratio and make the link
text easier to read. This accessibility issue was
identified using the WebAIM WAVE accessibility
browser extension and Google Chrome's Lighthouse
tool.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to test the contrast ratio.
2. Confirm that some links (e.g. breadcrumb links
and title links in search results) have
insufficient contrast.
3. Apply the patch and rebuild the OPAC CSS:
yarn build --view opac
4. Use the accessibility tool to confirm the
contrast ratio meets minimum requirements
5. Check that the OPAC still looks ok after the
changes.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Thu, 16 Sep 2021 12:53:12 +0000 (12:53 +0000)]
Bug 29035: Accessibility: OPAC masthead_search label doesn't have sufficient contrast ratio
This patch changes the colour of the masthead
search label to improve accessibility and make it
easier to read.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to test the contrast ratio.
2. Confirm that the search label has insufficient
contrast.
3. Apply the patch and rebuild the OPAC CSS:
yarn build --view opac
4. Use the accessibility tool to confirm the
contrast ratio now meets accessibility
requirements.
5. Check that the OPAC still looks ok after
the changes.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Henry Bolshaw [Thu, 16 Sep 2021 08:35:39 +0000 (08:35 +0000)]
Bug 29034: Accessibility: OPAC nav links don't have sufficient contrast ratio
This patch changes the colour of the navigation
links on the OPAC (Cart, Lists etc.) to improve
the contrast ration and make them easier to read.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to check the contrast
ratio on the OPAC
2. Confirm that the navigation links have
insufficient contrast
3. Apply the patch and rebuild the OPAC css:
yarn build --view opac
4. Use the accessibility tool to confirm
the contrast ratio meets the minimum
accessibility requirements
5. Check that the OPAC looks ok after the
changes
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Petro Vashchuk [Mon, 20 Sep 2021 09:36:02 +0000 (12:36 +0300)]
Bug 29056: Remove the demo functionality leftovers
Remove forgotten code of the old legacy demo functionality that was
removed from elsewhere except systempreferences, this code not only
serves no purpose but also is causing some troubles for our customers.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 17 Sep 2021 16:18:09 +0000 (16:18 +0000)]
Bug 29049: (follow-up) Reduce number of line returns in page
While moving the dropdown to a block, I noticed the page size was very large when there are many holds
This patch chomps a large amoutn of whitespace, from the block and elsewhere and drecreased the paeg from about 400k lines to 25k lines for a record with ~200 holds
To test:
1 - Apply previous patch
2 - Load holds tab for a biblio
3 - Save the page as html from your browser, note the size of the file
4 - Apply patch this
5 - Reload and repeat
6 - Note the size is much smaller
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 17 Sep 2021 13:59:25 +0000 (13:59 +0000)]
Bug 29049: Simplify holds priority dropdown logic on request.pl
This patch makes a few changes:
1 - If we are not splitting the queue ( HoldsSplitQueue == 'nothing' ) then
there are no changes for 'virtual' vs 'actual' numbering
2 - If we are splitting the queue you cannot use the dropdown, so we do not need to process the options
3 - If the hold is 'found' we do not need to process the options
4 - We can simply use the 'last priority' to build the options, we do not need to process in the script
5 - We can use a block to build the options
6 - Remove a stray holds.index
To test:
1 - Place 5 holds on a bib
2 - 'Find' two of the holds i.e. check them in to set status to 'transit' or 'waiting'
3 - View the holds page for the biblio
4 - Inspect the priorty dropdown for the found holds, note they have options for 1-5 but are disabled
5 - Note the dropdowns for other holds have options 1-5
6 - Note options 4&5 in the dropdowns have no effect
7 - Apply patch
8 - Inspect the priority dopdowns on the found holds
9 - Note they only show their found status
10 - Note the other dropdowns only show options 1-3
11 - Test with other HoldsSplitQueue options and HoldsSplitQueueNumbering
12 - When holds queue is split, no dropdowns should be active and should show only their current priority
13 - When HoldsSplitQueueNumbering is 'virtual' the dropdown should be disabled and correctly count the number of unfound holds in the list
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
JK: Fixed grammar in commit title Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
JD: Remove trailing 'i'
Marcel de Rooy [Thu, 19 Aug 2021 13:43:48 +0000 (13:43 +0000)]
Bug 27461: Right pad with default elements for too short 008s
Note that we treat the elements 18-34 as one block of elements,
since its subdivision may vary.
E.g. if you pass 24 characters to the form, it will use the first
18 chars (until the last complete element) and pad with default
elements from position 18-39.
Test plan:
[1] Go to addbiblio. Make sure that 008 is connected to the plugin.
[2] Backspace field 008 a bit, click on the plugin button.
[3] Verify that the last elements come from the default.
[4] Repeat for a few different lengths.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 19 Aug 2021 11:42:36 +0000 (11:42 +0000)]
Bug 27461: Add tests for biblio_008
Test plan:
Run t/db_dependent/FrameworkPlugin.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 19 Aug 2021 09:52:14 +0000 (09:52 +0000)]
Bug 27461: Move hardcoded value to module
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
- [% INCLUDE 'patron-title.inc' patron=checkout.issued_by %]
+ [% INCLUDE 'patron-title.inc' patron=checkout.issuer_id %]
It must have been patron=checkout.issuer as patron-title.inc is
expecting a Koha::Patron object, not a borrowernumber.
Test plan:
Turn RecordStaffUserOnCheckout on
Check an item out then in
Go to the biblio checkout history and confirm that the "Checked out by"
column contains the logged in librarian's name.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29026: Restore behavior when an empty barcode field is submitted in circulation
When preference CircAutoPrintQuickSlip is 'clear the screen', when an empty barcode field is submitted in circulation :
Before Bug 17845, behavior was to display empty circulation page (no patron selected).
Now behavior is displaying the circulation page of current patron.
I think previous behavior was used when scanner is used to clear form and wait for another patron card to be scanned.
Test plan :
1) Set system preference CircAutoPrintQuickSlip to 'clear the screen'
2) Go to a patron circulation page
3) Post form without a barcode
=> Check you go to circulation page with no patron selected
4) Set system preference CircAutoPrintQuickSlip to 'open a print quick slip window'
5) Go to a patron circulation page
6) Post form without a barcode
=> Check you go to print quick slip window with correct datas
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Tue, 31 Aug 2021 06:59:27 +0000 (20:59 -1000)]
Bug 28927: Fix id opacmainuserblock used twice in OPAC
Since preference OpacMainUserBlock is now an HTML customization,
there is actually an HTML tags with id="opacmainuserblock" and one with id="OpacMainUserBlock".
Same for OPACNavRight in opac-registration-confirmation.tt
This patch removed id from page to keep the one comming from HTML customization include.
Test plan :
1) Create an HTML customization for OpacMainUserBlock with some text
2) Go to OPAC main page
3) Check HTML code of the page
4) Check you see id="OpacMainUserBlock" once and not id="opacmainuserblock"
5) Same for id="opacnavright" in opac-registration-confirmation.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29025: Don't prefill userid and password in user creation form
Recent Firefox versions try to prefill userid and password with
logged in user credentials.
To test
1 - Log in staff as user foo password bar
2 - Save user and password in Firefox
3 - Log out
4 - Log in again, log in pop-up must be pre-filled
5 - Open Create a new patron form
6 - At least password field is pre-filled with logged in user's credentials
7 - Apply patch
8 - Redo 4 and 5
9 - Userid and password fields aren't prefilled
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 23 Sep 2021 21:14:52 +0000 (21:14 +0000)]
Bug 29019: Unable to delete HTML customization
This patch makes some corrections to additional contents to allow
content to be deleted. The wrong parameter was being passed to the
script. The script was also not handling multiple deletions correctly.
The patch also adds a "category" parameter to the delete operation so
that the page is redirected correctly.
The patch also changes some strings which referred to "news"
referencing operations which might be performed on news or on HTML
customizations, e.g.:
"Are you sure you want to delete the selected content?" instead of "Are
you sure you want to delete the selected news?"
To test, apply the patch and go to Tools -> News.
- Create multiple news items if necessary.
- Test the "Delete" button corresponding to a single news item:
- Clicking the button should ask you to confirm.
- Check that the wording of the message is correct.
- After confirming the news item should be deleted.
- Ideally, test on news items which are on the second page of the
DataTable of news items.
- Test the process of deleting multiple news items at once:
- Check the checkbox next to multiple items.
- Click the "Delete selected" button at the bottom of the page.
- Check that the wording of the confirmation message is correct.
- After you confirm, the items should be deleted.
- Repeat these tests under Tools -> HTML customizations to confirm that
redirects work correctly. After deleting an HTML customization you
should be redirected back to the list of HTML customizations.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 21 Sep 2021 15:15:15 +0000 (15:15 +0000)]
Bug 29073: Use 0 and 1 as values for DefaultHoldExpirationdate
DefaultHldexpirationDate is set in the pref screen to 'yes/no'
The code checks if the preference is 'true', 'no' is true
We should instead use 1/0
To test:
0 - Have a fresh devbox
1 - With syspref disabled, place a hold
2 - Note no expiration date set
3 - Enable the preference
4 - Place a hold and note the expiration date is set, good
5 - Disable the pref
6 - Place a hold and note the expiration date is set, bad
7 - Apply patch
8 - Update database
9 - Repeat 1-8, date not set when pref disabled
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 14 Jun 2021 12:41:50 +0000 (12:41 +0000)]
Bug 28534: Atomic update to fix existing installs
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 9 Jun 2021 13:46:16 +0000 (13:46 +0000)]
Bug 28534: Fix engine for pending_offline_circulations table
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 28534: (follow-up) Don't adjust original DB update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Mon, 13 Sep 2021 09:18:46 +0000 (10:18 +0100)]
Bug 28803: (follow-up) Error details improvement
This patch updates the exceptions thrown by Koha::Email to include the
parameter that failed email validation and then updates the failure code
to include this parameter and finally display this field in the template.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 5 Aug 2021 07:00:19 +0000 (08:00 +0100)]
Bug 28803: Add invalid email handling in _send_message_by_email
This patch adds a try/catch block around the call to Koha::Email->create
to catch and handle invalid emails being passed in the parameters.
The message is marked as 'failed' with an error_code of 'INVALID_EMAIL'.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 5 Aug 2021 07:43:32 +0000 (08:43 +0100)]
Bug 28803: Add unit tests
This patch updates Letters.t to confirm that invalid email addresses in
the message_queue should not throw an exception when sending mail but
instead set the status to failed and pass error details to the end user.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 26 Aug 2021 15:21:32 +0000 (17:21 +0200)]
Bug 28870: non-FQDN addresses are valid
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 26 Aug 2021 15:13:41 +0000 (17:13 +0200)]
Bug 28870: Use Email::Address->parse
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 26 Aug 2021 15:12:58 +0000 (17:12 +0200)]
Bug 28870: Move email address validation to a specific class method
To ease testing and future changes if needed.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28870: Use Email::Address to validate email addresses
This patch adds a new dependency, Email::Address. It is used in
Koha::Email to replace the current use of Email::Valid, which proved to
be problematic when it comes to UTF-8 characters.
Email::Address provides suitable regexes that -when used- keep our
tests passing, but also deal better with UTF-8 data.
To test:
1. Apply the regression tests patch
2. Notice the only change is that it tweaks a couple addresses so they
contain umlauts and also have the "Description <address>" format that
is used when sending carts.
3. Run:
$ kshell
k$ prove t/Koha/Email.t
=> FAIL: Tests fail! Things die because Email::Valid doesn't like the
from we passed.
4. Run:
$ sudo apt install libemail-address-perl
5. Apply this patch
6. Repeat 3
=> SUCCESS: Tests pass!
7. Try what is described in comment 1
=> SUCCESS: Things are back to normal
8. Sign off :-D
9. Send cookies
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28412: Add information about supported authentication methods
This patch adds an initial text explaining the valid authentication
mechanisms Koha has for the API.
My first approach included information about the controlling sysprefs,
but I decided to remove it, as it is not usual for API consumers to be
presented such detailed internal information which is probably
confusing. We could add a link to the manual, but that's not the point I
think.
I've added an entry about error messages and how we thougth about them.
It is copied from Docker Engine's API docs.
This is my 2 cents.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 8 Jun 2021 15:03:29 +0000 (15:03 +0000)]
Bug 28536: Move translatable strings into overdrive.js
This patch takes strings defined as variables in opac-bottom.inc for use
in overdrive.js and moves them to overdrive.js, wrapped in the
double-underscore translation function.
To test you must have valid credentials entered in system preferences
for the OverDrive API. Ideally you should test using a patron who has
holds and current checkouts in OverDrive.
Apply the patch and log in to the OPAC.
- On the "Your summary" page, open the "OverDrive Account" tab.
- Log in to your OverDrive account.
- The contents of the tab should display correctly, with correct
labels for controls like "Log out of your OverDrive account", "Check
in", "On hold", etc.
- Perform a catalog search which will return results also found in your
OverDrive collection.
- Open the OverDrive results page.
- The page should display correctly, with correct labels on controls
like "Check out" and "Place hold."
To test that the correct strings are translatable. In this example I'm
testing fr-FR:
- Open the corresponding .po file for the strings pulled from
JavaScript e.g. misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from bootstrap/js/overdrive.js for
translation, e.g.:
- Edit the "msgstr" string however you want (it's just for testing)
- Install the updated translation:
> perl translate install fr-FR
In the OPAC, switch to the language you're testing. Confirm that your
translated strings appear. In the above example, the string should
appear at the top of the "Overdrive Account" tab.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Thomas Klausner [Mon, 29 Mar 2021 11:59:50 +0000 (13:59 +0200)]
Bug 28022: Only show subfield "9" if subfield "a" is visible
Amend the workaround (from but 2206) to only show subfield "9" in editor if
subfield "a" has the editor-visibility bit set.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 28 Aug 2021 13:01:01 +0000 (15:01 +0200)]
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 28 Aug 2021 12:54:29 +0000 (14:54 +0200)]
Bug 28898: (follow-up) Remove comment lines before PROCESS statements
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28898: Context for translation: term (word) vs. term (semester)
This patch add context to the term Term in the context of course reserves.
To test:
0- Apply patch
Set up course reserves
1- Enable UseCourseReserves
2- Create at least one authorized value for DEPARTMENT
3- Create at least one authorized value for TERM
4- Create a course
5- Add at least one item to the course
Check the terms:
6- Go to the OPAC
7- Go to Course reserves
** 8- In the list of courses, check the Term column heading
9- Go to the staff interface
10- Go to Course reserves
** 11- In the list of courses, check the Term column heading
12- Click on the course name
** 13- Check the Term line in the course description
Add a new language (fr-CA in the example, change for whatever language code you want)
14- In a terminal, run
gulp po:create --lang fr-CA
15- Then, run
gulp po:update --lang fr-CA
16- In system preferences, enable the new language in language and OpacLanguages
17- Switch the language in staff interface and OPAC
Change the translations
18- In your favourite text editor, open fr-CA-messages.po
19- Find the string 'msgctxt Semester'
20- Enter a word in msgstr
21- Save the file
22- In a terminal, go to misc/translator
23- Run
./translate install fr-CA
Check the translations
24- Redo the steps to check the terms (6-16) and make sure the terms in steps 8, 11, and 13 are changed for the word you put in step 20.
25- Optionally, check the following pages to make sure the terms are not the word you put in step 20 (these pages shouldn't have been changed)
- opac-tags (your account > your tags)
- opac-authorities (search for an authority in Authority search)
- review (tags in staff interface)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Thu, 13 May 2021 09:31:08 +0000 (10:31 +0100)]
Bug 28340: Alphabetise metadata for notices
This commit sorts metadata by key prior to preparing a notice with it
Test plan:
- Do not apply patch
- Create a report with the following SQL:
SELECT * FROM message_queue;
- Create an ILL request with plenty of metadata
- Go to "Manage request"
- Send a notice to a patron
- Run the report created earlier
=> TEST:
- Observe that the metadata is in random order
- Apply the patch
- Create an ILL request with plenty of metadata
- Go to "Manage request"
- Send a notice to a patron
- Run the report created earlier
=> TEST:
- Observe that the metadata is now sorted alphabetically by key
Signed-off-by: Jill Tivey <Jill.Tivey@sasa.gov.scot> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Fri, 18 Jun 2021 10:10:01 +0000 (11:10 +0100)]
Bug 27170: Fix bug fix
<sigh> This commit fixes the incorrect bug fix from the previous commit
Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Fri, 18 Jun 2021 09:59:01 +0000 (10:59 +0100)]
Bug 27170: Fix bug with undefined 'links'
If a row object doesn't have a 'links' property, calling 'length' on it
will fail. This commit fixes this.
Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit adds support for the new 'links' property that will allow an
availability plugin to return an array of links for a result. These
links are parsed and appended to the title field of a results record.
Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Mon, 26 Oct 2020 11:44:50 +0000 (11:44 +0000)]
Bug 24190: (follow-up) Modify order of logging
Basket creation involves two steps in Koha, creating the basket then
modifying its header. We were logging these two steps in the wrong
order. This commit fixes that.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Tue, 19 May 2020 11:06:47 +0000 (12:06 +0100)]
Bug 24190: (follow-up) Cancel order del item bug
If an order is cancelled but the associated bib / items are unable to be
removed, we go into error handling. We still need to log the
cancellation though. So this fix moves the logging to just after the
cancellation, so it will be logged regardless of the outcome with
associated things.
Signed-off-by: Maura Stephens <maura.stephens@gmit.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Wed, 16 Jun 2021 13:22:30 +0000 (14:22 +0100)]
Bug 24190: Add acquisition logging
Signed-off-by: Maura Stephens <maura.stephens@gmit.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch changes an active request's backend and initiates the
migration on that request, rather than creating another and migrating
that.
The majority of the work to accomplish this bug is being carried out in
the backends, since Koha delegates migrations to them.
Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Assumpta Byrne <abyrne@ait.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29072: Move reference route /cities spec to YAML
This patch moves the /cities routes spec and related files into YAML so
devs can use it as a reference for future routes.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29032: Pre-load ILL backends to speed up response
Bug 22440 will rewrite the route and make it even more efficient by
prefetching the related data instead of performing several queries in
loops.
In the meantime, we can make this controller perform better with a
simple intervention: load backends once, and use the
$request->_backend() setter to pre-set it before using the objects.
To test:
1. Perform any usual ILL requests listing, try having several
=> FAIL: Notice it takes a weird amount of time to load
2. Apply this patch
3. Restart all
4. Repeat 1
=> SUCCESS: It feels fast enough!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
On patrons check out or details page, after renewing
loans they don't sort correctly when clicking on "Date due"
tab. Page has to be reloaded so that sorting works.
This patch adds new method RefreshIssuesTable to
checkouts.js. When loans are renewed or checked in, issues
table is reloaded to and due dates are sorted correctly.
To test:
1. Add 3 loans for patron.
2. Change due dates so you they are e.g. 07/01, 07/02, 07/04
3. Make sure you have renewal period set e.g. 5 days and
check your RenewalPeriodBase syspref (I use current date there)
4. Renew loan with date due on 07/01, it should now be 07/07
5. Sort loans by date due
=> Note that order from top to bottom is 07/04->07/02->07/07
or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would
assume.
6. Apply patch and repeat.
=> Note that issues table is reloaded ("Loading..." pop-up is displayed)
and that due dates are in correct order.
Sponsored-by: Koha-Suomi Oy Signed-off-by: kelly <kelly@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 28653: (QA follow-up) Remove debug message used during development
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 27 Aug 2021 16:06:02 +0000 (16:06 +0000)]
Bug 18747: Select All in Add Patron Option in Patron Lists only selects the first 20 entries
This patch corrects the JavaScript functions for the "select all" and
"clear all" action when viewing patrons in a list. Before this
correction, checkboxes which were previously in hidden table rows would
not be checked.
To test, apply the patch and go to Patrons -> Patron Lists
- View a patron list
- If necessary, add multiple patrons to the list so that the number
exceeds 20.
- Change the number of entries shown by the DataTable: Show [ 50 ]
entries.
- Click "Select all." All visible checkboxes should be checked.
- Click "Clear all." All checkboxes should be unchecked.
The table tmp_holdsqueue is missing a couple key constraints that should
be there, one for biblio and one for borrowers.
Test Plan:
1) "SHOW CREATE TABLE tmp_holdsqueue;" should show no FKs for biblio or borrowers
2) Apply this patch
3) Run updatedatabase.pl
4) "SHOW CREATE TABLE tmp_holdsqueue;" should now show FKs for biblio or borrowers
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 1 Sep 2021 14:58:04 +0000 (15:58 +0100)]
Bug 28316: (QA follow-up) Make clean_search_term public
With all the work that's gone into improving the internal
_clean_search_term method I feel we should expose it publically as it's
going to be more widely helpful
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Petro Vashchuk [Mon, 6 Sep 2021 13:46:45 +0000 (16:46 +0300)]
Bug 28316: escape ES ranges if QueryAutoTruncate is enabled
if QueryAutoTruncate enabled we will have any special operators ruined
for example: "test [6 TO 7]" will be converted to "test* [6* TO* 7]"
so no reason to keep ranges when QueryAutoTruncate set to "enabled"
1) enable QueryAutoTruncate at your sysprefs.
2) perform a search using range, for example: "[1999 TO 2020]",
it shouldn't work the way it's supposed to.
3) apply the patch.
4) perform the same search with range, ensure that it works correctly.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>