]> git.koha-community.org Git - koha.git/log
koha.git
6 months agoBug 6796: Fix display of libraries table
Martin Renvoize [Fri, 9 Feb 2024 15:45:28 +0000 (15:45 +0000)]
Bug 6796: Fix display of libraries table

Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: Fix api specifications and embed hours in librarly management
Martin Renvoize [Fri, 9 Feb 2024 15:38:34 +0000 (15:38 +0000)]
Bug 6796: Fix api specifications and embed hours in librarly management

Sponsored-by: PTFS Europe
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: (follow-up) Displaying library hours
Aleisha Amohia [Tue, 10 Oct 2023 04:06:48 +0000 (04:06 +0000)]
Bug 6796: (follow-up) Displaying library hours

This patch shows the set library hours on a library's view page.
Still to be done:
- show on the Libraries summary page
- write tests
- consider time format settings
- fix translateability of day names in Libraries summary page

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Sponsored-by: PTFS Europe
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: (follow-up) QA test tool fixes
Aleisha Amohia [Mon, 1 May 2023 22:10:44 +0000 (22:10 +0000)]
Bug 6796: (follow-up) QA test tool fixes

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: Don't add a day if hourly loan period pushes due date
Aleisha Amohia [Fri, 5 Aug 2022 03:00:52 +0000 (15:00 +1200)]
Bug 6796: Don't add a day if hourly loan period pushes due date

If ConsiderLibraryHoursWhenIssuing is set to shorten the loan period to
the closing time, if the loan period initially pushes the due date to
the following day, the day still gets added when calculating the due
date. We simply need to hardcode the due time here as the due day is the
same as the issue day.

We only need to calculate a due date if ConsiderLibraryHoursWhenIssuing
is set to extend the loan period to the next opening day, as we'll need
to consider holidays/closed days.

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: Fix saving of libraries and tests
Aleisha Amohia [Mon, 1 May 2023 02:56:42 +0000 (02:56 +0000)]
Bug 6796: Fix saving of libraries and tests

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: (follow-up) Fix logic for calculating following day's open hours
Hayley Pelham [Thu, 28 Apr 2022 23:43:52 +0000 (23:43 +0000)]
Bug 6796: (follow-up) Fix logic for calculating following day's open hours

Since days for branch hours are stored as 0-6 in the database, when it's
a Saturday (6) incrementing the date leads to an error when issuing an
hourly loan because no opening hours are found for the non-existent day
(7).

This patch fixes this by calculating the tomorrow day and setting it to
0 if it's greater than 6.

This patch also corrects the mappings for days, where local_day_of_week
caluclates the date with Sunday first, which put it out of sync with the
database opening hours days.

Sponsored-by: Catalyst IT
Sponsored-by: Auckland University of Technology
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: Consider library hours when calculating due date + tests
Aleisha Amohia [Tue, 7 Sep 2021 15:59:12 +0000 (03:59 +1200)]
Bug 6796: Consider library hours when calculating due date + tests

This feature adds the ability to set opening and closing hours for your
library and for these hours to be considered when calculating due dates
for hourly loans. If the due date for an hourly loan falls after the
library closes, the library can choose for the due date to be shortened
to meet the close time, or extended to meet the open time the next day.
This feature adds a new table 'branch_hours' for storing the open and
close times per day for each library, and a new system preference
'ConsiderLibraryHoursInCirculation' to choose which behaviour should be
followed when calculating due dates.

To test:
1. Apply patches and update database. Upgrade schema if not applying
patch with schema changes. Restart services.
2. Go to Administration -> Libraries. Edit a library and scroll to the
bottom to find the 'opening hours' section. Test adding and removing
open and close times on various days. Confirm saving works as expected.
3. Add a new library and test adding open and close times works as
expected.
4. Edit your default library and save open and close times for each day.
5. Go to Administration -> Circulation and fine rules. Edit a rule, set
the unit to 'hours' and set the loan period to a number that would cause
a checkout to be due after the close time you just set, i.e. if you set
your close time to be 5pm and your system time is currently 1pm, set the
loan period to be 5 (5 hours) so the calculated due date would be 6pm.
6. Go to Administration -> system preferences. Search for
ConsiderLibraryHoursInCirculation. It should be under 'Checkout policy' in
the Circulation system preferences. Confirm the pre-selected option is
'ignore'. Keep this tab open.
6. In a new tab, get the barcode for an item that has an itemtype
matching the circulation rule you just set.
7. Go to the checkouts for a patron that has a categorycode matching the
circulation rule you just set.
8. Check out your item. Confirm that the checkout is due at the end of
the loan period, not taking closing hours into consideration. Return the
item.
9. Back in your other tab, set ConsiderLibraryHoursInCirculation to
'close', so the due date should be shortened to meet the close time.
10. Check out your item. Confirm the checkout is due when the library
closes. Return the item.
11. Back in your other tab, set ConsiderLibraryHoursInCirculation to
'open', so the due date should be extended to meet the opening time.
12. Check out your item. Confirm the checkout is due the next day when
the library opens.
13. Confirm tests pass t/db_dependent/Circulation/CalcDateDue.t

Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: ConsiderLibraryHoursInCirculation system preference
Aleisha Amohia [Tue, 7 Sep 2021 15:58:46 +0000 (03:58 +1200)]
Bug 6796: ConsiderLibraryHoursInCirculation system preference

Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 6796: Add library_hours table and set opening hours for library
Aleisha Amohia [Tue, 7 Sep 2021 03:22:25 +0000 (15:22 +1200)]
Bug 6796: Add library_hours table and set opening hours for library

Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35969: (follow-up) Improve wording
Marcel de Rooy [Wed, 7 Feb 2024 13:53:20 +0000 (13:53 +0000)]
Bug 35969: (follow-up) Improve wording

