koha.git
2 years agoBug 29092: DBRev 21.12.00.039
Fridolin Somers [Wed, 27 Apr 2022 21:16:21 +0000 (11:16 -1000)]
Bug 29092: DBRev 21.12.00.039

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29092: Add timestamp to account-fines table column settings
Emmi Takkinen [Thu, 21 Apr 2022 06:27:17 +0000 (09:27 +0300)]
Bug 29092: Add timestamp to account-fines table column settings

Table settings for the account_fines table (in the Patrons section, the
"Transactions" table in a patron account) are missing a checkbox for the
"Updated On" column. Because of this, one cannot hide the Updated On
column and any other values one sets here get applied to the wrong
columns.

This patch adds timestamp to account-fines column settings.
To test:

1) Navigate to columns settings page and modify account-fines tables
   column.
   => Note that if you hide e.g. account_type column, column
   credit_number is hidden on patrons account page
2) Apply patch and update database.
   => Account-fines column settings has now a option to hide timestamp.
   => Correct columns should now be hidden.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30136: Compiled CSS
Fridolin Somers [Wed, 27 Apr 2022 20:56:39 +0000 (10:56 -1000)]
Bug 30136: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30136: (follow-up) CSS and accessibility update
Owen Leonard [Mon, 25 Apr 2022 11:03:40 +0000 (11:03 +0000)]
Bug 30136: (follow-up) CSS and accessibility update

This patch adds the new CSS to the global CSS file. Rebuild the OPAC CSS
to test.

The patch also moves the JavaScript for the button from opac-bottom.inc
into global.js and adds accessibility labels to the generated markup.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30136: Add back to top button to OPAC
Fridolin Somers [Fri, 18 Feb 2022 20:44:14 +0000 (10:44 -1000)]
Bug 30136: Add back to top button to OPAC

Like in many websites, when scrolling down the page make a button appear to go back to top.
This can be very useful specially in search results page.

This patch adds to OPAC using Javascript a button with id "backtotop".
Button appears when 300 pixels from top are hidden.
This value may be adapted.

Test plan
1) Go to OPAC
2) Perform a search with many results
3) Scroll down
=> Back to top button appears
4) Manually scroll back to top
=> Button disappears
5) Scroll down and click on Back to top button
=> You get to top

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: DBRev 21.12.00.038
Fridolin Somers [Wed, 27 Apr 2022 20:46:14 +0000 (10:46 -1000)]
Bug 29648: DBRev 21.12.00.038

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: (follow-up) Add missing raw filter
Fridolin Somers [Wed, 27 Apr 2022 20:34:04 +0000 (10:34 -1000)]
Bug 29648: (follow-up) Add missing raw filter

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: (QA follow-up) Remove NumSavedReports from .pref file
Katrin Fischer [Wed, 27 Apr 2022 16:19:21 +0000 (16:19 +0000)]
Bug 29648: (QA follow-up) Remove NumSavedReports from .pref file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: (QA follow-up) Minor POD fix
Martin Renvoize [Wed, 27 Apr 2022 16:04:28 +0000 (17:04 +0100)]
Bug 29648: (QA follow-up) Minor POD fix

This just adds a top level set of POD headings to make the QA script
happy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Fix occurrences of GetColumns
Jonathan Druart [Thu, 6 Jan 2022 14:11:40 +0000 (15:11 +0100)]
Bug 29648: Fix occurrences of GetColumns

We could add the configuration to these tables as well, but let go first
but the others (read: feeling lazy right now).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Returns - no change
Jonathan Druart [Thu, 16 Dec 2021 12:04:17 +0000 (13:04 +0100)]
Bug 29648: Returns - no change

No change expected here, there is no sort and no paginate possible.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Upload tool - no sort
Jonathan Druart [Thu, 16 Dec 2021 13:12:39 +0000 (14:12 +0100)]
Bug 29648: Upload tool - no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Remove default sort order for detail
Jonathan Druart [Wed, 12 Jan 2022 14:47:59 +0000 (15:47 +0100)]
Bug 29648: Remove default sort order for detail

On the detail view the number of columns changed, we cannot use the
default sort order here.
It certainly can be done on a different way but I prefer to postpone it
for now and see later.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Notice template - only sort
Jonathan Druart [Thu, 16 Dec 2021 13:09:28 +0000 (14:09 +0100)]
Bug 29648: Notice template - only sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds history - no sort
Jonathan Druart [Thu, 16 Dec 2021 12:16:15 +0000 (13:16 +0100)]
Bug 29648: Holds history - no sort

because of desc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Log viewer - no sort
Jonathan Druart [Thu, 16 Dec 2021 13:15:34 +0000 (14:15 +0100)]
Bug 29648: Log viewer - no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Subscription detail - no change
Jonathan Druart [Thu, 16 Dec 2021 13:08:20 +0000 (14:08 +0100)]
Bug 29648: Subscription detail - no change

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Item lost report - no change
Jonathan Druart [Thu, 16 Dec 2021 13:07:05 +0000 (14:07 +0100)]
Bug 29648: Item lost report - no change

