]> git.koha-community.org Git - koha.git/log
koha.git
4 weeks agoBug 36640: Fix Asset.t
Jonathan Druart [Fri, 15 Nov 2024 13:07:58 +0000 (14:07 +0100)]
Bug 36640: Fix Asset.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: (follow-up) Fix unit tests
Matt Blenkinsop [Fri, 15 Nov 2024 11:19:12 +0000 (11:19 +0000)]
Bug 33641: (follow-up) Fix unit tests

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 37576: (follow-up) Fix for UserRoles test
Jake Deery [Thu, 14 Nov 2024 16:53:52 +0000 (16:53 +0000)]
Bug 37576: (follow-up) Fix for UserRoles test

This patch, although not directly caused by Bug 37576,
fixes issues with the UserRoles cypress test due
to a change in the data structure brought on by recent
ERM bugs.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: (follow-up) Add field to api spec
Nick Clemens [Thu, 14 Nov 2024 20:43:52 +0000 (20:43 +0000)]
Bug 33641: (follow-up) Add field to api spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I changed the attribute name to match our guidelines (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 37576: (follow-up) fix broken cypress tests
Jake Deery [Thu, 14 Nov 2024 14:34:48 +0000 (14:34 +0000)]
Bug 37576: (follow-up) fix broken cypress tests

This patch is intended to fix failing Cypress tests
by including the correct payload in get_agreement()
found in e2e.js, and by moving get_package to the
e2e.js with corrected payload also

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 31143: (follow-up) Add description to fix_invalid_dates.pl
Wainui Witika-Park [Mon, 4 Nov 2024 05:31:25 +0000 (18:31 +1300)]
Bug 31143: (follow-up) Add description to fix_invalid_dates.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36822: (follow-up) Catch MySQL 8 failure in update
Martin Renvoize [Thu, 14 Nov 2024 13:08:16 +0000 (13:08 +0000)]
Bug 36822: (follow-up) Catch MySQL 8 failure in update

We add a CAST to the fetch of 0000-00-00 dates in the database. This
prevents an error in MySQL 8.0 throws htat aborts the update.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: DBIC schema update
Katrin Fischer [Thu, 14 Nov 2024 13:13:35 +0000 (13:13 +0000)]
Bug 33641: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: DBRev 24.06.00.063
Katrin Fischer [Thu, 14 Nov 2024 13:01:38 +0000 (13:01 +0000)]
Bug 33641: DBRev 24.06.00.063

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: (follow-up) Change return_branch to checkin_library
Nick Clemens [Thu, 14 Nov 2024 12:39:49 +0000 (12:39 +0000)]
Bug 33641: (follow-up) Change return_branch to checkin_library

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: Unit Tests
Eric Garcia [Tue, 6 Aug 2024 19:06:45 +0000 (19:06 +0000)]
Bug 33641: Unit Tests

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: Code changes
Eric Garcia [Tue, 6 Aug 2024 19:01:00 +0000 (19:01 +0000)]
Bug 33641: Code changes

To test:

1. Apply patch, restart_all, updatedatabase
2. Check out an item to a patron
3. Query the database
    - select return_branch from issues;     should return NULL
    - select branchcode from issues;        should return the branchcode of the library you checkout the item out from
    - select return_branch from old_issues; should match the branchcode from the previous query

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33641: DB update
Nick Clemens [Tue, 6 Aug 2024 17:37:12 +0000 (17:37 +0000)]
Bug 33641: DB update

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix behaviour of 'Clear filter'
Jonathan Druart [Thu, 14 Nov 2024 10:16:06 +0000 (11:16 +0100)]
Bug 36640: Fix behaviour of 'Clear filter'

It must be disabled when the main search input is empty.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix display of 'Clear filter'
Jonathan Druart [Thu, 14 Nov 2024 09:57:06 +0000 (10:57 +0100)]
Bug 36640: Fix display of 'Clear filter'

This is a weird one. When using KohaTable the first button was not
displayed if it was a custom button.
Doing the following fixed the problem (adding an empty first elt):
  dt_parameters["buttons"] = [{}]
  dt_parameters["buttons"].push({the_clear_filter_button});

However adding the definition of the button to $.fn.dataTable.ext.buttons fixed the problem.
As described on https://datatables.net/extensions/buttons/custom#Custom-button-type

This will definitely need to be improved later.(see bug 26553)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix selenium/patrons_search.t
Jonathan Druart [Wed, 13 Nov 2024 15:04:11 +0000 (16:04 +0100)]
Bug 36640: Fix selenium/patrons_search.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove jEditable
Jonathan Druart [Wed, 13 Nov 2024 13:59:58 +0000 (14:59 +0100)]
Bug 36640: Remove jEditable

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix quotes editor
Jonathan Druart [Wed, 13 Nov 2024 13:55:36 +0000 (14:55 +0100)]
Bug 36640: Fix quotes editor

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: (follow-up) Correctly align "Clear filter" button
Owen Leonard [Tue, 12 Nov 2024 16:37:18 +0000 (16:37 +0000)]
Bug 36640: (follow-up) Correctly align "Clear filter" button

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: (follow-up) Remove fnFilter - fix acqui/invoices
Jonathan Druart [Wed, 13 Nov 2024 11:26:38 +0000 (12:26 +0100)]
Bug 36640: (follow-up) Remove fnFilter - fix acqui/invoices

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove autoWidth: false for responsive tables
Jonathan Druart [Wed, 6 Nov 2024 09:32:13 +0000 (10:32 +0100)]
Bug 36640: Remove autoWidth: false for responsive tables

From Owen:
"""
Table columns don't collapse as you change the browser width.
They start collapsed if you narrow the window and reload the page. But they don't expand as you widen the browser window.
"""

I have not found a reason for this in the changelog of the responsive
plugin. Maybe there is another way to fix this?

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: (follow-up) CSS fixes for DataTables controls
Owen Leonard [Mon, 28 Oct 2024 13:36:33 +0000 (13:36 +0000)]
Bug 36640: (follow-up) CSS fixes for DataTables controls

This patch adds CSS fixes to try to keep styling of DataTables and
related controls consistent with how it looked before the upgrade.

This version of DataTables introduced a lot of usage of "!important" in
the CSS which severly limited our options. For that reason I modified
the file to remove all of those instances. Both the minified and
unminified versions are changed.

This patch continues the pre-upgrade practice of picking only the
relevant DataTables CSS and including it in our CSS build. This means a
smaller total CSS download for the user and eliminates the "!important"
problem.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: POS Working
Martin Renvoize [Thu, 31 Oct 2024 07:41:35 +0000 (07:41 +0000)]
Bug 36640: POS Working

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: POS Updates
Martin Renvoize [Wed, 30 Oct 2024 11:57:21 +0000 (11:57 +0000)]
Bug 36640: POS Updates

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Restore previous order sequence behaviour
Jonathan Druart [Thu, 31 Oct 2024 09:50:20 +0000 (10:50 +0100)]
Bug 36640: Restore previous order sequence behaviour

There was a behaviour change:
https://datatables.net/upgrade/2#Order-sequence

"""
When ordering columns by clicking on their header element, in v1 it would simply toggle between ascending and descending ordering for the columns (controllable with the columns.orderSequence option). DataTables 2 introduces a new option to this parameter, an empty string value which represents no ordering. The default has been updated to make use of this and the ordering sequence that is applied when clicking the header cell is now:

    Ascending
    Descending
    No order

It will repeat that sequence indefinitely as the column header is clicked. As before, it can be controlled using the columns.orderSequence option, and if you wish to restore the default DataTables 1.x behaviour you can do so by setting the default:

DataTable.defaults.column.orderSequence = ['asc', 'desc'];
"""

This patch restore the behaviour we had before the upgrade.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix itemsearch
Jonathan Druart [Thu, 31 Oct 2024 09:11:28 +0000 (10:11 +0100)]
Bug 36640: Fix itemsearch

We use the regular _dt_add_filter and pass the filters_options for
selects \o/
We need to iterate again to make it easier to write (lot of duplicated
code to build the AV list) but that's for later!

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: OPAC fixes
Jonathan Druart [Wed, 30 Oct 2024 13:48:20 +0000 (14:48 +0100)]
Bug 36640: OPAC fixes

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix waitingreserves
Jonathan Druart [Wed, 30 Oct 2024 11:00:11 +0000 (12:00 +0100)]
Bug 36640: Fix waitingreserves

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Update to DataTables 2.x - OPAC
Jonathan Druart [Tue, 29 Oct 2024 14:15:12 +0000 (15:15 +0100)]
Bug 36640: Update to DataTables 2.x - OPAC

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: More fixes
Jonathan Druart [Wed, 30 Oct 2024 10:58:42 +0000 (11:58 +0100)]
Bug 36640: More fixes

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: (try) Fix ill-availability.js
Jonathan Druart [Thu, 24 Oct 2024 14:29:52 +0000 (16:29 +0200)]
Bug 36640: (try) Fix ill-availability.js

Didn't test. Not sure what is 'datatablesConfig', does not seem
something from DT so I don't expect regressions from there.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Rename .dataTables_wrapper
Jonathan Druart [Thu, 24 Oct 2024 14:17:37 +0000 (16:17 +0200)]
Bug 36640: Rename .dataTables_wrapper

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix selenium tests
Jonathan Druart [Thu, 24 Oct 2024 13:07:43 +0000 (15:07 +0200)]
Bug 36640: Fix selenium tests

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix checkouts.js
Jonathan Druart [Thu, 24 Oct 2024 10:47:40 +0000 (12:47 +0200)]
Bug 36640: Fix checkouts.js

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove fnReloadAjax
Jonathan Druart [Thu, 24 Oct 2024 10:28:47 +0000 (12:28 +0200)]
Bug 36640: Remove fnReloadAjax

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Adjust CSS classes (staff)
Jonathan Druart [Thu, 24 Oct 2024 09:23:59 +0000 (11:23 +0200)]
Bug 36640: Adjust CSS classes (staff)

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove 'deferRender: true'
Jonathan Druart [Thu, 24 Oct 2024 09:04:57 +0000 (11:04 +0200)]
Bug 36640: Remove 'deferRender: true'

It's set to true by default now
https://datatables.net/upgrade/2#Deferred-rendering
"""
For this reason, deferRender's default value has been changed to be enabled (true) in DataTables 2.
"""

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove columnFilter.js
Jonathan Druart [Wed, 23 Oct 2024 13:56:35 +0000 (15:56 +0200)]
Bug 36640: Remove columnFilter.js

Change in behaviour: now the filters are displayed automatically on the
"Lost items" report.

Note: We need bug 37238 for the item search.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Fix logic in column numbering for filters
Jonathan Druart [Wed, 23 Oct 2024 12:31:01 +0000 (14:31 +0200)]
Bug 36640: Fix logic in column numbering for filters

I don't really understand why this was not required on bug 33484, but
here this patch fixes a bug with the filters and the column visibility:

Fix: select an option in a column filter then hide a column that is before.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove fnFilter
Jonathan Druart [Wed, 16 Oct 2024 12:10:38 +0000 (14:10 +0200)]
Bug 36640: Remove fnFilter

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Remove fnAddFilters
Jonathan Druart [Wed, 16 Oct 2024 09:52:03 +0000 (11:52 +0200)]
Bug 36640: Remove fnAddFilters

Also centralize and clean the delay code to use DT's debounce.

I have commented the code from initComplete as I don't think it's the
right place. Maybe we need to add it for other table, but then it should
be added when we init DT.

Removed blacklist_keys to keep code clean, could be re-added later if we
really need it.

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Adjust pending orders
Jonathan Druart [Wed, 16 Oct 2024 09:43:48 +0000 (11:43 +0200)]
Bug 36640: Adjust pending orders

Replace fnGetColumnData

No need delay, it's not ajax

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36640: Update to DataTables 2.x
Jonathan Druart [Wed, 16 Oct 2024 08:46:59 +0000 (10:46 +0200)]
Bug 36640: Update to DataTables 2.x

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38434: Fix to define the same structure as kohastructure.sql
Thibaud Guillot [Thu, 14 Nov 2024 10:15:08 +0000 (10:15 +0000)]
Bug 38434: Fix to define the same structure as kohastructure.sql

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38011: Fix ReNewSubscription.t
Jonathan Druart [Thu, 14 Nov 2024 08:48:10 +0000 (09:48 +0100)]
Bug 38011: Fix ReNewSubscription.t

t/db_dependent/Serials/ReNewSubscription.t .. Value not allowed for auto_incr id in Aqbookseller at /kohadevbox/koha/t/lib/TestBuilder.pm line 402.
Null value for subscriptionid in Subscriptionhistory not allowed at /kohadevbox/koha/t/lib/TestBuilder.pm line 415.
Can't call method "enddate" on an undefined value at t/db_dependent/Serials/ReNewSubscription.t line 102.

It's failing when no vendor with id=1 in DB.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 23426: (follow-up) Fix failing test to send correct summary flag
Jan Kissig [Wed, 13 Nov 2024 20:18:26 +0000 (20:18 +0000)]
Bug 23426: (follow-up) Fix failing test to send correct summary flag

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Adjustments for Bootstrap 5
Jonathan Druart [Wed, 13 Nov 2024 10:28:55 +0000 (11:28 +0100)]
Bug 14670: Adjustments for Bootstrap 5

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: (QA follow-up) Tidy new code
Martin Renvoize [Mon, 28 Oct 2024 11:33:48 +0000 (11:33 +0000)]
Bug 14670: (QA follow-up) Tidy new code

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: (QA follow-up) Add missing filter
Martin Renvoize [Mon, 28 Oct 2024 11:33:26 +0000 (11:33 +0000)]
Bug 14670: (QA follow-up) Add missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Fix tests and import
Jonathan Druart [Mon, 29 Jan 2024 16:12:15 +0000 (17:12 +0100)]
Bug 14670: Fix tests and import

Sponsored-by: Orex Digital
Signed-off-by: Alexandre Noel <alexandre.noel@inlibro.com>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Use 260 if 264 is empty
Jonathan Druart [Mon, 29 Jan 2024 16:16:50 +0000 (17:16 +0100)]
Bug 14670: Use 260 if 264 is empty

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Deal with empty publicatoin date
Jonathan Druart [Mon, 29 Jan 2024 16:16:27 +0000 (17:16 +0100)]
Bug 14670: Deal with empty publicatoin date

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Move modal code to an include file
Jonathan Druart [Mon, 29 Jan 2024 10:21:35 +0000 (11:21 +0100)]
Bug 14670: Move modal code to an include file

Also add an icon for the "Cite" entry.

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: fix ControlStructures::ProhibitMutatingListFunctions
Martin Stenberg [Fri, 23 Oct 2015 13:20:37 +0000 (15:20 +0200)]
Bug 14670: fix ControlStructures::ProhibitMutatingListFunctions

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Fix earlier declaration in same scope
Martin Stenberg [Fri, 23 Oct 2015 13:06:51 +0000 (15:06 +0200)]
Bug 14670: Fix earlier declaration in same scope

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: add test for C4::Record::marc2cites
Martin Stenberg [Thu, 22 Oct 2015 14:43:30 +0000 (16:43 +0200)]
Bug 14670: add test for C4::Record::marc2cites

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 14670: Add Cite-option to detail page in OPAC
Martin Stenberg [Wed, 30 Sep 2015 12:55:15 +0000 (14:55 +0200)]
Bug 14670: Add Cite-option to detail page in OPAC

Adds a "cite" option in the tools menu in OPAC detail page for easy citations.

Test plan:
1. Apply this patch
2. Got to OPAC detail page
3. In the tools menu to the right, click the new "Cite" link
4. A modal should appear with four different citation styles (APA, Chicago,
   Harvard, MLA)

Sponsored-by: Regionbibliotek Halland / County library of Halland
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 37861: Fix XSS vulnerability in barcode append function
Artur [Sat, 7 Sep 2024 16:12:05 +0000 (18:12 +0200)]
Bug 37861: Fix XSS vulnerability in barcode append function

When user inputs were appended directly to the barcode table, the values were not properly escaped, allowing potential XSS attacks. This patch ensures that user inputs are sanitized and safely added to the DOM using .text() and .attr() methods to prevent script injection.

To test:
Enable the "SelfCheckInModule".
Open the barcode input form.
Enter a barcode with HTML or script tags.
Without the patch, observe that the script is executed.
Apply the patch.
Repeat step 2.
Verify that the input is escaped and no script execution occurs.
Check that the barcode is properly appended to the table.

Documentation:
No updates required.

Sponsored-by: KillerRabbitAos
Signed-off-by: Bo Gustavsson <bosse@gustavsson.one>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 37724: Remove Koha version number from OPAC
David Cook [Mon, 26 Aug 2024 01:22:12 +0000 (01:22 +0000)]
Bug 37724: Remove Koha version number from OPAC

This change removes the Koha version number from the OPAC generator
metadata.

Test plan:
0. Apply patch
1. Enable syspref SelfCheckInModule
2. Visit /cgi-bin/koha/opac-main.pl and confirm meta tag doesn't
include version number
3. Visit /cgi-bin/koha/sci/sci-main.pl and confirm meta tag doesn't
include version number
4. Visit /cgi-bin/koha/sco/sco-main.pl) and confirm meta tag doesn't
include version number
5. Click "Help" and confirm meta tag doesn't include version number

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33339: (Follow up) Fix more cases of formula=empty
Magnus Enger [Fri, 16 Aug 2024 12:59:20 +0000 (14:59 +0200)]
Bug 33339: (Follow up) Fix more cases of formula=empty