As suggested by David Nind. Thanks!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35969: Add error code in opac-sendbasket.pl
Marcel de Rooy [Thu, 1 Feb 2024 07:55:55 +0000 (07:55 +0000)]
Bug 35969: Add error code in opac-sendbasket.pl

No need to carp about empty basket or no reply address.
Just add a simple explanation on the form.

Note that it makes no sense to show the form if the patron
has no email address. We need it as reply-to.

Test plan:
Try opac-sendbasket.pl?bib_list=null
Remove email address from your account, try again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36517: Fix output from install_plugins.pl
Magnus Enger [Fri, 5 Apr 2024 13:41:08 +0000 (13:41 +0000)]
Bug 36517: Fix output from install_plugins.pl

When misc/devel/install_plugins.pl does not find any plugins, it prints
the list of pluginsdir, but with a literal \n separating the dirs, and
no newline at the end.

To test:
- Edit koha-conf.xml and add a second entry for <pluginsdir>, so there
  are two entries. The second one could just be a copy of the original.
- Run "perl misc/devel/install_plugins.pl"
- Note the output looks something like this:

No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins\n/var/lib/koha/kohadev/pluginsroot@kohadevbox:koha(master)$

- Apply the patch and run the script again. Output should be:

No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins
/var/lib/koha/kohadev/plugins
root@kohadevbox:koha(master)$

- Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36493: Make cashups test more robust
Tomas Cohen Arazi [Tue, 2 Apr 2024 15:39:02 +0000 (12:39 -0300)]
Bug 36493: Make cashups test more robust

This patch makes the test independent from existing cash registers in
the system.

To test:
1. Enable UseCashRegisters on a fresh KTD
2. Add a cash register
3. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/cashups.t
=> FAIL: Tests fail!
4. Apply this patch
5. Repeat 3
=> SUCCESS: Tests pass!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36581: Define ymd in scope for checkouts table
Emily Lamancusa [Thu, 11 Apr 2024 15:01:11 +0000 (11:01 -0400)]
Bug 36581: Define ymd in scope for checkouts table

Test plan:
1. Find or create an item with a public or nonpublic note
   (in KTD default data, items on biblionumber 12 have notes already)
2. Check the item out to a patron
--> Checkouts table loading never completes
--> Browser console shows: "Uncaught ReferenceError: ymd is not defined"
3. Apply patch and clear browser cache
4. Refresh the page
--> Checkout table loads and console error is gone

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36572: (follow-up) More template clean-up
Lucas Gass [Thu, 11 Apr 2024 12:11:36 +0000 (12:11 +0000)]
Bug 36572: (follow-up) More template clean-up

Further testing:
1. Turn off UseCirculationDesks, make sure everything still works.
2. Turn off UseCashRegisters, make sure everthing still works.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36572: Fix and clean-up set library
Lucas Gass [Thu, 11 Apr 2024 08:38:04 +0000 (08:38 +0000)]
Bug 36572: Fix and clean-up set library

To test:
1. Have 3 staff accounts to test:
  -STAFF A: superlibrarian
  -STAFF B: loggedinlibrary permission
  -STAFF C: no loggedinlibrary or superlibrarian permission
2. Enable 'UseCirculationDesks' and create some desks. (Admin >
   Circulation desks)
3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash
   registers)
4. Use STAFF A ( superlibrarian ) and make sure you can change branch,
   desk and register.
5. Use STAFF B ( loggedinlibrary permission ) and make sure you can
   change branch, desk and register.
6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and
   make sure you can change branch, desk and register.
7. Each time you change you should be redirected to the page you were
   previously on.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36438: Check object for calling metadata
Marcel de Rooy [Wed, 27 Mar 2024 12:19:34 +0000 (12:19 +0000)]
Bug 36438: Check object for calling metadata

Resolve: Can't call method "metadata" on an undefined value at catalogue/MARCdetail.pl line 93

The proceeding lines check for $record and respond appropriately.

Test plan:
Call catalogue/MARCdetail.pl with an unexisting biblionumber.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36568: Fix id parameter in template
Emily Lamancusa [Wed, 10 Apr 2024 16:54:22 +0000 (12:54 -0400)]
Bug 36568: Fix id parameter in template

Fix missed case of changing parameter name from "reports" to "id"