hum, there is no sort on this table, so it's displayed like it's coming
from the controller, but perl code does not sort either.
This could be improved and we could make it configurable easily

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: patron list table - normal
Jonathan Druart [Thu, 16 Dec 2021 13:02:50 +0000 (14:02 +0100)]
Bug 29648: patron list table - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Checkout history - no sort
Jonathan Druart [Thu, 16 Dec 2021 13:01:48 +0000 (14:01 +0100)]
Bug 29648: Checkout history - no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Payments - normal
Jonathan Druart [Thu, 16 Dec 2021 13:00:59 +0000 (14:00 +0100)]
Bug 29648: Payments - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Patron page (PatronsPerPage) - no change
Jonathan Druart [Thu, 16 Dec 2021 12:59:15 +0000 (13:59 +0100)]
Bug 29648: Patron page (PatronsPerPage) - no change

PatronsPerPage should be done on a separate bug report, not trivial

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Patron accounting page - no sort
Jonathan Druart [Thu, 16 Dec 2021 12:15:09 +0000 (13:15 +0100)]
Bug 29648: Patron accounting page - no sort

because of desc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: ILL - no change
Jonathan Druart [Thu, 16 Dec 2021 12:13:27 +0000 (13:13 +0100)]
Bug 29648: ILL - no change

No change expected here for ILL

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Course reserve list - normal
Jonathan Druart [Thu, 16 Dec 2021 12:10:26 +0000 (13:10 +0100)]
Bug 29648: Course reserve list - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Course reserve detail - normal
Jonathan Druart [Thu, 16 Dec 2021 12:09:38 +0000 (13:09 +0100)]
Bug 29648: Course reserve detail - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds queue - only sort
Jonathan Druart [Thu, 16 Dec 2021 12:05:40 +0000 (13:05 +0100)]
Bug 29648: Holds queue - only sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds ratios - normal but no sort
Jonathan Druart [Thu, 16 Dec 2021 12:03:01 +0000 (13:03 +0100)]
Bug 29648: Holds ratios - normal but no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds to pull - normal
Jonathan Druart [Thu, 16 Dec 2021 12:01:58 +0000 (13:01 +0100)]
Bug 29648: Holds to pull - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Overdue list - normal
Jonathan Druart [Thu, 16 Dec 2021 12:00:30 +0000 (13:00 +0100)]
Bug 29648: Overdue list - normal

'stateSave' so need to test on the first try or delete the relevant local storage
entry

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Cataloguing Z3950 search - no pagination
Jonathan Druart [Thu, 16 Dec 2021 11:56:00 +0000 (12:56 +0100)]
Bug 29648: Cataloguing Z3950 search - no pagination

Pagination is done server-side

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Checkout history - normal no sort
Jonathan Druart [Thu, 16 Dec 2021 11:54:01 +0000 (12:54 +0100)]
Bug 29648: Checkout history - normal no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Catalogue detail - no default_display_length
Jonathan Druart [Thu, 16 Dec 2021 11:48:57 +0000 (12:48 +0100)]
Bug 29648: Catalogue detail - no default_display_length

On the acquisition table the sort option is not available as we don't
offer the ability to selection asc/desc and default to asc.
We cannot offer default_display_length for those tables.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: DBIC Schema changes
Jonathan Druart [Thu, 16 Dec 2021 11:45:24 +0000 (12:45 +0100)]
Bug 29648: DBIC Schema changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Allow tables_settings.default_display_length to be NULL
Jonathan Druart [Thu, 16 Dec 2021 11:41:06 +0000 (12:41 +0100)]
Bug 29648: Allow tables_settings.default_display_length to be NULL

We actually want this value to be NULL. If set to NULL and
default_display_length is not in the yml, then the option will not be
displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Item types administration view
Jonathan Druart [Thu, 16 Dec 2021 11:26:21 +0000 (12:26 +0100)]
Bug 29648: Item types administration view

Set noItemTypeImages and OpacNoItemTypeImages to "No" and confirm
that the first column (the image) is not displayed. Otherwise test as
"normal"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Cities administration view - REST API
Jonathan Druart [Thu, 16 Dec 2021 11:24:20 +0000 (12:24 +0100)]
Bug 29648: Cities administration view - REST API

Here we need to deal with the other DT config (in datatables.js, not
columns_settings.inc).

Test plan:
Same as "normal"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Patron categories administration view - normal
Jonathan Druart [Thu, 16 Dec 2021 11:17:30 +0000 (12:17 +0100)]
Bug 29648: Patron categories administration view - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Libraries administration view - normale
Jonathan Druart [Thu, 16 Dec 2021 11:16:10 +0000 (12:16 +0100)]
Bug 29648: Libraries administration view - normale

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Authorised values view
Jonathan Druart [Thu, 16 Dec 2021 11:15:10 +0000 (12:15 +0100)]
Bug 29648: Authorised values view