This patch adds formula=empty to:
- Koha::ERM::EUsage::SushiCounter::_build_COUNTER_report_file()

Updated 2024-09-26: Earlier version also removed unnecessary
use of formula=empty from two places.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 33339: Prevent Formula Injection (CSV Injection) in CSV files
Kyle M Hall [Thu, 27 Jul 2023 16:30:54 +0000 (12:30 -0400)]
Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files

The system is vulnerable to Formula Injection attacks as the data
stored within the database and exported as CSV/Excel is not being
sanitized or validated against implanted formula payloads

This patch modifies all uses of Text::CSV and derived classes to pass
the "formula" parameter with value of "empty" which replaces formulas
by empty string.

Test Plan:
1) Apply this patch
2) For guided_reports.pl, attempt to export CSV where you've set a column to a formula somehow
   ( such as "=1+3" )
3) Export that CSV file
4) Note the formula has not been exported
5) Repeat this plan for the remaining scripts that export CSV files
   where users can define the outputted data

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Fixed two conflicts. I have tested that this works as advertised on:
- Reports (Download > Comma separated text (.csv)) [Text::CSV::Encoded]
- Circulation > Overdues > Download file of all overdues [Text::CSV_XS]
- misc/export_borrowers.pl [Text::CSV]
This covers all modules used, and both GUI and command line.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Change none to empty in the commit message ! None is the default,
doing nothing. Empty clears the formulas.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38418: Make SIP/Transaction.t run on all dateformat values
Tomas Cohen Arazi [Mon, 11 Nov 2024 16:48:51 +0000 (13:48 -0300)]
Bug 38418: Make SIP/Transaction.t run on all dateformat values