To test:
1. Find or create an SQL report that will return more than 20 rows
2. Run the report
3. Change the "Rows per page" drop-down to a new value
--> An empty page is displayed!
4. Apply patch
5. Repeat steps 2-3
--> The report is displayed with the appropriate number of results

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35980: Check for CAN_user_borrowers_edit_borrowers in patron-toolbar.inc
Brendan Lawlor [Thu, 4 Apr 2024 18:29:07 +0000 (18:29 +0000)]
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in patron-toolbar.inc

This patch removes the 'New patron' and 'Quick add new patron' buttons from the patron tool bar that's included on members-home.pl

To test:
1. Log in with a user with only 'catalogue', 'list_borrowers' and 'manage_patron_lists' permissions
2. From the main page click on Patrons
3. Notice there are 'New patron' and 'Quick add new patron' buttons in the members-home.pl page that lead to permissions errors
4. Apply patch, restart all, reload the page
5. Notice the buttons to add new patrons are gone, but the button to manage patron lists is still there

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35980: Check for CAN_user_borrowers_edit_borrowers in more-member.tt
Brendan Lawlor [Thu, 4 Apr 2024 17:22:08 +0000 (17:22 +0000)]
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in more-member.tt

This patch removes edit buttons and add buttons from the more member page if the user does not have CAN_user_borrowers_edit_borrowers

To test:
1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions
2. Search for a patron
3. Notice there are edit and add (pecil and plus icon) buttons in the patron details page
4. You may have to enable some system prefereences like HouseboundModule to fully test
5. Test that things like Additional attributes and identifiers are still displayed
3. Apply patch, restart all, reload the page
4. Notice the edit and add buttons in the patron details page are gone

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc
Brendan Lawlor [Thu, 4 Apr 2024 16:35:58 +0000 (16:35 +0000)]
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc

This patch removes the message button and more links from the members toolbar if the user does not have CAN_user_borrowers_edit_borrowers

To test:
1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions
2. Search for a patron
3. Notice the 'Add message' and 'More' buttons in the toolbar only link to permissions errors
3. Apply patch, restart all, reload the page
4. Notice the buttons in the toolbar are gone

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30897: (QA follow-up) Enable graceful restart by default
Martin Renvoize [Thu, 11 Apr 2024 14:37:29 +0000 (16:37 +0200)]
Bug 30897: (QA follow-up) Enable graceful restart by default

This patch enabled the restart by default.

After a poll at hackfest24 we opted to enable this by default and the RM
requested I add the patch to the bug so we don't forget ;)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30897: Remove recursive parent identification loop
Martin Renvoize [Thu, 11 Apr 2024 08:33:28 +0000 (10:33 +0200)]
Bug 30897: Remove recursive parent identification loop

We believe that plack will only spawn from one parent and children
cannot spawn further child processes.. as such we don't need to walk up
the tree.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30897: Add option to disable automated restart
Martin Renvoize [Thu, 11 Apr 2024 08:28:07 +0000 (10:28 +0200)]
Bug 30897: Add option to disable automated restart

This patch adds the ability to disable the automated plack restart we
introduce with this patchset via configuration.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30897: Limit to plack environments
Martin Renvoize [Thu, 11 Apr 2024 05:52:53 +0000 (07:52 +0200)]
Bug 30897: Limit to plack environments

I had a feeling we'd want to do this when I submitted the proof of
concept, though I hadn't appreciated the wider issues that have now been
highlighted.. it makes a lot of sense to limit to the plack scope.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30897: Gracefully restart plack after plugin install/remove
Martin Renvoize [Wed, 10 Apr 2024 08:54:48 +0000 (10:54 +0200)]
Bug 30897: Gracefully restart plack after plugin install/remove

This patch adds a graceful plack restart to the plugin
install/uninstall routine to fully allow plugin install to work via the
staff client.

Test plan
1. list your worker processes with something like htop
2. install a plugin
   https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases
3. note that the PIDs of the workers stay the same and no sign of
   restart (no PID changes and no CPU activity that the workers would
   have if they were starting)
4. apply patches and restart services
5. unistall plugin
6. notice worker restart
7. install plugin
8. notice worker restart
9. downgrade plugin
10. notice worker restart
11. upgrade plugin
12. notice worker restart
13. disable and enable plugin
14. *no restart*

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36511: Some scripts missing a dependency following Bug 24879
Owen Leonard [Tue, 9 Apr 2024 15:55:57 +0000 (15:55 +0000)]
Bug 36511: Some scripts missing a dependency following Bug 24879

These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: (follow-up) Fix duplicated key in item spec
Tomas Cohen Arazi [Tue, 9 Apr 2024 07:53:58 +0000 (09:53 +0200)]
Bug 33568: (follow-up) Fix duplicated key in item spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 months agoBug 36531: Serve text/javascript compressed, like application/javascript is
Phil Ringnalda [Fri, 5 Apr 2024 01:59:34 +0000 (18:59 -0700)]
Bug 36531: Serve text/javascript compressed, like application/javascript is

Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.

Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
   the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
   patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
   Transferred size around 160KB

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36463: (follow-up) Adjust other occurence (intranet)
Nick Clemens [Fri, 29 Mar 2024 16:12:01 +0000 (16:12 +0000)]
Bug 36463: (follow-up) Adjust other occurence (intranet)

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36463: Compress application/json
Nick Clemens [Fri, 29 Mar 2024 12:54:30 +0000 (12:54 +0000)]
Bug 36463: Compress application/json