No change is expected on this view as the table is not part of the table
settings.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Late orders view - normal
Jonathan Druart [Thu, 16 Dec 2021 11:13:14 +0000 (12:13 +0100)]
Bug 29648: Late orders view - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Order search view - normal
Jonathan Druart [Thu, 16 Dec 2021 11:11:57 +0000 (12:11 +0100)]
Bug 29648: Order search view - normal

"normal" means that we are expecting the table to have the 2 options
implemented and working.
You can select "Default display length" and "Default sort order"
in the "table settings" administration view, then go the the view
and confirm that the table has the configured values pre-selected.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Duplicate orders view - no change
Jonathan Druart [Thu, 16 Dec 2021 11:05:46 +0000 (12:05 +0100)]
Bug 29648: Duplicate orders view - no change

No change expected here, only removing commented-out code.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Add item - broken FIXME
Jonathan Druart [Thu, 16 Dec 2021 10:57:12 +0000 (11:57 +0100)]
Bug 29648: Add item - broken FIXME

Why don't we have the columns visibility button?

It looks like there is something broken here, why don't we have the
show/hide columns buttons? The code expects it to be displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Move NumSavedReports to the table settings
Jonathan Druart [Thu, 16 Dec 2021 10:50:58 +0000 (11:50 +0100)]
Bug 29648: Move NumSavedReports to the table settings

The syspref NumSavedReports can be moved to the table settings config
Test plan:
1. Set the syspref to a given value
2. updatedatabase # execute the atomic update
3. Go to the table settings page and confirm that the syspref's value
has been retrieved
4. Select a specific colonne for the default sort
5. Go to the report list view and confirm that the "Show X entries" has
the correct selected value and that the table is sorted as you expect.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Improve existing code
Jonathan Druart [Thu, 16 Dec 2021 10:34:02 +0000 (11:34 +0100)]
Bug 29648: Improve existing code

We already have 2 tables that are configurable, on acqui/basket and
reports/orders_by_budget.
This patch is modifying a bit the existing code to transfer the
responsability/logic to the KohaTable constructor instead of the
template that is creating the object.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Add BNF z3950 server
Bernardo Gonzalez Kriegel [Mon, 25 Apr 2022 01:55:05 +0000 (22:55 -0300)]
Bug 30373: (follow-up) Add BNF z3950 server

This is not strictly necessary, but is useful to do the testing

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Enable 'qualif' authorised_value
Bernardo Gonzalez Kriegel [Mon, 25 Apr 2022 01:05:05 +0000 (22:05 -0300)]
Bug 30373: (follow-up) Enable 'qualif' authorised_value

This patch reinstates the authorised value 'qualif'
to it's corresponding place

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify 'qualif' authorised_value is present in subfield $4 of
   fields 700/1/2/3, 710/1/2/3, 720/1/2/3 and 730

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Optional SUGGEST auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 23:47:55 +0000 (20:47 -0300)]
Bug 30373: (follow-up) Optional SUGGEST auth values

This patch adds 3 SUGGEST optional auth_val.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install with optional files or load the YAML file
2) Verify new SUGGEST values are in the database
    SELECT * FROM authorised_values WHERE category = 'SUGGEST';

    Check new values Budget, Expensive and Poldoc

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) UNIMARC relator codes auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 22:11:40 +0000 (19:11 -0300)]
Bug 30373: (follow-up) UNIMARC relator codes auth values

This patch adds UNIMARC relator codes into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
    SELECT * FROM authorised_values WHERE category = 'qualif';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Language codes auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 21:28:53 +0000 (18:28 -0300)]
Bug 30373: (follow-up) Language codes auth values

This patch adds language codes (ISO 639-2) into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
    SELECT * FROM authorised_values WHERE category = 'LANG';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Country codes auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 21:14:32 +0000 (18:14 -0300)]
Bug 30373: (follow-up) Country codes auth values

This patch adds COUNTRY codes (ISO 3166-1) into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new country codes are in the database
    SELECT * FROM authorised_values WHERE category = 'COUNTRY';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29077: (follow-up) Use another syntax
Fridolin Somers [Wed, 27 Apr 2022 00:59:59 +0000 (14:59 -1000)]
Bug 29077: (follow-up) Use another syntax

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29077: Remove blank indexes before convert
Nick Clemens [Wed, 22 Sep 2021 12:55:19 +0000 (12:55 +0000)]
Bug 29077: Remove blank indexes before convert