To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38328: Cannot delete ILL batch statuses
Phil Ringnalda [Fri, 1 Nov 2024 18:22:59 +0000 (11:22 -0700)]
Bug 38328: Cannot delete ILL batch statuses

You are permitted to delete ILL batch statuses that you (rather than the
system) add, but the UI didn't get the CSRF memo about delete ops needing to
be POSTs with op="cud-delete", so it still uses a GET of ?op="delete" and
fails.

Test plan:
 1. Set the preference ILLModule to 'Enable'
 2. Administration - Interlibrary loan batch statuses - New batch status
 3. Give it a name, an uppercase code, and Save
 4. Click the Delete button to the right of your new status
 5. The page is blank, and if you navigate back to Interlibrary loan batch
    statuses, you'll see that yours was not deleted
 6. Apply patch, reload page
 7. Click the Delete button to the right of your new status, verify it is
    deleted

Sponsored-by: Chetco Community Public Library
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38322: (QA follow-up) Fix spelling
Martin Renvoize [Wed, 13 Nov 2024 09:35:50 +0000 (09:35 +0000)]
Bug 38322: (QA follow-up) Fix spelling

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38322: Adjust tests
Nick Clemens [Fri, 1 Nov 2024 12:54:09 +0000 (12:54 +0000)]
Bug 38322: Adjust tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 38069: Fix jump to the correct table
Jonathan Druart [Wed, 13 Nov 2024 11:46:41 +0000 (12:46 +0100)]
Bug 38069: Fix jump to the correct table

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36221: (QA follow-up): Fix translation entry concat
Pedro Amorim [Wed, 13 Nov 2024 11:01:53 +0000 (11:01 +0000)]
Bug 36221: (QA follow-up): Fix translation entry concat

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 34088: (follow-up) fix env vars in koha-upgrade-schema
David Cook [Wed, 13 Nov 2024 00:10:11 +0000 (00:10 +0000)]
Bug 34088: (follow-up) fix env vars in koha-upgrade-schema

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 28633: Fix patrons_search.t
Jonathan Druart [Wed, 13 Nov 2024 14:45:56 +0000 (15:45 +0100)]
Bug 28633: Fix patrons_search.t