This patch simply adds application/json to the mod_deflate configuration

To test:
1 - Open the netowrk tab in firefox
2 - Load http://localhost:8081/api/v1/libraries
3 - Not the transferred size, and note no 'Content-Encoding: gzip" header
4 - Apply patch, reset_all (or edit /etc/koha/apache-shared.conf)
5 - Reload
6 - Note smaller size, note gzip header

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36379: Fix auth_finder.pl to not expect the op cud-do_search
Phil Ringnalda [Thu, 4 Apr 2024 23:28:53 +0000 (16:28 -0700)]
Bug 36379: Fix auth_finder.pl to not expect the op cud-do_search

The authority finder just does a GET for a list of search results, it
doesn't create or update or delete, so the template that thinks the op
is do_search is correct.

Test plan:
1. Cataloging - New record
2. In the 1 tab click the Tag editor icon at the end of 100 subfield a
3. In the popup, click Search, and nothing happens, no results are shown.
4. Apply patch, reset_all
5. Repeat steps 1-3, see that you get results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32707: (follow-up) Fix link in system preference description
Katrin Fischer [Fri, 5 Apr 2024 15:36:11 +0000 (15:36 +0000)]
Bug 32707: (follow-up) Fix link in system preference description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32707: DBRev 23.12.00.017
Katrin Fischer [Fri, 5 Apr 2024 15:31:24 +0000 (15:31 +0000)]
Bug 32707: DBRev 23.12.00.017

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32707: Unit tests
Janusz Kaczmarek [Fri, 27 Oct 2023 21:06:44 +0000 (21:06 +0000)]
Bug 32707: Unit tests

NB in t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t,
I had to modify four existing test by changing Local-number:123456 to
Personal-name:donald -- since Local-number should never be
auto truncated according to the submitted patch.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32707: ElasticSearch should not auto truncate (even if QueryAutoTruncate = 1...
Janusz Kaczmarek [Tue, 24 Jan 2023 09:45:39 +0000 (10:45 +0100)]
Bug 32707: ElasticSearch should not auto truncate (even if QueryAutoTruncate = 1) for identifiers (and some other fields)

Koha with Zebra prevented auto truncation in some circumstances -- see
the first return for ccl inside C4::Search:: buildQuery, before applying
auto truncation, and setting $auto_truncation = 0 for some search
fields.

Koha with ElasticSearch applies auto truncation for all search fields,
not paying attention to these special cases when it should not be done.
This leads to various problems as described in bug 26508, 26608, etc.

The solution would be to prevent auto truncation for certain search
fields, above all – the identifiers.  In addition, under no
circumstances should a search field other than of text type be truncated
(an attempt to truncate would generate an exception from ElasticSearch,
e.g. number_format_exception for integer).

Test plan
=========

0. Use the test data sample provided in the bug report. Comment 16 in
   the ticket.

Scenario A (authority)
----------------------
1. Enable Elasticsearch engine.
2. Have like 100+ bibliographic records and properly linked authority
   records.
3. Reindex ElasticSearch if needed.
4. Enable QueryAutoTruncate systempreference.
5. Find the authority record #1 and note the number of linked biblio
   records.
6. Show the detail of authority #1 and compare the number of linked
   biblio records.
7. If in the database there are authority records with ids =~ /^1/ (i.e.
   10, 11, 12, ..., 100, 101, ...) linked to the biblio records you get
   two different numbers of linked records.
8. Also, as lists of linked biblio records (via link: Used in N
   record(s) from results view and detail view) you will get two
   different sets of biblio records.  In particular, on the list generated
   from detail view (authorities/detail.pl?authid=1) you will get biblio
   records that are in fact not linked to the auth #1 (the list is
   generated with &q=an:1).
8.99. Skip to scenario B and come back here after finishing to not have
to unapply the patches and restart services for nothing.
9. Apply this patch.
10. Counts and list of linked biblios should be ok.

Scenario B (analytics)
----------------------
1. Enable Elasticsearch engine.
2. Have three monographic bibliographic records with 001 = 1, 10, 100
   (i.e. =~ /^1/).
3. Have an analytical record with 773 $w = 1 (in the test data set - biblio 896).
4. Enable QueryAutoTruncate and UseControlNumber systempreference.
6. Find the analytical record and click on the link generated from 773,
   i.e. (In: ... --> catalogue/search.pl?q=Control-number:1).  You should see
   a list of 100+ records (001 = 1, 10, 100) instead of one (001 = 1).
7. From the biblio # 1 try to go to the analytice records (with Show analytics
   link) - you should get 60+ records with from different host records (773 $t)
   -- instead of one.