To test:
1 - Be using Elasticsearch
2 - Search on OPAC with dropdown set to 'Library catalog'
3 - Warns in plack-opac-error.log
4 - Apply patch
5 - Repeat
6 - No warns
7 - Search returns correct results

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30224: Show correct important field in cataloguing validation
Adam Styles [Fri, 4 Mar 2022 00:22:38 +0000 (11:22 +1100)]
Bug 30224: Show correct important field in cataloguing validation

This patch fxes the cataloguing validation messages to show the correct tag, when the whole field is important (not just a subfield).

Note: Look at Bug 30159 to fix the formatting of the validation popup.

1. Go to Administration -> MARC bibliographic frameworks
2. Click Actions next to a framework, view MARC structure
3. Edit multiple tags (at least 2) and check the Important checkbox.
4. Go to cataloguing and create a new record using the framework you just edited
5. Don't fill any of the important fields. Click Save to force the validation for the important tags
6. Notice that the error message shows that an important field isn't filled, but the tag number shown is repeated for each message. The 'Go to field' link goes to the right tag, but the tag number shown is incorrect.
7. Apply patch and refresh page
8. Click Save to force validation again.
9. Confirm the correct tag number is now showing for each error message.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30482: Potential for bad string concatenation in cataloging validation error...
Owen Leonard [Thu, 7 Apr 2022 09:36:00 +0000 (09:36 +0000)]
Bug 30482: Potential for bad string concatenation in cataloging validation error message

In validating the basic MARC editor form before submission, we run
AreFieldsNotOk() twice (once with the parameter "false") and concatenate
the result for output. This creates the potential for the error string
to be appended with "0" if AreFieldsNotOk() returns false.

This patch improves the logic around building the error string.

To test, apply the patch and make sure one of your MARC frameworks
contains at least one mandatory field and at least one important field.

- Edit or create a MARC record in the basic MARC editor.
- Submit the form in various states of completion:
  - If a mandatory and an important field are empty, you should see two
    error messages at the top. "The following mandatory subfields aren't
    filled" and "The following important subfields aren’t filled."
  - If a mandatory OR an important field is empty, you should see a
    single message.
    - If it's the important field which is empty, a confirmation will
      ask if you want to save the record anyway. Test that both answers
      to this confirmation work correctly.
  - If no mandatory or important fields are empty the form should
    submit.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30072: (followup) Fix random failure of Holds_hooks.t
Fridolin Somers [Wed, 27 Apr 2022 00:17:00 +0000 (14:17 -1000)]
Bug 30072: (followup) Fix random failure of Holds_hooks.t

When building Koha::Holds object,
do not let 'found' random otherwise it may take a valid value indicating
hold is found.

See other holds unit tests.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 28371: Unit tests"
Fridolin Somers [Tue, 26 Apr 2022 06:52:19 +0000 (20:52 -1000)]
Revert "Bug 28371: Unit tests"

This reverts commit 7e98a8a686ccf112f7aeaa181c4e5e19ec750277.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 28371: Passpreviously fetched branches and itemtypes through and fetch...
Fridolin Somers [Tue, 26 Apr 2022 06:52:17 +0000 (20:52 -1000)]
Revert "Bug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed AV at once"

This reverts commit 8e1d5d4b8fa416992abd072a0453d280ea34348e.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30587: Fix acqui/supplier.tt translate issues
Tomas Cohen Arazi [Thu, 21 Apr 2022 16:48:47 +0000 (13:48 -0300)]
Bug 30587: Fix acqui/supplier.tt translate issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30587: Fix opac-tags.tt translate issues
Tomas Cohen Arazi [Thu, 21 Apr 2022 16:24:06 +0000 (13:24 -0300)]
Bug 30587: Fix opac-tags.tt translate issues

This patch addresses one specific case.

To test:
1. Run:
   $ kshell
  k$ cd misc/translator
  k$ perl translate update es-ES
2. On your git checkout run:
   $ git diff | grep '\[% limit or'
=> FAIL: That shouldn't be translated
3. Run:
   $ git reset --hard HEAD
4. Apply this patch
5. Repeat 1 and 2
=> SUCCESS: No attempt to translate that tag
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30596: Prevent api/v1/acquisitions_baskets.t and api/v1/acquisitions_funds.t...
Jonathan Druart [Fri, 22 Apr 2022 11:25:00 +0000 (13:25 +0200)]
Bug 30596: Prevent api/v1/acquisitions_baskets.t and api/v1/acquisitions_funds.t to fail randomly

because of updated_on

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30191: Authority search result list in the OPAC should use 'record' instead of...
Owen Leonard [Wed, 2 Mar 2022 16:21:41 +0000 (16:21 +0000)]
Bug 30191: Authority search result list in the OPAC should use 'record' instead of 'biblios'

This patch updates the OPAC authority search results page so that it
uses the term "record" instead of "biblio."

The patch also changes how the template outputs the count of records so
that it is correctly pluralized, e.g. "1 record" vs. "2 records."

To test, apply the patch and perform an authority search in the OPAC.