This does not belong here, but raised to me here, so attaching on this
one.
This feels like it's coming from bug 33484, but those tests were passing
after it has been pushed.

This patch fixes the following error:
Error while executing command: stale element reference: The element reference of <input type="text"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

Since bug 33484 the row with the filters is redrawn on table redraw. So
we need to search for the input every time the table is redrawn.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 23426: (follow-up) Enhance sip_cli_emulator.pl for test plan
Jan Kissig [Thu, 7 Nov 2024 13:32:05 +0000 (13:32 +0000)]
Bug 23426: (follow-up) Enhance sip_cli_emulator.pl for test plan

This follow up enhances the sip_cli_emulator.pl to use start-item and/or end-item as params. With these new params the original test plan can be extended:

Test plan:
a) create several manual invoices for patron 23529000035676 : http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=19
b) run
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "   Y      " --start-item=1 --end-item=2
   to get fine 1 and 2 or
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "   Y      " --start-item=3 --end-item=3
   to retrieve fine 3

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 23426: (follow-up) This patch reintroduces the former implementation of fine...
Jan Kissig [Thu, 7 Nov 2024 12:42:59 +0000 (12:42 +0000)]
Bug 23426: (follow-up) This patch reintroduces the former implementation of fine items

The original implementation of fine items was accidently overwritten with this patch. This follow up reverts these changes but keeps additional improvements that were also part of this patch.
These are:
- Returning the active currency as part of the response (BH)
- Fixing the number of items in the response which are specified in BP and BQ when other items as fine items are requested.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoRevert "Bug 38391: Redraw the filters row on table redraw"
Katrin Fischer [Wed, 13 Nov 2024 15:31:22 +0000 (15:31 +0000)]
Revert "Bug 38391: Redraw the filters row on table redraw"