8. Apply this patch. Make sure that control-number and record-control-number
   are included in ESPreventAutoTruncate syspref.
9. Repeat steps 6 and 7.  You should arrive at the right host record in p. 6
   and at one analytical records when looking for analytical records in p. 7
   (or more than one, but right, if you modified the test data set).

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 32707: Add 'ESPreventAutoTruncate' preference
Janusz Kaczmarek [Wed, 25 Oct 2023 09:05:24 +0000 (09:05 +0000)]
Bug 32707: Add 'ESPreventAutoTruncate' preference

This patch adds a new 'ESPreventAutoTruncate' preference allowing to define
Elasticsearch search fields that should not be autotruncated when 'QueryAutoTruncate'
is active (e.g. barcode).

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35392: Use the same selector as everywhere else for .message
Jonathan Druart [Fri, 5 Apr 2024 12:56:57 +0000 (14:56 +0200)]
Bug 35392: Use the same selector as everywhere else for .message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35392: Update tests
Pedro Amorim [Thu, 4 Jan 2024 11:52:43 +0000 (11:52 +0000)]
Bug 35392: Update tests

Run:
yarn cypress run --spec "t/cypress/integration/ERM/DataProviders_spec.ts"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35392: Fix HTML in translatable string
Pedro Amorim [Thu, 4 Jan 2024 11:52:31 +0000 (11:52 +0000)]
Bug 35392: Fix HTML in translatable string

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36307: SMS::Send driver errors are not captured and stored
Kyle M Hall [Wed, 13 Mar 2024 17:32:17 +0000 (13:32 -0400)]
Bug 36307: SMS::Send driver errors are not captured and stored

If an SMS::Send driver succeeds, it returns a value that evaluates to true. Every driver I've inspected uses croak when it encounters a failure state.

When an SMS message fails to send, code hard codes the failure code to NO_NOTES (No notes from SMS driver).

We should store the real error in `failure_code` and display that if the failure code doesn't match a known failure code.

Test Plan:
1) Apply this patch
2) Set SMSSendDriver to any value
3) Generate a pending sms message
4) Run the following query:
   update message_queue set status = 'failed', failure_code = "This is a test";
5) View the patron's messages, note the delivery note contains the
   contents of the failure code
6) Run the following query:
   update message_queue set status = 'failed', failure_code = "SMS_SEND_DRIVER_MISSING";
7) Reload the patron's messages, not the delivery note is now "The SMS
   driver could not be loaded".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36082: Set branchcode correctly in opac-facets.inc
Lucas Gass [Thu, 29 Feb 2024 22:33:33 +0000 (22:33 +0000)]
Bug 36082: Set branchcode correctly in opac-facets.inc

1. Tools> HTML Customization
2. Choose OPACresultssidebar
3. Create an entry specific to a library.
4. Also try to add this same entry into a translation tab, if installed.
5. Go to the OPAC
6. Login as a patron of that library that the specific OPACresultsidebar is assigned to
7. Search the catalog, and look below the facets,where the OPACresultssidebar would appear.
8. No text.
9. APPLY PATCH
10. Try step 7 again.
11. TEXT!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Prevent api/v1/biblios.t to fail randomly
Jonathan Druart [Fri, 5 Apr 2024 14:34:02 +0000 (16:34 +0200)]
Bug 33568: Prevent api/v1/biblios.t to fail randomly

koha_1       |     #   Failed test 'The items are returned'
koha_1       |     #   at t/db_dependent/api/v1/biblios.t line 196.
koha_1       |     #     Structures begin differing at:
koha_1       |     #          $got->[0]{external_id} = 'th151O2JtgfGdVW6aiF'
koha_1       |     #     $expected->[0]{external_id} = 'uxrMzUXrkHQy7MHOSfjK'
koha_1       |     # Looks like you failed 1 test of 11.
koha_1       |
koha_1       | #   Failed test 'get_items() tests'
koha_1       | #   at t/db_dependent/api/v1/biblios.t line 206.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: (follow-up) Add search on home and holding library's names
Jonathan Druart [Fri, 5 Apr 2024 14:40:26 +0000 (16:40 +0200)]
Bug 33568: (follow-up) Add search on home and holding library's names

Silly typo!
Caught by a test

koha_1       |     #   Failed test 'Home branch code matches holdingbranch'
koha_1       |     #   at t/db_dependent/Items.t line 581.
koha_1       |     #          got: 'QHImNSEoNi'
koha_1       |     #     expected: 'VY5y6p'
koha_1       |     # Looks like you failed 1 test of 7.
koha_1       |
koha_1       | #   Failed test 'Koha::Item(s) tests'
koha_1       | #   at t/db_dependent/Items.t line 588.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix translatability issues
Jonathan Druart [Fri, 5 Apr 2024 14:19:40 +0000 (16:19 +0200)]
Bug 33568: Fix translatability issues

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix false positive 'missing_filter'
Jonathan Druart [Fri, 5 Apr 2024 13:03:21 +0000 (15:03 +0200)]
Bug 33568: Fix false positive 'missing_filter'