In the search results, confirm that the last table header reads
"Records." The information in that column should be correct, using the
word record or records.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30534: Remove guarantor_id attribute from the patron object
Tomas Cohen Arazi [Wed, 13 Apr 2022 20:07:55 +0000 (17:07 -0300)]
Bug 30534: Remove guarantor_id attribute from the patron object

This patch removes an attribute that was actually removed 3 years ago
and causes an exception when trying to search for it. The API responses
don't include it anyways.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30405: Compiled CSS
Fridolin Somers [Mon, 25 Apr 2022 19:50:16 +0000 (09:50 -1000)]
Bug 30405: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30405: Reduce font-size for address in patron search result
Jonathan Druart [Fri, 8 Apr 2022 08:22:05 +0000 (10:22 +0200)]
Bug 30405: Reduce font-size for address in patron search result

The address has a font-size: 110%, it's not needed here, 100% is enough.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29155: (follow-up) Work around change to jQueryUI tab API
Owen Leonard [Fri, 15 Apr 2022 11:45:08 +0000 (11:45 +0000)]
Bug 29155: (follow-up) Work around change to jQueryUI tab API

For some reason, with the combination of jQuery 3.6.0 and jQueryUI
1.13.1, the way to access the current active tab's link has changed.
Previously the tab activate event would provide information about the
link as "ui.newTab.context." It appears that "context" is no longer
available.

This patch updates the two instances in Koha where this process is
broken.

To test, apply the patch and check out to a patron with holds on their
account.

- When the checkout page loads, confirm that each tab loads its contents
  correctly when clicked.
- Check that the correct tab is activated when you append the tab link
  to the page url, e.g.

  /cgi-bin/koha/circ/circulation.pl?borrowernumber=XXX#reldebarments

  ...which should select the "Restrictions" tab for you. You may need to
  try this in a new tab or shift-reload to get the browser to look for
  the hash.

- Perform the same tests on the patron details page.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29155: Update links to jQuery and jQuery Migrate files
Owen Leonard [Thu, 3 Feb 2022 17:38:44 +0000 (17:38 +0000)]
Bug 29155: Update links to jQuery and jQuery Migrate files

With these patches, jQuery versions in the OPAC and staff interface are
both updated to 3.6.0. The latest version of jQuery Migrate is installed
to allow us to take a slower approach to updating out-of-date syntax.

To test, apply the patch and try as many pages as you can, paying
attention to the browser console to watch for errors.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29155: Upgrade jQuery and jQuery Migrate to latest versions
Owen Leonard [Thu, 3 Feb 2022 17:33:17 +0000 (17:33 +0000)]
Bug 29155: Upgrade jQuery and jQuery Migrate to latest versions

jQuery is upgraded from 2.2.3 to 3.6.0.
jQuery Migrate is upgraded from 1.3.0 to 3.3.2.

The next patch will update links to point to the new assets.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30584: Fix ES mapping creation
Jonathan Druart [Thu, 21 Apr 2022 17:23:14 +0000 (19:23 +0200)]
Bug 30584: Fix ES mapping creation

We need to tell DT that we are adding/removing row, not only deal
manually with the DOM.

This patch also fixes the following bug: if you add or remove a row from
the "biblio" tab, then go to another tab and back to "biblio", all
changes were gone (bug existed prior to bug 29893).

Test plan:
Add, edit and remove mappings, switch from tabs and save.
Use the filters, save (29893 regression test)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30461: Fix BatchUpdateAuthority
Jonathan Druart [Wed, 6 Apr 2022 09:35:41 +0000 (11:35 +0200)]
Bug 30461: Fix BatchUpdateAuthority

Use of inherited AUTOLOAD for non-method Koha::BackgroundJob::BatchUpdateAuthority::ModAuthority() is
no longer allowed

Test plan:
Use the batch authority tools to edit authority record and confirm that
the task processes correctly

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30288: (follow-up) Use CSS for separator pipes
Aleisha Amohia [Thu, 21 Apr 2022 02:09:23 +0000 (02:09 +0000)]
Bug 30288: (follow-up) Use CSS for separator pipes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28840: (QA follow-up) Update id to ID
Katrin Fischer [Sun, 24 Apr 2022 12:29:26 +0000 (14:29 +0200)]
Bug 28840: (QA follow-up) Update id to ID

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28840: Better texts in batch record modification/deletion
Fridolin Somers [Tue, 10 Aug 2021 22:03:58 +0000 (12:03 -1000)]
Bug 28840: Better texts in batch record modification/deletion

Tools batch record modification/deletion form contains texts in legends, labels, hints.

I feel like :
Labels are sometimes too long, showing them on multi-lines, like "Modify record using the following template". Long texts should be in legend or hint.
Legend are sometimes contains redundant text, like in tabs.
Also I propose to use "record id" instead of "record number".

