Katrin Fischer [Sun, 2 Oct 2022 10:08:55 +0000 (10:08 +0000)]
Bug 30944: Undo change to ILS-DI documentation
The service not implemented by Koha is CancelRecall
as specified in:
https://old.diglib.org/architectures/ilsdi/DLF_ILS_Discovery_1.0.pdf
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8abc8c4950ae9452242a1b86a22b86748208014b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Aleisha Amohia [Thu, 11 Aug 2022 05:29:04 +0000 (17:29 +1200)]
Bug 30944: Fix cancel recalls actions
This patch fixes the 'cancel selected recalls' button on the biblio
details Recalls page, and ensures a correct cancellation reason is
logged when cancelling a recall in transit.
To test:
1) Ensure UseRecalls is enabled and relevant recalls circulation rules
are set
2) Check out Item A to Patron B
3) Log into OPAC as Patron A
4) Search for Item A and place a recall
5) Go back to the staff interface and search for Item A. When viewing
the biblio record, go to the recalls tab.
6) Check the checkbox for your recall, and click the button to cancel
selected recalls.
7) Confirm your recall is successfully removed and you're redirected to
the correct recalls page for this biblio.
8) Go back to the OPAC and place a recall again. This time set the
pickup location to a different library, one that you're not logged in at
9) Back in the staff interface, check in Item A and confirm the recall
and transfer
10) Go to Circulation -> Recalls to pull. Your recall should show here.
Click the button to cancel the recall and revert the transfer
11) Confirm the recall has been cancelled
12) Go to Reports and create a new SQL report with the following SQL:
select * from branchtransfers b join items i on
b.itemnumber=i.itemnumber where i.barcode = <<barcode>>
13) Run the report and paste the barcode of Item A in the field
14) Confirm there are two rows returned - the transfer triggered when
the recall was confirmed, with a reason of 'Recall' and a cancellation
reason of 'RecallCancellation, and the transfer sending the item back
home when the recall was cancelled, with a reason of
'RecallCancellation'.
Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ccb4180339544d6700de80b2d9879fdf175b51b9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Mon, 26 Sep 2022 14:07:06 +0000 (14:07 +0000)]
Bug 31559: Staff results page doesn't always use up full available screen width
This patch adds an explicit "width: 100%" to tables which are contained
within a #searchresults <div>. The change affects staff interface
catalog search results and these other pages with the same markup:
- Advanced MARC editor search results
- Holds to pull
- Patron search results
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)
- Test the catalog search results and other affected pages to confirm
that the tables affected take up the full width of the page.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cfb6ea48b8240ca3e526fba840c1b40701911329)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Shi Yao Wang [Tue, 19 Apr 2022 15:52:42 +0000 (11:52 -0400)]
Bug 30517: Translation breaks editing parent type circulation rule fix
Test plan:
1. Install another language in the staff interface
1. in commandline: `cd misc/translator/; ./translate install xx-XX`
2. Check the box of the language in the 'language' system preference
and save
3. Refresh and you should be able to choose languages
2. Create an item type with a parent
1. Go to Administration > Item types
2. Create a new item type or modify an existing one, assigning a parent type (I created a 'Children's books' type and assigned 'Books' as its parent)
3. Create a circulation rule for the parent type (I created All/Books, with 10 checkouts allowed)
4. Create a circulation rule for All/All (I created All/All with 30 checkouts allowed)
5. In English, click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)'
6. Modify the number of checkouts allowed (e.g. 99)
--> The All/Books rule is modified
7. Switch the interface to the other language
8. Click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row stays on 'All'
9. Modify the number of checkouts allowed (e.g. 88)
--> The All/All rule is modified
10. Apply the patch, translate again and refresh the page
11. Do step 8-9 again and notice it now behaves as it should
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eccae54eee0316e6eb6f2edc54edce2cd269ebe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31593: Remove Test::DBIx::Class from Context.t
No need to keep it.
Fixing a test description too.
Test plan:
Run t/db_dependent/Context.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 499562f0b80ca705e94581ccef0eebadce1ed6f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 21 Sep 2022 14:14:32 +0000 (14:14 +0000)]
Bug 31594: Use count of results for displaying number shown
To test:
1 - Create a report with a number of results that is not a multiple of 20
SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 926568a4e25628b2138aafaf62c9f4c3b8d4a8c2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Tue, 23 Aug 2022 11:47:56 +0000 (13:47 +0200)]
Bug 31441: Fix Koha::Item::as_marc_field when kohafield = ''
marc_subfield_structure.kohafield can be NULL, but it can also be an
empty string. But in that case, Koha::Item::as_marc_field ignores them,
which means the resulting MARC::Field object has missing data.
This can produce a bug in OPAC ISBD view (and probably other places
where this method is used)
Test plan:
1. Edit the default biblio MARC framework for the item field: find or
create a subfield that is not linked to a DB column.
Save even if you made no changes to make sure that
marc_subfield_structure.kohafield is set to an empty string.
I'll use 995$Z as an example for the following steps.
2. Add the following to syspref OPACISBD:
#995|<br>Item:|{995Z}|
3. Create a biblio with an item and put a value into 995$Z
4. Go to the ISBD detail page for this record at OPAC. Confirm that the
value you entered in 995$Z is not visible
5. Apply patch and restart koha
6. Refresh the ISBD detail page. Confirm that the 995$Z is now visible.
7. Run `prove t/db_dependent/Koha/Item.t`
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 389b9dfaf43e889612990401ab83cc1f75972333)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 12 Sep 2022 14:35:24 +0000 (14:35 +0000)]
Bug 31540: Exclude expired holds from the reminder job
Some libraries don't want to auto-cancel holds, but we should not remind
a patron about a hold which has expired.
To test:
1 - Place a hold for a patron
2 - Set it waiting
3 - Run the holds reminder script in the future
perl misc/cronjobs/holds/holds_reminder.pl -day 1 --date '2023-09-12' -v
4 - Note the holds would be reminded
5 - Set expirationdate for the hold less than today
UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY);
6 - Run the remidner cron again
7 - No holds trigger!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4c3d18091d821af2d9ac7a6178547cc9c478f9de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 29 Sep 2022 12:20:30 +0000 (12:20 +0000)]
Bug 31653: Correct event names passed to jQuery on() function
This patch replaces the obsolete .on("hover") with .on("mouseenter
mouseleave"). This will allow the code to work again following the last
jQuery upgrade.
See Bug 20217 for discussion of the original implementation:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20217#c14
To test, apply the patch and go to the staff interface. Hover your mouse
over the "Search" link in the header menu. The adjacent dropdown menu
button should have its hover state triggered.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a3bded6d3597128bcad3477dbf152abe189eb44)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Isobel Graham [Mon, 12 Sep 2022 16:33:57 +0000 (17:33 +0100)]
Bug 31412: Add focus to 'name' on SMTP Servers
This patch adds the focus class to ensure focus is given to the first form element on the SMTP server entry page.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44537c58d1ea689c974bdba216b2ae69eac79e5c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 10 Nov 2022 19:24:25 +0000 (19:24 +0000)]
Bug 32167: [22.05.x] (bug 14860 follow-up) Populate price fields even if no discount on vendor
On bug 14860 an 'else' was removed, assuming the price fields were set before discount,
this was incorrect. This patch renames the variable and always set the price, only discounting
ecost if a discount, but setting the values even if not
To test:
0 - Have a vendor with a discount of 0% specified (no discount)
1 - Export a record from your Koha
2 - Stage the record for import and match on biblionumber
3 - Add to a basket in acq from the staged file
4 - Select the title, and set order price to $10 and do not fill the discount field
5 - Add the order - note $0 order line
6 - Repeat with another vendor with a 10% discount and confirm that is correct
7 - Apply patch
8 - Repeat 2-4
9 - Add the order and confirm $10 price
10 - Repeat with discounted vendor, confirm prices are set discounted correctly
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Thu, 27 Oct 2022 17:44:59 +0000 (13:44 -0400)]
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on [v22.05]
The real time hold queue and the build_holds_queue.pl jobs are not 100% compatible in that we should not be running the cron if the real time queue is enabled, this could lead to double server work. It would be good to have a check in build_holds_queue for the RealTimeHoldsQueue syspref and not run the job if the preference is enabled.
There might be times when we'd want to force a run of this job without changing the syspref. To that end we would also want a flag for this job so that system administrators could force the job from the command line if required, overriding this limitation.
Test Plan:
1) Apply this patch
2) Try run misc/cronjobs/holds/build_holds_queue.pl with the -h/--help and -m/--man options
3) Disable RealTimeHoldsQueue
4) Run with no options, should succeed
5) Enable RealTimeHoldsQueue
6) Run with no options, should display a message and not rebuild the
holds queue
7) Run again with the -f/--force option, should succeed
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 31995: (QA follow-up) Add 'system preference' to help text
We often get asked where something can be found in setting,
adding the hint that RealTimeHoldsQueue is a system preference
is hopefully helpful here.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 5 Aug 2022 12:52:46 +0000 (13:52 +0100)]
Bug 31296: (QA follow-up) Add to debian templates
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a6bd96d4c08a7b566fdc315c3c69e3838f491c4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Fri, 5 Aug 2022 11:14:14 +0000 (07:14 -0400)]
Bug 31296: Add ability to disable demagnetizing items via SIP2 based on itemtypes
Some libraries have certain item types that can only do in house checkouts via SIP self check machines. In these cases, the items should not be demagnetized since the items cannot leave the library.
Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 00f489de6d05fd8a5d4c8b4599a72d55e1ee8005)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
$ prove t/db_dependent/Utils/Datatables_Virtualshelves.t
t/db_dependent/Utils/Datatables_Virtualshelves.t .. 2/13 Use of inherited AUTOLOAD for non-method Koha::Virtualshelf::haspermission() is no longer allowed at /kohadevbox/koha/Koha/Virtualshelf.pm line 248.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=32080 Signed-off-by: Blou <blou@inlibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Mon, 29 Aug 2022 13:26:44 +0000 (09:26 -0400)]
Bug 31482: Label creator does not call barcodedecode
The label creator can accept a list of either itemnumbers or item barcodes.
In the case that the list of composed of barcodes, those barcodes should be
passed though barcodedecode before the lookup is performed.
Test Plan:
1) Apply this patch
2) Download and install the Barcode Transformer plugin
https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/
3) Go to the plugin configuration page, set the configuration to the example configuration from the same page
4) On the "New label batch" page of the Label creator,,
type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y
5) Submit the form
6) Note the items are added to the label batch!
JK: Remove unnecessary if $number check, barcodedecode already does this
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ddfa8ddd7f558e76c7f6165454453f57dc0a3f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Blou [Tue, 25 Oct 2022 18:55:52 +0000 (14:55 -0400)]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha
Without this patch, the update process duplicates all the news and
content entries when they were non-english to start with.
This patch keeps the same process, but new "default" "parent" entries are empty so there'
no duplication in the OPAC display, while still being editable/deletable
in the intranet.
We came through that through many iterations. This was the least
invasive while still providing satisfying results.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 499de130067063e2c33339be58fffee1dce17297)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 3 Nov 2022 15:20:34 +0000 (15:20 +0000)]
Bug 31818: Enable table elements in keyboard shortcuts popover
This patch updates the whitelist for the popover to ensrue our shortcuts table displays
To test:
1 - Open the advanced cataloging editor
2 - Click 'Keyboard shortcuts'
3 - Is empty, be sad
4 - Apply patch
5 - Reload
6 - Click it again
7 - Shortcuts!
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4079d17f383950ed135e2c43cf8a302bb9cba78)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 16 Sep 2022 11:33:31 +0000 (12:33 +0100)]
Bug 31465: (follow-up) Link to preference tabs directly
This patch enhances the mapping system for the help button to allow for
each tab of preferences to link directly to the relevent section of the
manual.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6d82b66a277caa879a5a7b0c8f05a84f795beb4d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 16 Sep 2022 10:42:17 +0000 (11:42 +0100)]
Bug 31465: Correct help link for preferences
This patch updates the mapping to reflect the split and rename of the
preferences section of the manual.
Test plan
1) Hitting 'Help' on any tab except for 'Local use' should lead you to
the globalpreferences section of the manual for your Koha version.
2) Hitting 'Help' on the 'Local use' tab should take you directly to the
'localusepreferences' manual page.
NOTE: I have now updated the manual build pipeline to remove
renamed/deleted files so prior to this patch you should now see a 404
response when clicking Help from these pages. Before I made that
change, we had the old file hanging around, so you actually got an
outdated manual page disguised as a more recent version.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49652f570f887467528ca60880d9de1e4fa0075f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored
Problem with items restricted edition, restriced fields with a drop-down
menu are not stored, since 21.11.
This comes from a change by Bug 28445 in items edition form :
<select name="field_value"
change to :
<select name="[% kohafield | html %]"
This breaks the special JS code :
https://git.koha-community.org/Koha-community/Koha/src/commit/fc919fc796df42c29e73cd527d3c425377fcc27a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js#L112
I propose we use "select.input_marceditor".
Test plan :
1. A librarian with 'edit_items_restricted' permission set
2. Item subfield not authorized for editing (SubfieldsToAllowForRestrictedEditing). In Marc framework, this subfield is linked to an authorized value (= drop-down menu). For exemple homebranch.
3. When adding/editing item, this subfield has a default value from drop-down menu and is not editable (OK).
4. Save item
=> Without patch : the subfield is empty, it should have the value from drop-down menu.
=> With patch : the subfield is saved with the value from drop-down menu.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63119a86860174e668dc68fe559eba8d195e1b02)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Fri, 30 Sep 2022 17:48:25 +0000 (17:48 +0000)]
Bug 31646: Add Select2 focus to text search field
To test:
1. Edit a biblio record
2. Go to tab 9 to find the item type MARC field 942$c
3. Click on the field to select an item type
4. Notice you have to click again on the search field to begin typing to search
for your item type
5. Apply patch/clear browser cache
6. Try steps 2-3 again, the focus should now be on the search text field
7. Try another select2 dropdown on the same page like the 942$n ( Suppress in
OPAC ), it should also default to the text search field.
8. Try other places in Koha that feature this kind of select2, like when
placing hold.
Note: Using $(document).on here instead of $(".select2").on becuase there are
several instances where there are more than 1 select2 dropdown on a single page.
This allows for the text search field to default each time you click on a
different dropdown.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f439537b202cf937616986883d283423211b7bb5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 22 Sep 2022 15:48:32 +0000 (15:48 +0000)]
Bug 31605: Improve style of OPAC suggestions search form
This patch makes minor modifications to the markup for the
OPAC suggestions search form so that the different labels and
form fields display a little more nicely.
The patch also adds standard Bootstrap alert classes to
several messages which might be displayed on the screen, e.g.
"You have no pending purchase suggestions."
To test, apply the patch and make sure the "suggestion" system
preference is enabled.
- With the OPACViewOthersSuggestions preference disabled, log
in to the OPAC and view your suggestions.
- If you have no suggestions you should see a Bootstrap-styled
message box, "You have no pending purchase suggestions."
- If necessary, submit a suggestion. With at least one suggestion
present you should see a search form above the table of
suggestions. The label, form field, and submit button should
line up nicely.
- Test that the search form works correctly to find suggestions
in your system.
- If you search for a suggestion which doesn't exist you should
see a message-style alert, "There are no pending purchase
suggestions matching your search."
- Enable the OPACViewOthersSuggestions system preference.
- Return to the OPAC suggestions page. The form field should
now include a nicely-styled "Suggested by" filter.
Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74a1ea73f398a763c69ea409e71a4acaf8eac0c5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Thu, 22 Sep 2022 16:41:12 +0000 (16:41 +0000)]
Bug 31527: Breadcrumbs for anonymous suggestions are not correct
This patch updates the OPAC suggestions template in order to
omit the patron name breadcrumb if there is not a logged-in
user.
To test, apply the patch and view the OPAC suggestions page
with the AnonSuggestions preference both enabled and disabled.
- If you are logged in, the page breadcrumbs will be:
Home -> [Your name] -> Purchase suggestions.
- If you are not logged in it should be:
Home -> Purchase suggestions
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e0871fa1bfb6ca9999b050d48912baa5a8e0b5e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31565: [22.05.x] Fix datatables searching escape for exact search
To test:
1. Add a new patron category with categorycode 'TEST_CAT'
2. Add a patron to category 'TEST_CAT'
3. Go to Patrons search view
4. Under "Search for patron" filters, filter by category you created at step 1
5. Click Search
6. Observe no results
7. Apply this patch and reload
8. Repeat 3-5
9. Observe expected result
Double check tests from Bug 30393 still work as expected:
10. Go to the cities page
11. Add two cities:
- 'Cordoba %'
- 'Buenos Aires _'
- 'London \'
12. Use the column search on the name, alternating _, \ and % as the query
=> SUCCESS: Filtering works correctly!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31565: Escape datatables MySQL special characters only in LIKE queries
Escaping \ yields no results when performing exact search in datatables.
This patch adds MySQL special character escaping only to LIKE searches.
To test:
1. Add following categorycode 'TEST\CAT' by SQL
insert into categories (categorycode,description) values ('TEST\\CAT', 'TEST\\CAT');
2. Add a patron into TEST\CAT category
3. Go to patron search
4. Limit search by category TEST\CAT
5. Observe no results
6. Apply patch
7. Refresh patron search page
8. Limit search by category TEST\CAT
9. Observe Koha redirecting you to patron you chose in step 2
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 31565: (QA follow-up) Remove support for _ as wildcard in -like queries
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31525: display streetnumber with address in patron search
Adds back street number to the address when searching for patrons
To test:
1) Edit a patron's contact information
2) Under Main Address put an address, make sure to put something in the
Street number field
3) Do a simple patron search that will yield results (i.e. "a")
4) Confirm the street number does not show, but the rest of the address
does
5) Apply this patch
6) Do another patron search
5) Confirm the street number now shows
Sponsored-by: Catalyst IT
Testing note: AddressFormat system preference must be set to "US style"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 432f058a722cd66cdb2ebde4d8d47222830a7632)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31518: Fix syntax error on request.tt that prevents showing hidden item count
The variable set by request.pl doesn't have biblio prefix, it is just
hiddencount.
To test:
1) Log in with a staff member account that has "Lost items in staff
interface" setting set to "Hidden by default" in the patron category
settings
2) Add a lost item to biblio
3) Go place a hold on staff interface (request.pl) notice the broken
link on the request page: "Show all items ( hidden)"
4) After applying the patch it should read "Show all items (1 hidden)"
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a45b105c241ebc845b3c8585622cab53a4dc9a0d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 8 Aug 2022 12:15:16 +0000 (12:15 +0000)]
Bug 25375: Match current Zebra availability limit
In Zebra the availability limit code states:
'available' is defined as (items.onloan is NULL) and (items.itemlost = 0)
We should make ES follow the same behaviour so that changing the engine does not
change this.
To test:
1 - Find or create several records with two items each
2 - For those records setup items as:
a - one checked out, one available
b - both marked lost
c - both damaged
d - both withdrawn
e - both notforloan
3 - Enable ES and reindex to confirm everything is set
4 - Perform an advanced search to return those records and 'limit to available items'
5 - Confirm you see records b,c,d,e and records say '2 items, none available'
6 - Apply patch
7 - Run `misc/search_tools/rebuild_elasticsearch.pl -d -b`
8 - Perform an advanced search to return those records and 'limit to available items'
9 - Confirm you see records a,b,c,d and al but a say '2 items, none available'
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6ace414f72be24949acb07f1c739bb031cc1faf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Thu, 3 Mar 2022 10:18:25 +0000 (11:18 +0100)]
Bug 25375: Add tests for the "available" ES field
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f48c5bbb8b10ada5e10c63040a88693079b815f2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 11 Sep 2020 15:23:02 +0000 (15:23 +0000)]
Bug 25375: (QA follow-up) Count available items rather than iterating
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d9cb39e57d1e5c979c605e48493ee5f40df3dac4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Fri, 4 Sep 2020 08:25:17 +0000 (12:25 +0400)]
Bug 25375: Get biblionumber from the correct MARC field
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0ce7293ad52c9f817859e34d8161a847c58f1707)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Wed, 29 Apr 2020 14:13:08 +0000 (16:13 +0200)]
Bug 25375: Fix 'available' facet in elasticsearch
Add a new boolean ES field named 'available', which is true if at least
one item is available, which means the item is not on loan, not
"notforloan", not withdrawn, not lost and not damaged
A full indexation is required
Test plan:
1. Apply patch and run updatedatabase.pl
2. Run `misc/search_tools/rebuild_elasticsearch.pl -d -b`
3. Make sure you have some biblios whose items are all unavailable, some
biblios whose items are all available, and some biblios with at least
one item available and at least one item unavailable
4. Use the 'available' filter on both opac and intranet and make sure it
works as expected.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d79361c51e9349a5bbbe3212fde40d3ad4d6b946)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 17 Jun 2022 07:21:39 +0000 (09:21 +0200)]
Bug 30982: [22.05.x] Use the REST API for background job list view
Bug 30982: REST API specs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: (QA follow-up) Double quoting and console.log
This patch fixes the issues highlighted by the QA script; We use double
quotes for translatable strings in JS and remove an errant console.log
call.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: Add tests and implement GET /background_jobs/$id
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: Make code more re-usable
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: Add 'context' to the REST API specs
context has been added by bug 30889
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: Add Koha::BackgroundJobs->filter_by_current
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: API tweaks
This patch makes the following changes to the 'background_jobs' API:
* We now call them 'jobs'
* Removed deprecated query parameter definitions
* Added only_current query parameter
* Controller gets adapted to use $rs->filter_by_current when
only_current is passed
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: Adapt table to new API spec
Disclaimer: this patch is highly opinionated :-D
When I started looking at this patch I felt like the two tables
(current/past jobs) implemented on bug 30462 was the way to go.
In order to make this patches apply after it I had to redo all the
things. Or most of them.
But I decided to keep the idea of filtering out completed tasks, not
just having the option to display 'the last hour' tasks. For the task I
added some required helper methods and the relevant tests as well. So a
behavior change.
Hope you all agree with it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: Rename 'Background Jobs' => 'Jobs'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: (QA follow-up) Resolve pod warning
Empty section in previous paragraph at line 32 in file Koha/BackgroundJobs.pm
Test plan:
Run podchecker again on this module.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: (QA follow-up) Spelling
[1] Correct: BackgrounJob
[2] If should filter out not current jobs
=> Had a hard time reading that one until I replaced if by it.
=> Decided to rephrase it in a more positive way.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: (QA follow-up) Remove redundancy from template
The template now contains two lists for both status and type:
a TT list and a JS list. The type list already proves that
redundancy leads to bugs. We miss three types at one side:
Unknown job type 'stage_marc_for_import'
Unknown job type 'marc_import_commit_batch'
Unknown job type 'marc_import_revert_batch'
This patch removes the TT list. And gets the status and type
via an additional js call. For that reason I hide the fieldset
until document ready. This can be improved later when needed.
Test plan:
Look at status and type on both job list and detail view.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30982: (QA follow-up) No userenv, no jobs
+ # Assume permission if context has no user
+ my $can_manage_background_jobs = 1;
=> This felt a bit unsafe.
Test plan:
Try interface for jobs. Call API with cookie. Call API with OAuth.
Run t/db_dependent/Koha/BackgroundJobs.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Tue, 7 Jun 2022 10:08:32 +0000 (11:08 +0100)]
Bug 30462: [22.05.x] Separate Queued and Complete jobs
This patch updates the background jobs management page to display
queued and completed jobs in their own tabs on the page.
JD Amended patch:
Fix QA failures:
FAIL koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
FAIL forbidden patterns
forbidden pattern: trailing space char (line 158)
forbidden pattern: trailing space char (line 256) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30462: (follow-up) Limit completed to 60 minutes
This follow-up reduces the completed jobs list to only those jobs
completed within the last 60 minutes.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30462: Remove 'Ended' column for current jobs
This column will always be empty
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30462: Fix display of the complete jobs
We want to display the jobs terminated in the last hour, not today.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 30462: (QA follow-up) Tab name change
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 14 Sep 2022 11:27:03 +0000 (11:27 +0000)]
Bug 31562: [22.05.x] Treat flags as other borrower fields
Rather than generate a custom hash for these fields, we should treat them as other borrower data fields
To test:
1 - Edit a patron, note the 'Lost card' and 'Gone no address' fields
2 - Edit syspref BorrowerunwantedField
3 - Set gonenoaddress and lost as unwanted
4 - Edit patron, the fields remain
5 - Apply patch
6 - Edit a patron, fields are hidden
7 - Unhide one of the fields
8 - Edit a patron and confirm it shows and saves correctly
9 - Unhide the other field
10 - Confirm it can be edited and saved
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 31562: Remove gonenoaddress and lost from OPAC borrower field preferences
These are not shown, so cannot be unwanted or mandatory
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 31562: Respect mandatory fields pref
To test:
1 - Set gonenoaddress and lost in BorrowerMandatoryField
2 - Edit a patron, confirm fields are required
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 26 Aug 2022 13:32:50 +0000 (13:32 +0000)]
Bug 31367: Add subtotals if budget has children
On bug 29287 we added child funds if a fund had no parent id
It turns out funds can have a parent, and still have children (sub-sub-funds)
This patch simply checks for children, rather than checking for lack of parent.
Totals are already calculated correctly in GetBudgetHierarchy
To test:
1 - Add a fund "Fund" to a budget - assign 1000 dollars
2 - Add a sub-fund "SubFund" - assign 100 dollars
3 - Add a sub-sub-fund "SubSubFund" - assign 10 dollars
4 - Add to a basket $5 order from SubSubFund
5 - Add to a basket $50 order from SubFund
6 - Add to a basket $500 order form Fun
7 - View acqui home - note 'SubFund' does not include total from 'SubSubFund'
8 - Apply patch
9 - Confirm all sub-sub-funds totaled in sub-funds and that fund total correctly adds sub and sub-sub funds
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6523db73214c57d6a6b8ea2d4c3731445ccddf1f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Julian Maurice [Thu, 8 Sep 2022 10:20:11 +0000 (12:20 +0200)]
Bug 27550: Add unit test for CloneBudgetHierarchy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca338bae1e751228a1107237574b8f335c12b7bb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 27550: "Duplicate budget" does not keep users associated with that budget
When a budget is duplicated, Owner is copied but not Users
Test plan :
Home > Administration > Budgets
1)Create a budget to allow (active or inactive)
2)Give it some funds by filling up the form, especially Owner and
User(s)
3)Submit then go back to the Budgets dashboard
4)Duplicate the Budget and click on its name
5)Edit it and notice that User(s) is empty
6)Apply the patch
7)Repeat from 1) to 5)
Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ed97960cd7f8105eb5f913770089218cf7dd559d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 14 Sep 2022 13:23:58 +0000 (13:23 +0000)]
Bug 31564: Pass start label in PDF link
To test:
1 - Tools->Lbel creator
2 - Make a new batch
3 - Add an item
4 - Click 'export' on the single item
5 - Enter a starting label position greater than 1
6 - Click Export
7 - Click Download as PDF
8 - Note label in 1st position
9 - Apply patch
10 - Repeat and note label position now honored
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c3f50d1575099f254884b0dcb2c97d41851a85b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Joonas Kylmälä [Mon, 29 Aug 2022 20:39:13 +0000 (20:39 +0000)]
Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl
With UseCashRegisters syspref disabled going to the page
/cgi-bin/koha/circ/set-library.pl in staff interface and setting a
library gives the following errors in plack-intranet-error.log:
Use of uninitialized value $register_id in string ne at /kohadevbox/koha/circ/set-library.pl line 79.
Use of uninitialized value $referer in pattern match (m//) at /kohadevbox/koha/circ/set-library.pl line 114.
In the if clause $userenv_register_id appears to be typoed, it should have
been $register_id as $userenv_register_id is always defined. As for the
$referer variable, it is undef if there is no referer so let's just initialize
it to an empty string for the regex so it doesn't give the warning.
To test:
1) Go directly to /cgi-bin/koha/circ/set-library.pl by typing it in
the URL bar and set a library
2) Make sure plack-intranet-error.log doesn't contain the above mentioned errors
after applying this patch
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e25fa1dc5267f6fb6148412f0774c6880a2e7c3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Isobel Graham [Thu, 1 Sep 2022 11:06:26 +0000 (12:06 +0100)]
Bug 30890: Fixed ILL breadcrumb
Added correct breadrumb depth when managing requests.
1. Viewing a request on a ILL request page
2. Making sure the breadcrumb has three depths
and the manage requests has the correct
request id
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 49577829d969fba34bf6655da4e0356f1f0ec5d2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31598: Fix random failure on Jenkins for Upload.t
At some point the warn is made conditional for permanent
files. So it failed when TestBuilder picked a zero value
for permanent. Trivial fix.
Test plan:
Run t/db_dependent/Upload.t a few times
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a92ee31945af6f535e8be81b3410d13affd8b5f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 16 Sep 2022 11:06:17 +0000 (11:06 +0000)]
Bug 31497: (follow-up) Expand ID suffix, fix password2, remove debug
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f0642e4a1fca066ca48cfade8e8d50c4e7611e63)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 13 Sep 2022 12:19:57 +0000 (12:19 +0000)]
Bug 31497: Prevent ID clash on quick add fields
The quick add clones the original fields, including ids. This can cause some clash when
other JS is running on the page.
This patch updates the ids of the fields before adding to the form, which prevents bad
copying/clearing of fields
To test:
* Go to patrons module
* Click on Quick add new patron (I chose Patron as category)
* On sample database these fields are marked as mandatory:
* Surname
* Cardnumber
* Library
* Category
* Fill in Surname, leave cardnumber empty
* Save - mandatory message is shown
* Fill in cardnumber - save
* The patron is saved
* BUT: cardnumber is empty!
APPLY PATCH
* Repeat plan above
* Cardnumber is correctly saved
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f599e2a2a8c9f6caed4fe4ae6060b106d2a1004)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 25 Aug 2022 11:18:18 +0000 (11:18 +0000)]
Bug 30359: Unit tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b1e3398e84674f443d1b3c348058e45291f45e8e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Johanna Raisa [Fri, 25 Mar 2022 10:25:56 +0000 (12:25 +0200)]
Bug 30359: GetBudgetHierarchy is slow on order receive page
This patch adds skiptotals parameter to GetBudgetHierarchy so calculating
totals can be skipped from some pages.
Test plan:
1) Open browser's Inspect -> Network
2) Go to receive orders
3) Check the timings for page load
4) Apply the patch
5) Refresh the page
6) Check the timings again
7) prove t/db_dependent/Budgets.t
Sponsored-by: Koha-Suomi Oy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 35724169c11352d4cc1e22fcd50e91d39b7d8c44)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31342: Add execution locking to process_message_queue.pl
This patch makes the script use an execution lock as provided by
Koha::Script. Previous attempt got too complex and contentious, and
given we have a simple way to achieve the same thing, I decided to
submit an alternative approach.
To test:
1. Apply this patch
2. Add the following content to misc/cronjobs/process_message_queue.pl
on line 83:
sleep 100;
3. Save the file
4. Have two terminals open
5. On the first one, run:
$ kshell
k$ misc/cronjobs/process_message_queue.pl
6. On the second one, run the same
=> SUCCESS: The second one dies telling it had to skip the run
7. Undo your changes:
$ git checkout misc/cronjobs/process_message_queue.pl
8. Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Liz Rea <liz@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a80a96b93381a12740b8548b5d92a55bbec0b085)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Thu, 8 Sep 2022 03:06:59 +0000 (03:06 +0000)]
Bug 31531: Remove unnecessary use directives on opac-memberentry.pl
This patch just removes two redundant use directives in opac-memberentry.pl
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c893f7372b6a080435bd493730530c7f275cd06)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Fri, 5 Aug 2022 18:36:50 +0000 (08:36 -1000)]
Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl
In search_for_data_inconsistencies.pl when there are several inconsistencies on same framework, the second output of items contains the first one.
Looks like it is since Bug 21466
Test plan using koha-testing-docker :
1) Create 2 inconsistencies on the same item via SQL :
update items set itemlost = 9 where itemnumber=900;
update items set notforloan = 8 where itemnumber=900;
2) Without patch
3) Run ./misc/maintenance/search_for_data_inconsistencies.pl
=> You see duplicate output :
== Wrong values linked to authorised values ==
* The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }):
{900 => 8}
* The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }):
{900 => 8} {900 => 9}
4) Apply patch
5) Run ./misc/maintenance/search_for_data_inconsistencies.pl
=> Fixed :D
== Wrong values linked to authorised values ==
* The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }):
{900 => 9}
* The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }):
{900 => 8}
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3d0015fe6932f2fed3aba79b1fc99ecb6d1d3504)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This version has a known issue on images drag and drop :
https://stackoverflow.com/questions/64782955/tinymce-inline-drag-and-drop-image-upload-not-working
Test plan :
1) Go to Tools > HTML customizations
2) Create a new entry (not using text editor)
3) Drag and drop an image
=> Without patch you see an error message from TinyMCE 'Dropped file type is not supported'
=> With patch : It works !
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d0f09eaa6412eb83ebe7e17faa550628fa7e6cab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Tue, 13 Sep 2022 06:46:46 +0000 (06:46 +0000)]
Bug 28553: (QA follow-up) default to auto renew email when cron switched used
This patch defaults to using "email" rather than "sms" notices
when AutoRenewalNotices is set to use the --send-notices cron switch
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88f63e01d29917e9323c57be97aaa91b9e00fd92)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Mon, 18 Jul 2022 16:37:48 +0000 (12:37 -0400)]
Bug 28553: Patrons can be set to receive auto_renew notices as SMS, but Koha does not generate them
Following bug 18532, one can set a patron's messaging prefs to deliver an auto-renew notice via SMS.
However, the auto_renewals cron only knows how to generate email notices. We should not allow the selection of non-functional transport types.
Test Plan:
1 - Set pref AutoRenewalNotices - 'according to patron messaging preferences'
2 - Set circ rule with:
Loan period: 5 days
No renewal before: 5
AutoRenewal: Yes
Renewals allowed: 5
3 - Set SMS Send driver to Email
4 - Find a patron and set them to receive auto renewal notices via SMS and no other transport
5 - Provide a proivder and sms number for the patron
6 - Checkout an item to the patron, set due date to yesterday
7 - Run auto renewals:
perl misc/cronjobs/automatic_renewals.pl -v --send-notices -c
8 - Item renewed, no message sent
9 - Check in item, checkout again due yesterday
10 - Apply patch
11 - Browse to Tools->notices and slips
12 - Edit AUTO_RENEWALS and AUTO_RENEWALS_DIGEST to copy email template to sms and add a title
13 - perl misc/cronjobs/automatic_renewals.pl -v --send-notices -c
14 - Item renewed, confirm patron has a notice in their account
15 - Check the digest option, check in item, checkout again as due, repeat cronjob and note digest notic
16 - sign off
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fef29151e0dd6287f8e4e49effc9d9666bf87582)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4481817701f0789f407f8bdfdcaeeb49c5239e5e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 10 Aug 2022 09:12:06 +0000 (11:12 +0200)]
Bug 31239: Fix incorrect AV linked to a mapped biblio column
If an AV is linked to a MARC field mapped with a biblio column, the
search_for_data_inconsistencies.pl script might explode with
The method Koha::Biblioitem->title is not covered by tests!
Trace begun at /kohadevbox/koha/Koha/Object.pm line 875
Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x556b67fa7168)') called at misc/maintenance/search_for_data_inconsistencies.pl line 246
Test plan:
For a given framework, pick a biblio using it
Link 245$a with an authorised value category
Run the script
=> Notice that with this script applied you will see the warning
=> Without this patch you got the error
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 54711942f1b34fc9d94a61f42734525a03db893a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 17 Oct 2022 14:00:25 +0000 (16:00 +0200)]
Bug 31154: Avoid unecessary loop
We don't need to loop over the subfield and enter this block if there is
no record.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b582f7d495fceda68a7972f7eab0d4e5d16bdcdf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 17 Oct 2022 13:59:52 +0000 (15:59 +0200)]
Bug 31154: Add test
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edf8640cff4c929196d1768152a705fb350317a0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The change in batchMod.pl is not needed when we fix the builder.
But we could at least add a comment there!
Note that passing the biblionumber of the first item does not
make sense since we are modifying items from several biblio
records normally. We most probably do not want this MARC
record's itemcallnumber (via the syspref) in all our items.
Test plan:
Test batchMod with and without the Populate fields checkbox.
Fill syspref 'itemcallnumber' with e.g. 084a.
Check Populate, and try again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb292431401a7ed0782427412eb1208fa7716e4c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31154: Pass biblionumber to Koha::UI::Form::Builder::Item->new from batchMod.pl to prevent error 500
When one tries to batch mod items and has "Use default values"
checkbox checked on and they have value in syspref "itemcallnumber",
Koha dies on error 500. In logs it reads:
Can't call method "field" on an undefined value at
.../Koha/Koha/UI/Form/Builder/Item.pm line 164.
This happens because in batchMod.pl line 269 we don't pass
biblionumber as parameter to Koha::UI::Form::Builder::Item->new
and thus Koha fails to fetch biblios marc record.
To test:
1. Confirm you have/set value to syspref "itemcallnumber" e.g. 084a
2. Find some item(s) to modify
3. Provide barcodes of those item(s) and check checkbox "Use default values"
4. Hit "Continue"
=> error 500 is raised
5. Apply patch.
6. Repeat steps 3. and 4.
=> no error is raised
Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 355ab980cc306a61e5e9e62608c5d9d1bf8e3b37)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31513: (QA follow-up) Keep price formatting on non-editable text fields
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c4e8f0af70344f263f64eccccf8817ddc18f8585)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sun, 11 Sep 2022 14:50:56 +0000 (16:50 +0200)]
Bug 31513: Remove price formatting form data- attributes
We cannot use data formatted with a decimal comma for
calculations. So we need to make sure that the data- attributes
passed to the modals are in 'database format' with decimal .
This will fix the NaN errors on the forms, but might also
negatively effect formatting in some spots.
Formatting should be fixed separately as this is for sure the
right first step, but we need to put in more work for displays.
To test:
* Set CurrencyFormat system preference to FR
* Go to any patron account > accounting tab
* Create a credit
* On Transactions tab: Payout amount at bottom = Verify NaN in input
* On Transactions tab: Issue payout on the credit line = Verify NaN in input
* Create a manual debit and pay it
* On Transactions tab: Issue refund = Verify NaN in input
* Apply patch
* Repeat test plan
* Now all input fields should be set with the correct amounts
Nick Clemens [Wed, 3 Nov 2021 16:53:47 +0000 (16:53 +0000)]
Bug 29409: Check for data that violates a constraint to avoid update problems
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4455a589372e3205f9a7456478ad4585c90bedb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 3 Nov 2021 16:51:09 +0000 (16:51 +0000)]
Bug 29409: Check for existence of constraint before deletion
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 012e5bff1c79d8a2cc580a43c832ace5e51bec79)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31516: Add error message for viewing enrollments for a non-existent club
To test:
1) Go to non-existent club's enrollment page, e.g.
http://localhost:8081/cgi-bin/koha/clubs/club-enrollments.pl?id=1010101001000
2) Notice the not fully filled header text and empty table
3) Apply patch and revisit the page to see the proper error message given
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c757abd675c538a55c93bf3e337e16c0911d06e7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Mon, 29 Aug 2022 21:48:01 +0000 (21:48 +0000)]
Bug 31486: Redirect to proper page after message deletion
To test:
1. Go to a patron account and create some messages
2. Try deleting some from both the patron details page and the patron checkout page.
3. Notice that is you are on the patron checkout page and delete a message you are then redirected to the patron details page.
4. Apply patch
5. Try deleting messages from both pages and confirm you are redirected back to that same page and the message is properly deleted.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a93d6fa8530aa2b92d7b443e1361e4428c1c4f1b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Wed, 8 Dec 2021 13:44:38 +0000 (13:44 +0000)]
Bug 29658: Fix crash on cancelling cancelled order
Found this crash in our 20.11 logs:
Cannot insert order: Mandatory parameter biblionumber is missing at /usr/share/koha/acqui/cancelorder.pl line 60.
at /usr/share/perl/5.28/Carp.pm line 289
Carp::croak('Cannot insert order: Mandatory parameter biblionumber is missing') called at /usr/share/koha/Koha/Acquisition/Order.pm line 79
Koha::Acquisition::Order::store('Koha::Acquisition::Order=HASH(0x55f3760e2860)') called at /usr/share/koha/Koha/Acquisition/Order.pm line 189
Koha::Acquisition::Order::cancel('Koha::Acquisition::Order=HASH(0x55f3760e2860)', 'HASH(0x55f375a17ec0)') called at /usr/share/koha/acqui/cancelorder.pl line 60
Not sure how to reproduce this one as it happened. But might be related to repeated clicking, backspacing etc.
Test plan:
Create a new basket and order.
Open this same basket in two browser tabs.
Cancel the order line (delete catalog record) in tab 1.
Go to second tab, try again.
Without this patch, it will crash. With this patch, an error message.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2a3ba5f8253c6bafef17caf03645d70a90a96dea)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31530: Remove HTML tags in TT comments in patron-search.inc
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
To test:
1) Without patch, search for patron-search.inc in misc/translator/po/xx-XX-staff-prog.po
--> There should be strings with pound signs such as "%%] %s [%%# - branch: "
2) Apply patch
3) Update translation files `translate update xx-XX`
4) Search again for patron-search.inc in
misc/translator/po/xx-XX-staff-prog.po
--> The problematic strings are not there anymore
5) In the staff interface, go to Patrons, the search box and search
function should be unchanged
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 613554edc6c308f2bd97e17ceae13b7069b9fcd9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Thu, 18 Aug 2022 14:32:46 +0000 (14:32 +0000)]
Bug 31250: (QA follow-up) The future will be easier
As requested by Jonathan, we need more flexibility ;)
Here it comes.
Test plan:
Run t/CookieManager.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cffd36bcb47439d80401e52091f0d2808bc52cb6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31250: Add catalogue_editor_ cookie to koha-conf deny list
Test plan:
Add this change to your koha-conf.xml.
Flush, restart.
Test if the cookie is kept now in the interface.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf8e560e37c24b0cc7fd3e1aeb286de5e370ea37)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31250: Deny clearing cookies with numeric suffix
This change allows us to add catalogue_editor_ to the deny list
in koha-conf.xml and keep cookies like catalogue_editor_123.
Test plan:
Run t/CookieManager.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
To test:
1 - Sign in to staff client
2 - Search for records and edit one
3 - Switch to advanced editor
4 - View cookies (F12/developer panel/storage tab)
5 - Note cookie like 'catalogue_editor_##' with value 'advanced'
6 - Log out
7 - note cookie value deleted
8 - Log in and search/edit a record
9 - Basic editor loads
10 - Apply patch
11 - Add line to koha-conf as described in second patch
12 - Restart all
13 - Switch to advanced editor
14 - Cookie value updated
15 - Logout
16 - Cookie value remains
17 - Log in and search/edit
18 - Confirm advanced editor loads
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cb036faf2c534a14708b517cea40d98fc6e344c2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
In koha-tmpl/intranet-tmpl/prog/css/mainpage.css the rule of
font-family for big links is not complete :
font-family: verdana, arial;
It is missing sans-serif in case computer has not those fonts.
On my computer I dont have them so I see a serif font.
We can remove this rule, inherited rule is serif fonts.
Test plan :
1) Use a computer without Arial nor Verdana fonts (basically a Linux)
2) Look at home page big links : Circulation, Patrons ...
=> Without patch they have serif font
=> With patch they have sans-serif font
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca6c132bace1b8e3ef770fb376e0101c8bfd7cd8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30483: Make issues.borrowernumber and itemnumber NOT NULL
Note: This change does NOT apply to old_issues, where constraints
may result in nullifying these columns.
Test plan:
Run dbrev.
Try checkout, checkin.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f44891fd835080133fa1a73634ced0e68b96892)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle Hall [Fri, 2 Sep 2022 14:27:39 +0000 (10:27 -0400)]
Bug 31401: (QA follow-up) Remove Koha.ArePluginsEnabled, it is no longer needed
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c5810c360544de96bf3fb2000c135836b6e2ee10)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Thu, 18 Aug 2022 21:26:54 +0000 (21:26 +0000)]
Bug 31401: Update administration sidebar to match entries on administration start page
This makes sure that all entries on the administration start page
have a matching entry in the administration sidebar that shows
on the left side if you are on any of the administration sub pages.
Changes made:
* Rename 'Classification sources' to 'Classification configuration'
* Make Plugins entry show and appear in correct spot
This relied on the variable plugins_enabled that wasn't available
in all the different templates. I therefore moved it to Auth.pm
and cleaned up the code for the admin start page.
* Move 'MARC overlay rules' and rename to 'Record overlay rules'
To test:
* Make sure plugins are enabled and visible on admin start page
* Compare admin start page and sidebar
* Sequence should be the same
* All entries should appear on both pages
* Naming should be the same
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa90b60ea2979279a5e134eb9cbc7cb3d6075417)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 19 Aug 2022 09:59:24 +0000 (09:59 +0000)]
Bug 26626: (follow-up) Be consistent with icon and accesskeys
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc66a51e0730bc73c0e8ecfe970b0c52d63d3d62)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Wed, 4 Aug 2021 17:06:07 +0000 (17:06 +0000)]
Bug 26626: (follow-up) Update icon selection
This patch changes the "Ignore" button to use an X icon and the "Cancel"
button to use a "Trash" icon.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e62b8bde068dcac607f155d8267c2bc41cd4f023)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 2 Aug 2021 12:26:29 +0000 (12:26 +0000)]
Bug 26626: Add 'Ignore' option to confirmed holds modal
This patch adds 'Ignore' to the 'Hold already waiting' modal
To test:
To recreate:
1 - Place a hold for pickup at library A
2 - Checkin the item at Library A
3 - Note the modal has 'Ignore' option
4 - Click it, nothing happens
5 - Check in the item again, same modal
6 - Click 'Confirm'
7 - Check in the item again
8 - Now 'Ignore' is replaced by 'Cancel'
9 - Click 'Confirm' to dismiss modal
10 - Apply patch
11 - Check the item in again
12 - Note 'Ignore' button before 'Cancel' button with '-' icon
13 - Go to biblio holds page
14 - Revert waiting status
15 - Check item in again
16 - Note ignore now has '-' (minus) icon
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e8da261957e98c5a56e37a910adcb943c8cf67f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 12 Jul 2022 13:46:55 +0000 (13:46 +0000)]
Bug 31023: Quote authtypecode in FindDuplicateAuthorities
To test:
0 - Have Koha using Elasticsearch
1 - Set QueryRegexEscapeOptions to 'unescape escaped'
2 - Attempt to add a new 'GENRE/FORM' authority record
3 - On save you get a 500 error
Unable to understand your search query, please rephrase and try again.
at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Search.pm line 102
4 - Apply patch, restart all
5 - Attempt to add a new 'GENRE/FORM' authority record
6 - Success!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dee864c1edff70f58dfaffcffa102e0663400425)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 12 Jul 2022 13:46:27 +0000 (13:46 +0000)]
Bug 31023: Unit tests
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df184560a5de428ed6eaaff437cb5dd450f45726)
Nick Clemens [Fri, 2 Sep 2022 06:39:39 +0000 (06:39 +0000)]
Bug 28290: (follow-up) Unit test
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e36e6c55a7854b7f6e5f7c9d90f57f9b5e5c0f0a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 4 May 2021 18:29:05 +0000 (18:29 +0000)]
Bug 28290: Don't send subfields to 'as_string' if none to send
This fixes an error where we send a blank string to
Marc::Field->as_string
The subroutine fails as the regex is marked as incomplete as there is
nothing between the brackets
Also fixes a missing hidden input for 'item_action' when no items are
staged during import
1 - Define a new matching rule with no subfields
Match-threshold: 1000
Record type: bibliographic record
Search-index: Other-control-number
Score: 1000
Tag: 035
Subfields:
Offset:
Length:
2 - Attempt to stage a record with an 035 using this rule (i will
attach example to bug)
3 - Staging fails
4 - Stage again with no matching rule
5 - Manage the staged record, try to apply the matching rule
6 - It fails, 500 error
7 - Apply patch
8 - Restart all the things
9 - Apply rule again, it works!
10 - Stage the record again using the rule for matching
11 - It stages and matches!
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eded6edacc5e3bf8dd0be21ed05842c3b78aadce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Isobel Graham [Thu, 1 Sep 2022 11:37:06 +0000 (12:37 +0100)]
Bug 29608: Made so doesn't require full permission
Made so the numbering sequence does not need to require full
permission.
1. Edit number patterns a confirm you don't need full permission
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 36d88b135d072f9335db46093c0e440e0cdfb2c3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 31 Aug 2022 20:59:31 +0000 (20:59 +0000)]
Bug 31483: Close <ol> tag properly on password reset page
To test:
1) Enable EnableExpiredPasswordReset
2) Find a patron and change their password so you know what it is supposed to be
3) In the database, expire the patron's password, e.g.
UPDATE borrowers SET password_expiration_date = '2022-08-22' where borrowernumber = 21;
4) Go to the OPAC, try to log in with the patron's credentials
5) Click Reset your password
=> Note that the form is in the grey breadcrumbs box, you can compare with any other OPAC page, the grey box should only contain the breadcrumbs
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c8e77771236306a13dba6166a08a18669fca4c3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30042: Remove Date::Calc dependency in batch_anonymize.pl
This patch makes the script use the Koha::DateUtils tools instead.
To test:
1. Run:
$ kshell
k$ perl misc/cronjobs/batch_anonymise.pl --verbose --days 7
=> SUCCESS: You see (the date may vary):
Checkouts and holds before 2022-02-15 will be anonymised.
2. Apply this patch
3. Repeat 1
=> SUCCESS: Same output
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit caebb20cbb9f456750390d6494c568536dc1066c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31364: Check length of the multiple syspref array instead whether it is null
The multiple systempreferences are always defined as an empty array at
the minimum, so in order to determine whether we need to remove all
the selections from the systempreference we should check whether the
array is empty and not whether the array doesn't exist.
To test:
1) Set at least 1 value for OPACHoldsIfAvailableAtPickupExceptions
2) Remove all the values for OPACHoldsIfAvailableAtPickupExceptions
and notice you get the message "Nothing to save"
3) Apply patch and repeat, removing all the values should work now.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ce1efe7de0d71362f930a8fc5415fda797531a0b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Isobel Graham [Thu, 1 Sep 2022 09:44:37 +0000 (10:44 +0100)]
Bug 31488: Update Max checkout text
This changes text from "you have checked out too many items" to
"You have reached the maximum limit of items checked out".
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7a90be2ff221df5e7ab575e89063f6e8dcc99c29)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30231: (bug 5927 follow-up) See (rejected) forms of series entry visible in search result (OPAC and intra)
When using zebra with IncludeSeeFromInSearches on, with traced series, the rejected
forms (4XX) of series entries are visible in result lists, both in OPAC and intra
interfaces.
Test plan:
=========
1. Have a MARC 21 installation with zebra, and with IncludeSeeFromInSearches on.
Have an authority records for series (130, or 100/110/111 with
title) with rejected forms (4XX fields). So the auth record should
contain at least:
130 _0 $a Series title
430 _0 $a Some other title under which the series in known
Use (each) authority record in at least two biblio records (in appropriate
fields, i.e. 800/810/811/830 or even deprecated 440, if it makes use
of UNIF_TITLE).
Don't forget to properly input also 490 (for 8XX). So the biblio record
shold contain at least:
245 nn $a Work title.
490 1_ $a Series title
830 _0 $a Series entry $9 <koha_id>
Reindex.
2. Perform a simple biblio search (in OPAC and in intra) with the title
from auth record.
3. You shold get a list of results. See the Series information--you
shold see not only the accepted entry from 1XX in auth but also the
rejected forms from 4XX.
4. Apply the patch.
5. Repeat 3. You shold see only the entry form of series now.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3f90b7b43d0ed927ddac92af5be226d1ede6429f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 12 Aug 2022 16:19:49 +0000 (16:19 +0000)]
Bug 31356: Use hold expiration date instead of adding days to the waiting date
The Talking Tech outbound script currently just adds the
ReservesMaxPickUpDelay to the waiting date to calculate the
"expiration date", but it should use the actual hold expiration
date which may differ from this naive calculation based on
various system preference values.
Test Plan:
1) Create a holiday for tomorrow
2) Set ReservesMaxPickUpDelay to 5
3) Set "Days mode" to "Same week day"
4) Enable ExcludeHolidaysFromMaxPickUpDelay
5) Enable TalkingTechItivaPhoneNotification
6) Create a hold and fill the hold so it is waiting
7) Enable "Hold filled" phone notices for that patron
8) Create a 'phone' version of the HOLD notice
9) Run ./misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type RESERVE -w 0
10) Note the output has the expiration date ( 15th colume ) 5 days from now which is *not* the hold's expiration date
11) Apply this patch
12) Repeat the command from step 9
13) Note the expiration date column now matches the holds actual expiration date!
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6a08737c9ad9c85e98887e3a55cf31029c5a8c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>