This reverts commit af6b0510d7f00fae32f001afb2aaccd9064a9092.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up) Capitalization: Please Note
Katrin Fischer [Tue, 12 Nov 2024 16:34:30 +0000 (16:34 +0000)]
Bug 36221: (QA follow-up) Capitalization: Please Note

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (follow-up) Style and markup fixes
Owen Leonard [Mon, 11 Nov 2024 18:17:13 +0000 (18:17 +0000)]
Bug 36221: (follow-up) Style and markup fixes

This patch makes several changes to make the updated forms more
consistent with how other pages work:

- Form labels should have ":" after them.
- Form fields should have a hint when they are required.
  - Required fields should not be indicated with an asterisk.
- In the OPAC, <select> should have a "form-select" class if the form is
  otherwise being styled with Bootstrap classes.
- Primary submit buttons should have a "btn btn-primary" class.
- The Font Awesome 6 icon for a delete operation is "fa-trash-can."
- Error messages should be wrapped in <div class="alert alert-warning">.
- All language strings in JS files should be wrapped in __('').
- Terminology: "Library" instead of "Branch," "Patron" instead of
  "Member."

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): fix space between the 2 custom fields <input>
Victor Grousset/tuxayo [Tue, 5 Nov 2024 18:04:37 +0000 (19:04 +0100)]
Bug 36221: (QA follow-up): fix space between the 2 custom fields <input>