Test plan :
Compare texts in page without and with patch

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed...
Nick Clemens [Wed, 25 Aug 2021 15:26:23 +0000 (15:26 +0000)]
Bug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed AV at once

This patch updates the searchResuls code to pass through the pre-constructed branches and itemtype lookups
to XSLTParse4Display to avoid repeating this

It also updates getAuthorisedValues4MARCSubfields to fetch the values for mapped subfields and pass
then through to transforMarc4XSLT

Note that we currently blank invalid branches and itemtypes - I presrve this, we should open another bug
if we want to change this behaviour

Changes are covered by tests

To test:
1 - Perform searches in OPAC and staff client that return many records
2 - Use the 'Network' tab on the browser console (opened with F12 usually) to see the time taken
3 - Note the speed before the patch
4 - Apply patch
5 - restart all the things
6 - Note improvement in speed

**Note: The improvement is more drastic the more items per record, try adding large numbers of items to your search results to test**

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28371: Unit tests
Nick Clemens [Wed, 25 Aug 2021 15:25:56 +0000 (15:25 +0000)]
Bug 28371: Unit tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27253: (follow-up) Fix UNIXTIME(0) in db_revs/211200037.pl
Marcel de Rooy [Mon, 25 Apr 2022 10:29:05 +0000 (10:29 +0000)]
Bug 27253: (follow-up) Fix UNIXTIME(0) in db_revs/211200037.pl

MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(0) ) where borrowernumber=51;
ERROR 1292 (22007): Incorrect datetime value: '1970-01-01 00:00:00' for column `koha_myclone`.`borrowers`.`updated_on` at row 1

MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(1) ) where borrowernumber=51;
Query OK, 1 row affected (0.008 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by switching updated_on to datetime. Remove NOT NULL, etc.
Copied dbrev to atomicupdate folder.
Resulted in:
    Updated all NULL values of borrowers.updated_on to GREATEST(date_renewed, dateenrolled, lastseen): 51 rows updated

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Fix xt/find-license-problems.t
Jonathan Druart [Fri, 22 Apr 2022 10:02:40 +0000 (12:02 +0200)]
Bug 30373: Fix xt/find-license-problems.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Fix unimarc authorised values
Jonathan Druart [Fri, 22 Apr 2022 08:18:08 +0000 (10:18 +0200)]
Bug 30373: Fix unimarc authorised values

1. Replace
  authorised_value: ""
with
  authorised_value:
to match what is done for marc21

2. Fix some wrong category names
-          authorised_value: 146a
+          authorised_value: unimarc_146a

-          authorised_value: 182a
+          authorised_value: unimarc_182a

-          authorised_value: 182c
+          authorised_value: unimarc_182c

3. Remove some category that have not been inserted (should we insert
them then?)
-          authorised_value: 183a
+          authorised_value:

-          authorised_value: qualif
+          authorised_value:

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 30373: (follow-up) Fix license"
Fridolin Somers [Fri, 22 Apr 2022 18:46:48 +0000 (08:46 -1000)]
Revert "Bug 30373: (follow-up) Fix license"

This reverts commit 15405829bffec99e82a23f221fa4a75ada2f0ac5.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30595: Prevent update_child_to_adult.t to fail randomly
Jonathan Druart [Fri, 22 Apr 2022 09:42:09 +0000 (11:42 +0200)]
Bug 30595: Prevent update_child_to_adult.t to fail randomly

t/db_dependent/selenium/update_child_to_adult.t ..         # Looks like you planned 3 tests but ran 2.

    #   Failed test 'Update child to adult'
    #   at t/db_dependent/selenium/update_child_to_adult.t line 132.
    # Looks like you planned 3 tests but ran 2.
    # Looks like you failed 1 test of 2 run.
t/db_dependent/selenium/update_child_to_adult.t .. 1/1
 #   Failed test 'Update child to patron'
 #   at t/db_dependent/selenium/update_child_to_adult.t line 153.
Cannot wait more for element '//input[@type="submit"]' to be visible at /kohadevbox/koha/t/lib/Selenium.pm line 189.

It happens when there are too many patron's categories and the submit
button is not in the viewport.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Fix 2FA selenium tests
Jonathan Druart [Fri, 22 Apr 2022 08:54:42 +0000 (10:54 +0200)]
Bug 28786: Fix 2FA selenium tests

Looks like there was a bad rebase at some point.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 years agoBug 30446: (follow-up) Remove warning
Tomas Cohen Arazi [Wed, 20 Apr 2022 12:17:03 +0000 (09:17 -0300)]
Bug 30446: (follow-up) Remove warning

This patch removes a trivial warning caused by a parameter being
compared to a literal but not being defined. Doing a

$ git grep GetTagsLabels

shows the change is safe as the function is always called with a value
of either 0 or 1.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30446: Add a test for GetTagsLabels
Marcel de Rooy [Mon, 4 Apr 2022 11:50:01 +0000 (11:50 +0000)]
Bug 30446: Add a test for GetTagsLabels

Moved from obsoleted bug 2222 on its own.

Test plan:
Run t/db_dependent/AuthoritiesMarc_GetTagsLabels.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27253: DBRev 21.12.00.037
Fridolin Somers [Fri, 22 Apr 2022 06:07:39 +0000 (20:07 -1000)]
Bug 27253: DBRev 21.12.00.037

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27253: Fix definition of updated_on in borrowers and deletedborrowers
Julian Maurice [Thu, 31 Mar 2022 13:38:07 +0000 (15:38 +0200)]
Bug 27253: Fix definition of updated_on in borrowers and deletedborrowers

Test plan:
1. First you have to be in a state where updated_on is NULL-able. You
   can do that by either:
   a) do a fresh install of Koha 16.05 and update to master, or
   b) execute the following SQL queries:

     ALTER TABLE borrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'

     ALTER TABLE deletedborrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'