It was ok but the QA script complains and xt/find-missing-filters.t as
well.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Add hint on the table settings admin page
Jonathan Druart [Tue, 2 Apr 2024 11:22:59 +0000 (13:22 +0200)]
Bug 33568: Add hint on the table settings admin page

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: POD fixes
Tomas Cohen Arazi [Thu, 28 Mar 2024 15:20:10 +0000 (12:20 -0300)]
Bug 33568: POD fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: serialitem => serial_item
Tomas Cohen Arazi [Thu, 28 Mar 2024 14:42:03 +0000 (11:42 -0300)]
Bug 33568: serialitem => serial_item

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Remove LPAD ordering
Jonathan Druart [Thu, 1 Feb 2024 15:29:24 +0000 (16:29 +0100)]
Bug 33568: Remove LPAD ordering

This is coming from bug 3521 it seems. And we are going to deal with
this later if people complains.

kidclamp> the performance issue for sites with many copies is bigger than sorting issues imho
kidclamp> drop the LPAD I say :-)

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix columns shift when pref are off
Jonathan Druart [Thu, 1 Feb 2024 14:39:49 +0000 (15:39 +0100)]
Bug 33568: Fix columns shift when pref are off

From comment 66:
If StaffDetailItemSelection and/or LocalCoverImages is turned off, the alignment of the drop-down filters for the other columns is offset by 1 for each of the two sysprefs that is disabled

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: (follow-up) Fix ordering - WIP
Jonathan Druart [Thu, 1 Feb 2024 08:48:31 +0000 (09:48 +0100)]
Bug 33568: (follow-up) Fix ordering - WIP

This is not working. We are still getting the error
Unable to programatically derive a required group_by from the supplied order_by criteria. To proceed either add an explicit group_by, or simplify your order_by to only include plain columns     (supplied order_by: 'lpad_copynumber').

To recreate the problem you can go to detail.pl and search for something
Without search the query is working.

The problem appears when the query has WHERE parameters added and "GROUP
BY" is added.
DBIC is adding to the GROUP BY what is added to the select, but does not
handle this situation (not a plain column).

You can play with:
1.
Remove from Koha::Items->search_ordered
475                     'lpad_copynumber',
=> all good

2. Remove the following block from /usr/share/perl5/DBIx/Class/Storage/DBIHacks.pm
 584     # only consider real columns (for functions the user got to do an explicit group_by)
 585     my $chunk_ci;
 586     if (
 587       @{$order_by[$o_idx]} != 1
 588         or
 589       # only declare an unknown *plain* identifier as "leftover" if we are called with
 590       # aliastypes to examine. If there are none - we are still in _resolve_attrs, and
 591       # can just assume the user knows what they want
 592       ( ! ( $chunk_ci = $colinfos->{$order_by[$o_idx][0]} ) and $attrs->{_aliastypes} )
 593     ) {
 594       push @$leftovers, $order_by[$o_idx][0];
 595     }
=> all good

I don't know if we are doing something wrong here, but I have no idea
how we can build the group_by explicitely.

Is there another way to do this?

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix patron_to_html display
Jonathan Druart [Tue, 31 Oct 2023 07:45:56 +0000 (08:45 +0100)]
Bug 33568: Fix patron_to_html display

Take HidePatronName into account
Display cardnumber
Remove parenthesis around cardnumber if the name is hidden

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore column filters when StaffDetailItemSelection is off
Jonathan Druart [Mon, 30 Oct 2023 16:51:33 +0000 (17:51 +0100)]
Bug 33568: Restore column filters when StaffDetailItemSelection is off

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore link to patron
Jonathan Druart [Mon, 30 Oct 2023 16:11:44 +0000 (17:11 +0100)]
Bug 33568: Restore link to patron

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix popup behaviour for SpineLabelShowPrintOnBibDetails
Jonathan Druart [Mon, 30 Oct 2023 16:07:39 +0000 (17:07 +0100)]
Bug 33568: Fix popup behaviour for SpineLabelShowPrintOnBibDetails

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Hide 'Host records' if EasyAnalyticalRecords is off
Jonathan Druart [Mon, 30 Oct 2023 15:55:20 +0000 (16:55 +0100)]
Bug 33568: Hide 'Host records' if EasyAnalyticalRecords is off

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Do not display 'null' when no barcode
Jonathan Druart [Mon, 30 Oct 2023 15:44:41 +0000 (16:44 +0100)]
Bug 33568: Do not display 'null' when no barcode

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix ordering
Jonathan Druart [Fri, 20 Oct 2023 11:23:38 +0000 (13:23 +0200)]
Bug 33568: Fix ordering

Use search_ordered for default ordering

It also fixes a crash when StaffDetailItemSelection is turned off.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: JSON-encode html output of build_table
Julian Maurice [Tue, 17 Oct 2023 11:13:42 +0000 (13:13 +0200)]
Bug 33568: JSON-encode html output of build_table