It was missing in the JS that adds new empty custom fields.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix opac check
Pedro Amorim [Tue, 5 Nov 2024 11:16:01 +0000 (11:16 +0000)]
Bug 36221: (QA follow-up): Fix opac check

To address Victor's comment #32

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): add placeholder attr to staff custom fields
Victor Grousset/tuxayo [Tue, 5 Nov 2024 09:15:25 +0000 (10:15 +0100)]
Bug 36221: (QA follow-up): add placeholder attr to staff custom fields

In the prepopulated fields when editing item metadata that had custom
fields (tt generated). So it's consistent when adding new empty fields
(done in JS)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix translatability in JS concat
Pedro Amorim [Mon, 4 Nov 2024 17:01:18 +0000 (17:01 +0000)]
Bug 36221: (QA follow-up): Fix translatability in JS concat

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix incorrect input type on HTML
Pedro Amorim [Mon, 4 Nov 2024 16:25:10 +0000 (15:25 -0100)]
Bug 36221: (QA follow-up): Fix incorrect input type on HTML

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Fix year value
Pedro Amorim [Wed, 30 Oct 2024 09:34:49 +0000 (09:34 +0000)]
Bug 36221: (QA follow-up): Fix year value

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: OPAC Styling
Pedro Amorim [Mon, 4 Mar 2024 14:18:21 +0000 (14:18 +0000)]
Bug 36221: OPAC Styling

Test plan, dont apply patches yet:
1) Enable ILLModule
2) Create a new OPAC ILL request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?method=create&backend=Standard
3) Notice the style. Apply patches. Repeat

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: (QA follow-up): Apply styling improvements to DVD
Pedro Amorim [Mon, 4 Nov 2024 16:28:11 +0000 (15:28 -0100)]
Bug 36221: (QA follow-up): Apply styling improvements to DVD

qa tools throw:
ill_text_input_field: not found

But I believe this is a false positive.
We can clearly see it working by going to:

http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard

And picking 'DVD' or any other type.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: Move patron section to top of create form
Pedro Amorim [Fri, 8 Mar 2024 15:21:16 +0000 (15:21 +0000)]
Bug 36221: Move patron section to top of create form

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36221: Preparation
Pedro Amorim [Mon, 4 Mar 2024 14:20:35 +0000 (14:20 +0000)]
Bug 36221: Preparation

This refactors the code for more DRY

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35570: (QA follow-up): Fix translatability of 'Delete'
Pedro Amorim [Mon, 4 Nov 2024 13:16:45 +0000 (13:16 +0000)]
Bug 35570: (QA follow-up): Fix translatability of 'Delete'

This is also fixing the delete->trash icon and spacing between label+icon

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35570: (QA follow-up): Fix terminology
Pedro Amorim [Mon, 4 Nov 2024 13:16:17 +0000 (13:16 +0000)]
Bug 35570: (QA follow-up): Fix terminology

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35570: (QA follow-up): Fix styling of confirmation buttons
Pedro Amorim [Mon, 4 Nov 2024 13:15:34 +0000 (13:15 +0000)]
Bug 35570: (QA follow-up): Fix styling of confirmation buttons

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38383: (follow-up) Undo global text-info change
Owen Leonard [Tue, 12 Nov 2024 13:02:43 +0000 (13:02 +0000)]
Bug 38383: (follow-up) Undo global text-info change

Adding an !important override to installer.scss isn't ideal but it's
an acceptable interim solution pending a more thorough review of how we
customize Bootstrap's text-* classes.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38383: Improve font color contrast on web installer
Emily Lamancusa [Fri, 8 Nov 2024 20:49:22 +0000 (15:49 -0500)]
Bug 38383: Improve font color contrast on web installer

Update the font colors for info, warning, and database errors on the web
installer to meet WCAG accessibility guidelines for color contrast.

For the yellow text, it is impossible to meet minimum contrast levels on
a white background without losing the yellow-ness of the yellow. This
patch opts for a dark text color with a light yellow highlight, to
meet contrast standards while allowing the yellow to be easily
distinguished from other message colors.

To test:
1. Apply patch for test dbrev
2. Trigger a database update from the web installer
   In KTD this can be done by:
      i. Changing the Version system preference to a slightly lower
         number (for example, from 24.0600057 to 24.0600056)
      ii. Reload the staff client
      iii. Log in with koha_kohadev, password
--> Note that the blue and yellow colors are very light
3. If possible, use browser tools to check the accessibility of the
   different colors of text (in Firefox, right click on the text and
   choose "Inspect accessibility properties")
--> Note that some of the text does not meet WCAG accessibility standard
4. Apply this patch and yarn build
5. Clear browser cache and refresh the page
--> Note that the blue and yellow text is more readable
6. If possible, repeat step 3
--> Note that all text now meets WCAG standards

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37178: Disable sorting on comments column
Pedro Amorim [Mon, 1 Jul 2024 10:30:08 +0000 (10:30 +0000)]
Bug 37178: Disable sorting on comments column

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38235: Unit tests
Janusz Kaczmarek [Tue, 22 Oct 2024 11:39:09 +0000 (11:39 +0000)]
Bug 38235: Unit tests

BTW, tiny adjustments to existing tests to work with modified
C4::Suggestions::ModSuggestion.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38235: Suggestion confirmation letter sent when it should not
Janusz Kaczmarek [Tue, 22 Oct 2024 11:00:09 +0000 (11:00 +0000)]
Bug 38235: Suggestion confirmation letter sent when it should not

When processing a new order (creating basket, receiving order, etc.)
using a bibliographic record once already linked to an old
suggestion (already completed in the past), Koha generates and sends
a confirmation letter that should not be sent at all.

This is because suggestions in Koha are linked to a biblionumber (and
not the order), and so the old suggestion is identified - erroneously -
as relevant.  Then C4::Suggestions::ModSuggestion sends a letter
whenever it receives STATUS as a parameter, paying no attention to
whether the status is changed.  So, in this case, a suggestion already
in the status AVAILABLE is "updated" to the status AVAILABLE and the
letter is generated.  To solve this problem, it should be enough to
check whether STATUS is actually changed.

Test plan:
==========

1. As a patron, make a purchase suggestion.  As a librarian, accept it and
   process it, as usual, through the acquisition process.
2. At the patron account, as librarian, check the generated notices (the
   most recent should be "Suggested purchase available").
3. Make a new aquisition order for the same bibliographic record
   ("From an existing record:") and receive it as usual.