2. Create two borrowers (let's name them X and Y)
3. Delete borrower Y
4. Set the column updated_on to NULL for both borrowers by executing the
   following SQL query:
   UPDATE borrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of X>
   UPDATE deletedborrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of Y>
5. Apply patch and run updatedatabase
6. Verify that borrowers.updated_on and deletedborrowers.updated_on are
   not NULL-able.
   Verify that updated_on for X and Y have taken the value of
   dateenrolled.
7. Repeat step 2 to 6 but this time renew the patron and/or log in with
   its account in order to set the columns borrowers.date_renewed and
   borrowers.lastseen before executing updatedatabase
   borrowers.updated_on should take the greatest value among
   dateenrolled, date_renewed, and lastseen

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30531: Add mock of UseRecalls to Search.t
Nick Clemens [Thu, 14 Apr 2022 11:24:48 +0000 (11:24 +0000)]
Bug 30531: Add mock of UseRecalls to Search.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30512: Staff interface search results template error
Owen Leonard [Tue, 12 Apr 2022 11:56:43 +0000 (11:56 +0000)]
Bug 30512: Staff interface search results template error

This patch removes some markup from the search results template which
was causing markup to be output on the screen. Rather than correct the
markup so that the "p1" class is correctly added to the relevant links
I'm removing it. The "p1" class isn't used anywhere.

The patch also corrects two incorrect template filters on one of the
page's links.

To test, apply the patch and enable the following system preferences:

- AmazonCoverImages
- IntranetCoce (if available)
- LocalCoverImages

- Perform a catalog search in the staff interface which will return
  results with cover images from each of the enabled services.
- The covers should show correctly in the search results with no markup
  being output on screen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Fix license
Fridolin Somers [Fri, 22 Apr 2022 05:58:57 +0000 (19:58 -1000)]
Bug 30373: (follow-up) Fix license

Copy from MARC21 files

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30583: Fix hold system for translated templates
Jonathan Druart [Thu, 21 Apr 2022 14:30:24 +0000 (16:30 +0200)]
Bug 30583: Fix hold system for translated templates

There are missing quotes, and the translate script is messing up with
the generated template.

Error is:
Template process failed: file error - parse error - holds_table.inc line 216-217: unexpected token (hold)

The generated line, without this patch is:
216 <td><input %]="%]" class="printholdslip" data-reserve_id="[%" hold.reserve_id="hold.reserve_id" html="html" name="printholdslip" type="button" value="Recibo" |="|"></td>
With this patch applied:
216  <td><input class="printholdslip" data-reserve_id="[% hold.reserve_id | html %]" name="printholdslip" type="button" value="Recibo"></td>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30532: (bug 29957 follow-up) Fix '$cookie->value'
Jonathan Druart [Thu, 21 Apr 2022 13:05:24 +0000 (15:05 +0200)]
Bug 30532: (bug 29957 follow-up) Fix '$cookie->value'

We got
 Can't call method "value" on unblessed reference at /kohadevbox/koha/opac/opac-messaging.pl line 86

$cookie can be an arrayref, we should retrieve the session id using
CGI->cookie('CGISESSID')

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30525: Items batch modification broken
Owen Leonard [Wed, 13 Apr 2022 14:07:53 +0000 (14:07 +0000)]
Bug 30525: Items batch modification broken

This patch modifies instances in the code which try to get cookies
using:

my %cookies = parse CGI::Cookie($cookie);

In some cases the relevant lines can be removed because they are unused.
In others it can be replaced with:

my %cookies = CGI::Cookie->fetch();

To test, apply the patch and restart_all. Test the following pages to
confirm they load without errors:

- Circulation -> Offline circulation file upload
- Circulation -> Offline circulation -> Add to queue