This prevents error with quotes coming from translations

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Hide holdings tabs if empty (SeparateHoldings)
Jonathan Druart [Mon, 16 Oct 2023 19:03:55 +0000 (21:03 +0200)]
Bug 33568: Hide holdings tabs if empty (SeparateHoldings)

See comment 34.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Add some missing StaffDetailItemSelection conditionals
Martin Renvoize [Fri, 13 Oct 2023 09:49:26 +0000 (10:49 +0100)]
Bug 33568: Add some missing StaffDetailItemSelection conditionals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Follow-up for 29523
Jonathan Druart [Thu, 12 Oct 2023 14:50:10 +0000 (16:50 +0200)]
Bug 33568: Follow-up for 29523

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Do not embed item types
Jonathan Druart [Thu, 31 Aug 2023 09:33:33 +0000 (11:33 +0200)]
Bug 33568: Do not embed item types

Performance for 1000 items from 22 to 19s

It replaces the input in the column header filter with a dropdown list.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Do not embed library names
Jonathan Druart [Thu, 31 Aug 2023 08:22:11 +0000 (10:22 +0200)]
Bug 33568: Do not embed library names

Performance for 1000 items from 30s to 22s

It replaces the input in the column header filter with a dropdown list.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: (bug 34226 follow-up) Add type=date to date columns
Jonathan Druart [Mon, 24 Jul 2023 11:15:52 +0000 (13:15 +0200)]
Bug 33568: (bug 34226 follow-up) Add type=date to date columns

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix 'actions' links when filters are shown/hidden
Jonathan Druart [Thu, 20 Jul 2023 07:16:29 +0000 (09:16 +0200)]
Bug 33568: Fix 'actions' links when filters are shown/hidden

It also fixes a problem when "Select all" was clicked, the checkbox
selection was not kept when the table was refreshed (was comparing
string and integer, parseInt needed)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix local cover images
Jonathan Druart [Thu, 20 Jul 2023 06:52:33 +0000 (08:52 +0200)]
Bug 33568: Fix local cover images

We need to reprocess the images when the table is refreshed, to do that
we teach verify_cover_images to go through a given container instead of
the whole document, and pass a call back function to build_items_table
that will be called when DataTables will have redrawn the table
(drawCallback).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: (follow-up) Restore filters
Jonathan Druart [Fri, 2 Jun 2023 09:15:32 +0000 (11:15 +0200)]
Bug 33568: (follow-up) Restore filters

This is a bit ugly but fixes the problem raised in the previous commit,
as well as others

for instance comment 18
"* Click 'show filters', 'hide filters' and repeat X 2 - status column disappears?"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Prevent 500 when filtering by item type (FIXMEs)
Jonathan Druart [Fri, 2 Jun 2023 07:49:35 +0000 (09:49 +0200)]
Bug 33568: Prevent 500 when filtering by item type (FIXMEs)

See FIXMEs added by this patch

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Add search on home and holding library's names
Jonathan Druart [Fri, 2 Jun 2023 07:36:11 +0000 (09:36 +0200)]
Bug 33568: Add search on home and holding library's names

QUESTION - Do we prefer this or a dropdown list in the column filter
header?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix select/clear all links
Jonathan Druart [Tue, 30 May 2023 08:28:00 +0000 (10:28 +0200)]
Bug 33568: Fix select/clear all links

Follow-up for "Bug 33568: Preserve item selection across pagination and filtering"

FIXME We should deal with the items selection in a better way, but I
would not consider it blocker, that can be done later.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix DT dom and remove DT info if not needed
Jonathan Druart [Thu, 25 May 2023 07:38:53 +0000 (09:38 +0200)]
Bug 33568: Fix DT dom and remove DT info if not needed

Was there a real need to deal with a specific dom? The "no filter" view
was not really light, only the column filters were shown/hidden.

This patch is suggesting to remove all the DT info in case the table is
displaying all the items of the bibliographic record: Pagination, filtering, buttons, etc.

This patch is for discussion.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Move code to a dedicated include file
Jonathan Druart [Thu, 25 May 2023 07:04:31 +0000 (09:04 +0200)]
Bug 33568: Move code to a dedicated include file

Not very nice but at least the code is isolated in a separate file and
reduce the size of detail.tt

We could also move the code related to the item bundle that is included
inside this same table.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore analytics
Jonathan Druart [Wed, 24 May 2023 13:19:43 +0000 (15:19 +0200)]
Bug 33568: Restore analytics

FIXME We cannot have the usual _count/+count pattern for the REST API, I
think it's acceptable