4. Go to the account of the patron that made the original suggestion and
   check the notices.  Note the second, irrelevant letter "Suggested
   purchase available".
5. Apply the patch; restart_all.
6. Repeat p. 3 and 4.  Note that no new notice has been generated.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38385: Improve DB update output on error (UI)
Jonathan Druart [Thu, 7 Nov 2024 10:33:03 +0000 (11:33 +0100)]
Bug 38385: Improve DB update output on error (UI)

When an error occurred during the DB update the UI is not correct.

1. say_success, say_info, etc. show the span tags and are not colored
2. "Everything went okay" shown even if atomic updates failed
3. The same error can be displayed several time (see https://snipboard.io/IGiKgM.jpg)

Test plan:
Create a new db rev and/or atomic update
Have some say_* statement to render messages, and raise an error

For instance:
    say_info( $out, "Use blue for further information" );

    try {
        say_warning( $out, "Use yellow for warning/a call to action" );
        $dbh->do(q{});
    } catch {
        say_failure( $out, "Use red for danger/failure" );
        $_->rethrow;
    };

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38011: (QA follow-up) Improve database update output
Martin Renvoize [Tue, 12 Nov 2024 07:41:03 +0000 (07:41 +0000)]
Bug 38011: (QA follow-up) Improve database update output

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 37850: (QA follow-up): Update illemail REST API attribute name
Pedro Amorim [Mon, 21 Oct 2024 11:33:46 +0000 (11:33 +0000)]
Bug 37850: (QA follow-up): Update illemail REST API attribute name

To test
1) yarn api:bundle && koha-plack --restart kohadev
2) Enable ILLModule and put some 'ILL staff email:' on some library
3) Access <staff_url>/api/v1/libraries
4) Notice the attribute reads ill_email

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36182: Show vendor name if acquisition_source is a vendor_id
Pedro Amorim [Tue, 7 May 2024 12:45:24 +0000 (12:45 +0000)]
Bug 36182: Show vendor name if acquisition_source is a vendor_id

This will make it so if acquisition_source is of an existing vendor_id, it'll show the vendor name instead of the id.
If it's not of an existing vendor_id, show the raw value instead.

I'm not 100% happy with this patch as it adds an edge case to Item::strings_map but I believe the only alternative
is to make 952$e Source of acquisition an AV field in the default framework.
Not only that, but this would have to be an AV field of type 'vendors' that'd have to allow to pick from existing vendors (similar to current 'branches').
The above is a ton more work than initial suggestions would imply.
Happy to be proven wrong (in fact, hoping I am).

This is compatible with main Koha only, not backportable to 23.11

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36182: Add booksellerid columns to holdings table
Pedro Amorim [Mon, 22 Apr 2024 11:21:20 +0000 (11:21 +0000)]
Bug 36182: Add booksellerid columns to holdings table

1) Apply patch, reset_all
2) Configure holdings_table, visit:
<staff_url>/cgi-bin/koha/admin/columns_settings.pl?module=catalogue&page=detail&table=holdings_table
3) Confirm holdings_booksellerid is there and is hidden by default
4) Visit a record:
<staff_url>/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
5) Edit one of the items and add a value to field 'e' Source of acquisition
5.5) You may need to click the 'show filters' link in order to have the 'Columns' table button show up
6) Go back to the record and click on the 'Columns' above the table
7) Click 'Source of acquisition'. Confirm it shows as expected

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 28633: (follow-up) Set preferred name and adjust counts for tests
Nick Clemens [Tue, 12 Nov 2024 14:47:07 +0000 (14:47 +0000)]
Bug 28633: (follow-up) Set preferred name and adjust counts for tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 38390: Add subscriptions+count to vendors embed
Martin Renvoize [Thu, 7 Nov 2024 12:59:40 +0000 (12:59 +0000)]
Bug 38390: Add subscriptions+count to vendors embed

This patch adds the subscriptions+count option to the embeddable enum
for the /vendors endpoint.

Test plan
1) Inspect the change to t/db_dependant/api/v1/acquisitions_vendors.t
   and confirm it's testing for the addition of subscriptions_count.
2) Run the above tests and confirm it passes

Note: For the above tests to pass, you will need to ensure your api
bundle is rebuilt after the patches are applied and restart plack.
`yarn build && restart_all` in ktd

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34355: (QA follow-up) Terminology and capitalization
Katrin Fischer [Mon, 11 Nov 2024 16:11:37 +0000 (16:11 +0000)]
Bug 34355: (QA follow-up) Terminology and capitalization

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>