- Tools -> Batch item modification
- Tools -> Stage MARC for import
- Tools -> Staged MARC management
- Tools -> Batch patron modification
- Tools -> Upload local cover image

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Fix visibility, authorised values and descriptions
Bernardo Gonzalez Kriegel [Fri, 8 Apr 2022 20:51:02 +0000 (17:51 -0300)]
Bug 30373: Fix visibility, authorised values and descriptions

This patch fixes certain values of default bibliographic
framework.

It fixes hidden values using as reference default framework
from biblibre demo site.

Also adds some missing subfields, authorised values and
fixes capitalization on some descriptions.

To test:
1) On biblibre demo site, run a report
   SELECT tagfield,tagsubfield,hidden
   FROM marc_subfield_structure
   WHERE frameworkcode = ''
   ORDER BY tagfield,tagsubfield;
2) Download as tab separated values, ej. biblibre-hidden.txt
3) Apply the patch, remove bib frameworks, load YAML file
4) Run something like this to check correct hidden values

   while read -r -a l; do
    t="${l[0]}";
    s="${l[1]}";
    h="${l[2]}";
    b=$( mysql koha -N -B -e "select hidden from marc_subfield_structure where frameworkcode = '' and tagfield = '$t' and tagsubfield = '$s'");
    [ -n "$b" -a "$b" != "$h" ] && echo "$t:$s: -> change $b to $h";
   done < <( cat biblibre-hidden.txt )

   there must be no output

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Add TYPEDOC authorised_values_category
Bernardo Gonzalez Kriegel [Fri, 8 Apr 2022 21:18:00 +0000 (18:18 -0300)]
Bug 30373: Add TYPEDOC authorised_values_category

TYPEDOC authorised value category is needed to permit
correct loading of default UNIMARC bibliographic framework.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Show 325$a
Jonathan Druart [Thu, 7 Apr 2022 08:48:48 +0000 (10:48 +0200)]
Bug 30373: Show 325$a

It was not hidden in unimarc_complet/Obligatoire/framework_DEFAULT.sql

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Hide items.dateaccessioned from the editor
Jonathan Druart [Thu, 7 Apr 2022 08:46:35 +0000 (10:46 +0200)]
Bug 30373: Hide items.dateaccessioned from the editor

-6 was used in unimarc_complet/Obligatoire/framework_DEFAULT.sql

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30477: Add new UNIMARC installer translation files
Bernardo Gonzalez Kriegel [Wed, 6 Apr 2022 19:46:21 +0000 (16:46 -0300)]
Bug 30477: Add new UNIMARC installer translation files

Depends on Bug 30373

This patch adds *-installer-UNIMARC.po translation files.

For fr, it, uk and ru languages matching strings have been
extracted from master (fr-FR) or 21.05 (it,ru,uk) UNIMARC SQL
files. The mentioned languages shows some level of completion:

    fr-FR 76%
    ru-RU 61%
    it-IT 55%
    uk-UA 54%

To test:
1) Apply the patch
2) Verify new files are present
   misc/translator/po/*-installer-UNIMARC.po
3) Verify fr-FR, it-IT, ru-RU and uk-UA files
   have translated strings (inspect the files or use poedit)
4) Install any of those languages, ej.

     misc/translator/translate install fr-FR

   then do a clean UNIMARC install and verify that
   authority and bibliographic frameworks shows translated
   strings.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Enable translation of UNIMARC frameworks
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 03:50:01 +0000 (00:50 -0300)]
Bug 30373: Enable translation of UNIMARC frameworks

This patch adds a new translation file, *-installer-UNIMARC.po

To test:
1. On top of all previous patches
2. Apply this patch
3. Create (or update) some language
Ej.
    misc/translation/translate create xx-YY

    verify new file misc/translation/po/xx-YY-installer-UNIMARC.po
4. Install new language
    misc/translation/translate install xx-YY

    verify new dirs:
        installer/data/mysql/xx-YY/marcflavour/unimarc/{mandatory,optional}

5. Repeat install procedure selecting xx-YY language and UNIMARC
   verify all frameworks are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Rewrite authorities_normal_unimarc to YAML
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 04:36:38 +0000 (01:36 -0300)]
Bug 30373: Rewrite authorities_normal_unimarc to YAML

YAML version of authorities_normal_unimarc + sample auth types
Includes

This files works like it's marc21 counterpart:
* Defines an authority default framework
* Creates sample auth types by copy

Auth type codes and select fields/subfields are based on
french files in fr-FR install directory.

To test:
1. Apply this patch
2. Repeat UNIMARC install procedure as previous patches
3. Verify authorities_normal_unimarc.yml is loaded without problem
4. In the staff interface verify all auth types are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Add UNIMARC FA (fast add) framework
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 04:27:11 +0000 (01:27 -0300)]
Bug 30373: Add UNIMARC FA (fast add) framework

This parch creates optional folder and a sample
fast add framework

To test:
0. On top of first patch, repeat procedure to do an UNIMARC install
1. Verify existence of FA framework

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>