FIXME We lost the sort on this column, not a big deal IMO

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore host records
Jonathan Druart [Wed, 24 May 2023 13:02:30 +0000 (15:02 +0200)]
Bug 33568: Restore host records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore bundle items
Jonathan Druart [Wed, 24 May 2023 08:05:50 +0000 (10:05 +0200)]
Bug 33568: Restore bundle items

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Display the desk name for the first hold
Jonathan Druart [Tue, 23 May 2023 11:42:01 +0000 (13:42 +0200)]
Bug 33568: Display the desk name for the first hold

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Display library names instead of codes for recall
Jonathan Druart [Tue, 23 May 2023 11:37:33 +0000 (13:37 +0200)]
Bug 33568: Display library names instead of codes for recall

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Display library names instead of codes for first hold
Jonathan Druart [Tue, 23 May 2023 11:34:55 +0000 (13:34 +0200)]
Bug 33568: Display library names instead of codes for first hold

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Display library names instead of codes for transfers
Jonathan Druart [Tue, 23 May 2023 11:31:25 +0000 (13:31 +0200)]
Bug 33568: Display library names instead of codes for transfers

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Use as_due_date to display due dates
Jonathan Druart [Tue, 23 May 2023 11:06:52 +0000 (13:06 +0200)]
Bug 33568: Use as_due_date to display due dates

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Preserve item selection across pagination and filtering
Jonathan Druart [Wed, 17 May 2023 13:51:49 +0000 (15:51 +0200)]
Bug 33568: Preserve item selection across pagination and filtering

BTW Do we really need StaffDetailItemSelection?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Fix action links display
Jonathan Druart [Wed, 17 May 2023 09:34:54 +0000 (11:34 +0200)]
Bug 33568: Fix action links display

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore filters
Jonathan Druart [Thu, 20 Apr 2023 05:59:47 +0000 (07:59 +0200)]
Bug 33568: Restore filters

FIXME - If we click 'show filters' the 'columns' list does not contain
all the columns.
We are destroying the DT and the hidden columns are removed from the
dom.

I think there are 2 possible solutions here:
1. don't destroy but adjust the 'dom' parameter of DT (I didn't manage
to make this work correctly, because of the th filters)
2. Move the th definition in the JS init of DT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Escape all the things
Jonathan Druart [Thu, 20 Apr 2023 08:19:02 +0000 (10:19 +0200)]
Bug 33568: Escape all the things

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Course reserves
Jonathan Druart [Thu, 20 Apr 2023 06:35:48 +0000 (08:35 +0200)]
Bug 33568: Course reserves

FIXME We need tests here

FIXME/TODO - Isn't it possible to replace all this mess with the
following Koha::Item method and a new DBIC rs?
sub courses {
    my ($self) = @_;
    return Koha::Courses->search(
        { 'ci.itemnumber' => $self->itemnumber },
        { join            => { course_reserves => 'ci' } }
    );
}

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Separate holdings
Jonathan Druart [Tue, 18 Apr 2023 14:29:44 +0000 (16:29 +0200)]
Bug 33568: Separate holdings

This needs to be well tested!
Sysprefs SeparateHoldings and SeparateHoldingsBranch
As well as the "Lost items in staff interface" that can be defined at
patron's category level.

This patch is simply restoring the previous behaviour but I think we
could do better.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Restore action buttons
Jonathan Druart [Tue, 18 Apr 2023 13:36:52 +0000 (15:36 +0200)]
Bug 33568: Restore action buttons

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Print label button
Jonathan Druart [Tue, 18 Apr 2023 13:30:42 +0000 (15:30 +0200)]
Bug 33568: Print label button

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Host title
Jonathan Druart [Tue, 18 Apr 2023 13:26:56 +0000 (15:26 +0200)]
Bug 33568: Host title

See FIXMEs!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: public notes
Jonathan Druart [Tue, 18 Apr 2023 13:18:28 +0000 (15:18 +0200)]
Bug 33568: public notes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Display stringified version of copy_number
Jonathan Druart [Tue, 18 Apr 2023 13:07:19 +0000 (15:07 +0200)]
Bug 33568: Display stringified version of copy_number

FIXME - should we apply the same test for other row._strings
occurrences, in case they are not linked with an AV cat?

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: URI
Jonathan Druart [Tue, 18 Apr 2023 13:07:03 +0000 (15:07 +0200)]
Bug 33568: URI

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Add link to moredetail
Jonathan Druart [Tue, 18 Apr 2023 12:46:08 +0000 (14:46 +0200)]
Bug 33568: Add link to moredetail

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Status
Jonathan Druart [Tue, 18 Apr 2023 12:09:47 +0000 (14:09 +0200)]
Bug 33568: Status

FIXME We need tests here!

See the FIXME in the code, we are losing the ability to search on the status,
but this is really impossible to implement if we are not storing the
status (DB or search engine).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: enumchron/volinfo
Jonathan Druart [Tue, 18 Apr 2023 08:57:09 +0000 (10:57 +0200)]
Bug 33568: enumchron/volinfo

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Item groups
Jonathan Druart [Tue, 18 Apr 2023 07:57:03 +0000 (09:57 +0200)]
Bug 33568: Item groups

FIXME - we need tests, but I'd like to make sure there is no an easier
way to do this many to many things. Tomas?
Filter on the "Item group" column needs to be tested!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33568: Shelving location
Jonathan Druart [Fri, 14 Apr 2023 07:44:16 +0000 (09:44 +0200)]
Bug 33568: Shelving location

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>