]> git.koha-community.org Git - koha.git/log
koha.git
15 months agoBug 33417: Remove old components
Matt Blenkinsop [Wed, 5 Apr 2023 12:05:35 +0000 (12:05 +0000)]
Bug 33417: Remove old components

This commit deletes the old toolbar components as they are no longer
necessary

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd9255d84978ee7b3f1dc62ac53d9e320ea703e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11d27b0a4abd8eaad5dd0c55fc8aab97d165f96c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33417: Add toolbar imports and options
Matt Blenkinsop [Wed, 5 Apr 2023 12:04:20 +0000 (12:04 +0000)]
Bug 33417: Add toolbar imports and options

This commit amends the required files to import the toolbar and add the
correct options

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c10d6c6b0045f78baa033048956d3ae9cd29d5d0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9352f0aff1c6097d60b2854bb446740602bdcfe7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33417: Create standard toolbar component
Matt Blenkinsop [Wed, 5 Apr 2023 12:02:22 +0000 (12:02 +0000)]
Bug 33417: Create standard toolbar component

This commit introduces a standard Toolbar component that can be used
throughout ERM

Test plan:
1) Apply patch
2) Navigate to Agreements and click the "Add agreement" button - this
   should work as normal
3) Navigate to Licenses and repeat
4) Navigate to Local packages and repeat
5) Navigate to local titles - there should be two buttons, one to add and
   one to import. These should work as normal

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09666ecf4e2eeabfc13ddc4d0b43311e35dbe0b5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c7d3cad2860456ef0ce68ce654e29e9f82d952ae)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33897: (QA follow-up) Correct code for tab selection
Owen Leonard [Fri, 9 Jun 2023 17:19:28 +0000 (17:19 +0000)]
Bug 33897: (QA follow-up) Correct code for tab selection

This patch corrects the code for selecting tabs other than the first
tab.

To test, apply the patch and view the bibliographic detail page for a
serial record and with various settings of the opacSerialDefaultTab
system preference.

If you select "subscriptions tab" the subscriptions tab should be active
by default.

You can also enable html5media and view a record with html5media
information and no holdings. The media tab should be displayed by
default.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5308697ab8080915e6b4a415e37056ccdfb6ec59)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6e99fa4ec72d02c7dcac78bf81144d58ace97c20)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33897: Use template wrapper for tabs: OPAC bibliographic detail page
Owen Leonard [Thu, 1 Jun 2023 15:32:43 +0000 (15:32 +0000)]
Bug 33897: Use template wrapper for tabs: OPAC bibliographic detail page

This patch updates the OPAC bibliographic detail page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and locate a bibliographic record. View the
detail page. Verify that tabs are working, including all the options:

  - Holdings
  - Other holdings (If OpacSeparateHoldings is enabled)
  - Descriptions (MARC notes)
  - Subscriptions
  - Serial collection (UNIMARC, untested)
  - Components (If ShowComponentRecords is enabled. See Bug 11175 for
    sample record)
  - Comments
  - Editions (OPACFRBRizeEditions)
  - Html5media (If HTML5MediaEnabled is on. See Bug 8377 for sample
    records)
  - Images (If OPACLocalCoverImages is enabled)
  - NovelistSelect
  - Author identifiers (Witgh OPACAuthorIdentifiers enabled, see Bug
    29897)

Bonus points for testing these tabs for which I don't have credentials:
- Syndetics TOC
- Syndetics Excerpt
- Syndetics Reviews
- Syndetics AuthorNotes
- LibraryThing for Libraries (with LibraryThingForLibrariesTabbedView
  set to "in tabs.")

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 59c2a77ab78dfcfa57429cff1d8f6e0e994554c2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f8a4a475653c714313ec494114845c374b53a41)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33176: Enforce bad values
Lucas Gass [Wed, 7 Jun 2023 18:40:48 +0000 (18:40 +0000)]
Bug 33176: Enforce bad values

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Try a paymnet again this time manipulate the DOM and change the value of 'CASH' to something else like 'SOMETHINGELSE'.
9. Try to submit the payment and again you will get a 500 error. The payment should not go through.
10. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
11. Make sure tests will pass

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 676d263687ad666184fce6d505af6d9672412732)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6be23e725134cf2d5f20279b209b0a8aa62aaa90)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33176: Enforce RequirePaymentType with API
Lucas Gass [Thu, 13 Apr 2023 17:52:58 +0000 (17:52 +0000)]
Bug 33176: Enforce RequirePaymentType with API

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df4285adb2f6669ad62b0e3b1eddb04f44761d16)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 68c725afeec87d4cd6bddb78323c2d5c66969901)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33176: Handle RequirePaymentType
Lucas Gass [Thu, 13 Apr 2023 17:28:24 +0000 (17:28 +0000)]
Bug 33176: Handle RequirePaymentType

Test plan:

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
9. Make sure tests will pass:

prove -v t/db_dependent/Koha/Account.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b15a15df9e2f579f984c804bdea4d2951ec75891)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 98347e1612949cffa11e750f2dfb76d7e33b8eaa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoUpdate .mailmap
Tomas Cohen Arazi [Mon, 12 Jun 2023 14:05:19 +0000 (11:05 -0300)]
Update .mailmap

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd5212ac2fef6fd0b9a435ebe9258ca1b13de014)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ea1ed9e2333fd256804d5ed356ba8e612c462e7c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33806: Retain specified date when confirming item parts at checkin
Nick Clemens [Tue, 23 May 2023 12:54:34 +0000 (12:54 +0000)]
Bug 33806: Retain specified date when confirming item parts at checkin

This patch simply adds hidden inputs to the item parts confirm form
to ensure specified checkin date is retained

To test:
 1 - Find or add an item with subfield 3 - materials specified
 2 - Enable system preference CircConfirmItemParts
 3 - Go to Circulation->Checkin
 4 - Click the settings button in the input box and enter a checkin date and select the remeber check box
 5 - Check in some items, confirm date retained
 6 - Checkin the item with the materials specified
 7 - Confirm checkin
 8 - Note that checkin date is cleared
 9 - Apply patch
10 - Repeat 3-7
11 - Confirm date is retained

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9bca328d91acc6b010a44afea4403dd4d595cb98)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8ca854d4e3333d5321743c5663498f85e1fbf655)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33844: Fix is_denied_renewal
Marcel de Rooy [Fri, 26 May 2023 12:58:22 +0000 (12:58 +0000)]
Bug 33844: Fix is_denied_renewal

Going via result_set->has_column does cost actually nothing if
the object is already there.

Test plan:
Run again t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a215087a6af5852a76eea86246a76eb7d0741315)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33844: Modify test to show problem
Marcel de Rooy [Fri, 26 May 2023 12:54:22 +0000 (12:54 +0000)]
Bug 33844: Modify test to show problem

Add delete key.
Without the follow-up, this triggers a delete. Test fails.
DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234

Test plan:
Run t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cc9fe394926a967e3b8a75d1f285fa35d221c66)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: DBRev 22.11.07.001
Tomas Cohen Arazi [Wed, 7 Jun 2023 18:07:42 +0000 (15:07 -0300)]
Bug 32478: DBRev 22.11.07.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 233094521e02f19f32b25570031d299bde3708ae)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (QA follow-up) Keep current hashref behavior
Marcel de Rooy [Fri, 26 May 2023 09:28:28 +0000 (09:28 +0000)]
Bug 32478: (QA follow-up) Keep current hashref behavior

Prevent a crash on wrong contents for ItemsDeniedRenewal pref
as we did before.
Note: Could be a provisional measure (no band aid to repeat anywhere)
until we resolve this in preferences.pl.

Test plan:
Without this patch:
Change ItemsDeniedRenewal to 'nonsense'
Run perl -MKoha::Items -e'Koha::Items->find(X)->is_denied_renewal; print "OK\n"'
=> Replace X by a valid itemnumber
Crashes with: Can't use string ("nonsense") as a HASH ref ... No OK print.

Apply this patch
Run perl -MKoha::Items -e'Koha::Items->find(X)->is_denied_renewal; print "OK\n"'
=> Replace X by a valid itemnumber
Warns only with: Hashref expected for ItemsDeniedRenewal. You got OK.
Clear ItemsDeniedRenewal
Try again. No warning anymore.
Run t/Context.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab1cb8a3c09c8ec8fb26cc1e2a2321eff939cc64)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t
Marcel de Rooy [Fri, 26 May 2023 08:32:21 +0000 (08:32 +0000)]
Bug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t

Test plan:
Run t/db_dependent/Koha/Config/SysPrefs.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b4192a6525bd4680b844a2e844d709558168565d)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: Fix syspref NULL values in tests
David Gustafsson [Fri, 12 May 2023 14:52:33 +0000 (16:52 +0200)]
Bug 32478: Fix syspref NULL values in tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 151c76eafb7e40f5c3a68ef26dd8ff065ad277fa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (follow-up) Tidy code
Nick Clemens [Thu, 4 May 2023 18:39:50 +0000 (18:39 +0000)]
Bug 32478: (follow-up) Tidy code

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c3223445d2de179f06486757af648f276a7cc84)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (follow-up) UpdateItemLocationOnCheckin no longer needs flattening
Nick Clemens [Thu, 4 May 2023 18:37:53 +0000 (18:37 +0000)]
Bug 32478: (follow-up) UpdateItemLocationOnCheckin no longer needs flattening

This patch removes a line flattening the arrays generated by get_yaml_pref_hash
as it is no longer necessary

Conditionals are adjusted to avoid warnings in tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 22d3c6121aa549edf89f1f5f1f8b1355271bbedb)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: Fix handling of undef values in ItemsDeniedRenewal
David Gustafsson [Thu, 4 May 2023 15:51:44 +0000 (17:51 +0200)]
Bug 32478: Fix handling of undef values in ItemsDeniedRenewal

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9c89bf1956ed3f7589196ad963b33b1450f3c158)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: Remove Koha::Config::SysPref->find since bypasses cache
David Gustafsson [Thu, 29 Sep 2022 15:18:40 +0000 (17:18 +0200)]
Bug 32478: Remove Koha::Config::SysPref->find since bypasses cache

get_yaml_pref_hash also allows invalid YAML and only parses a limited
subset so remove this method to avoid future issues.

To test):

Since tests already exists for C4::Context->yaml_preference and this
is a trivial change, do we really need a test plan for this?

Sponsored-by: Gothenburg University Library
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 342d46e611ec294ad745b11d922560a0e66fe6d6)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 30002: (QA follow-up) Add .perltidyrc to Makefile.PL mapping
Tomas Cohen Arazi [Fri, 9 Jun 2023 18:42:23 +0000 (15:42 -0300)]
Bug 30002: (QA follow-up) Add .perltidyrc to Makefile.PL mapping

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8040370e78c83b1a581cd10d61842b637fd8c279)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7cabedbe0b607bfa6fe095314ce9b08cf50a1c0c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30649: (follow-up) Improve database update
Martin Renvoize [Wed, 7 Jun 2023 11:42:01 +0000 (12:42 +0100)]
Bug 30649: (follow-up) Improve database update

This patch implements the proposed switch to use the standard DB handle
and only require Koha::Encryption if necessary.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8d2291f2efc6e3f66b24b5152b6be6cd7ad50f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f742b2a84a47cfa2b67fd2cf427ea1e699f6dc57)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33967: Add unit test to ensure SetEnv doesn't compromise $env
David Cook [Fri, 9 Jun 2023 06:46:43 +0000 (06:46 +0000)]
Bug 33967: Add unit test to ensure SetEnv doesn't compromise $env

This patch includes a unit test which checks the memory address
of the $env hashref in middlewares before and after
Koha::Middleware::Env is applied.

It succeeds when the same $env is maintained before and after
this middleware. It fails if the $env has been overwritten with
a new hashref (as evidenced by the new memory address for the
hash).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c7142fe940e7eed25afc814bb8afb017e5f90ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f73dbd00ad595a3d35e334902a2c3708da8c46ed)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33967: Fix SetEnv middleware to preserve $env integrity
David Cook [Fri, 9 Jun 2023 03:59:28 +0000 (03:59 +0000)]
Bug 33967: Fix SetEnv middleware to preserve $env integrity

This patch fixes the Koha::Middleware::SetEnv, so that it
preserves the referential integrity of the $env hash
reference as it passes through the pre-process and post-process
stages of middleware wrapped around the core Koha Plack application.

Test plan:
0a. Apply the patch
0b. vi /etc/koha/sites/kohadev/koha-conf.xml
0c. Uncomment "koha_trusted_proxies"
0d. Add "172.0.0.0/8" to the end of the "koha_trusted_proxies"
0e. koha-plack --restart kohadev
1. vi /etc/apache2/sites-enabled/kohadev.conf
2. Add the following to the OPAC virtualhost:
SetEnv OVERRIDE_SYSPREF_LibraryName "The Best, Truly the Best, Koha Library"
RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName The Best\, Truly the Best\, Koha Library"
RequestHeader add X-Forwarded-For "192.168.100.100"
3. service apache2 restart
4. tail -f /var/log/koha/kohadev/plack.log
5. Go to http://localhost:8080/
6. Note that the plack.log lists 192.168.100.100 as the client IP address
7. Note that the title of the OPAC webpage is
"The Best, Truly the Best, Koha Library Library catalog"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 42823da209bbef2148eb4245c1bdfe215bf899ee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b139047381b7ff61478155b301fbd69caffc1ddc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33855: Clean up forms and page sections on 'manage MARC imports' page
Owen Leonard [Tue, 30 May 2023 13:02:51 +0000 (13:02 +0000)]
Bug 33855: Clean up forms and page sections on 'manage MARC imports' page

This patch makes minor changes to the structure of the "Manage MARC
imports" page so that sections are more clearly delineated and forms
have the correct structure.

The patch also shortens the new framework field labels and adds hints
for clarification.

To test, apply the patch and go to Cataloging -> Stage MARC records for
import.

- Import a batch of MARC records.
- Go to Cataloging -> Manage staged records.
- View the batch you just imported.
- You should see three sections:
  - A list of information about the batch
  - Options for changing the matching rules
  - Options for setting frameworks during import.
- Test that the form for applying different matching rules still works
  correctly.
  - Import a batch of records which contains matches (by, for example,
    exporting MARC records from Koha and then reimporting the same
    batch)
  - On the manage page for that batch try changing the matching rule
    applied, switching between "Do not look for matching records" and a
    matching rule which will catch the duplicate records.
- Test that your records are imported correctly according to the
  framework settings you select, both for new records and for replaced
  records.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17d655249ad0106d0289680cb19fa26f196a7050)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33957: Add normalized_oclc and only fetch when needed
Nick Clemens [Thu, 8 Jun 2023 11:15:27 +0000 (11:15 +0000)]
Bug 33957: Add normalized_oclc and only fetch when needed

opac-user.tt wants to normalized_oclc number if using syndetics or B&T images

We don't need to fetch it if not, but we need to pass it if so

To test:
1 - Switch all Syndetics prefs to 'Show' or 'Use' except
    SyndeticsClientCode = just enter 'test'
2 - Checkout some items to a patron, ensure the records have:
    - ISBN
    - UPC
    - OCLC number
3 - View opac-user.pl (sign in to opac as the user)
4 - View the network console tab (may need to reload)
5 - Note requests like:
    https://secure.syndetics.com/index.aspx?isbn=1780335792/MC.GIF&client=test&type=xw10&upc=&oclc=
6 - Note that oclc parameter is not filled for record with an oclc number
7 - Apply patch
8 - Reload
9 - Confirm the link now has oclc as expected
10 - Disable syndetics, enable google books or another source
11 - Confirm images display as expected

JD amended patch: tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a59f757fd715600c21c9e7ceca87d1a24d5d694f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 67343cbd450cc3d74220a5838223d6700069fece)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33901: (bug 30718 follow-up) Predition pattern - don't set end date to today
Jonathan Druart [Wed, 7 Jun 2023 09:49:41 +0000 (11:49 +0200)]
Bug 33901: (bug 30718 follow-up) Predition pattern - don't set end date to today

If the end date is not set we should not set it to today.
On bug 30718 the following change was wrong:
-$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); };
+$enddate = dt_from_string($enddate)->ymd;

output_pref returns undef if str is empty
After the change we returned today's date.

Test plan:
1. Go to Serials > Manage numbering patterns
2. Click Edit next to one of the existing patterns (e.g. Number)
3. Enter information in the Test prediction pattern section
   -  Frequency: choose one (e.g. 1/month)
   -  First issue publication date: enter a date (e.g. 2023-06-01)
   -  Subscription length: issues + enter a number of issues (e.g. 12)
   -  Locale: leave empty
   -  Begins with: enter a number in the X column, e.g. 42
4. Click Test pattern
=> Without this patch only one issue is shown, no matter how many you enter in Subscription length
=> With this patch applied the end date is not set to today and the
prediction pattern list is correct

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c9a2cf948dc12d7f9ad6c7334232c2165857c4e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 50165d8e86294d415da053e1a7ab4c7e198a93da)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33852: Add one more test
Jonathan Druart [Thu, 8 Jun 2023 12:32:53 +0000 (14:32 +0200)]
Bug 33852: Add one more test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 144efca99d09834839f89a88a6caeb928c32e2d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a22ca6877eee158ccf65d4601229ef4c3b7e300c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33852: Make jobs.t test the only_current parameter
Tomas Cohen Arazi [Mon, 29 May 2023 13:30:06 +0000 (10:30 -0300)]
Bug 33852: Make jobs.t test the only_current parameter

This trivial patch adds a test to the only_current parameter.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/jobs.t
=> SUCCESS: New tests added, and pass
3. Sign off :-D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 76983f5275edc9df8f41c4c62f20827c822cc344)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8a5665d4b755b5a56ffb028cf3cc18832b598a37)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33937: Remove incorrect export in C4::Members
Jonathan Druart [Wed, 7 Jun 2023 10:14:53 +0000 (12:14 +0200)]
Bug 33937: Remove incorrect export in C4::Members

Bug 17600 re-add those exports, but the module does no longer have the
subroutines. We should remove these export.

Test plan:
git grep is your friend

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7116af43822477961080218b5b7990793e9c76a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4effe3b3d89597fc9498b0d157caf70866a6e686)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33880: Remove Version param from GB::Barcode->new
Jake Deery [Fri, 2 Jun 2023 13:13:47 +0000 (13:13 +0000)]
Bug 33880: Remove Version param from GB::Barcode->new

Looking at the code here
     if (Koha/Auth/TwoFactorAuth.pmoSelf->{Version}){        #--- auto version select
        for(->{Version}=1; ->{Version} <= 40; ++->{Version}) {
            last if ({->{Ecc}}->[->{Version}]
                        >=  + ->[->{Version}]);
        }
   }

in https://metacpan.org/release/KWITKNR/GD-Barcode-1.15/source/Barcode/QRcode.pm#L349

It appears the version parameter is not required, and will default to whatever version has the necessary bits for the input words given

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 20d22366813ddbd2c68fc72b609cee88e74e3872)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 82cd05381ae7a52da07d392a6a8c09b61703560f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33899: Add the 23.11 release team
Martin Renvoize [Mon, 5 Jun 2023 14:53:12 +0000 (15:53 +0100)]
Bug 33899: Add the 23.11 release team

This patch updates the teams.yaml to include the voted in 23.11 release
team and also updates the release date of 22.11 to match the actual
release.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e70ef6b16b8f4292b47ae6c17c17d224799b21f8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dea8f81e963417955a2797e59fa9222a6912cf59)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33951: (QA follow-up) Import GetNormalizedOCLCNumber
Nick Clemens [Thu, 8 Jun 2023 11:03:45 +0000 (11:03 +0000)]
Bug 33951: (QA follow-up) Import GetNormalizedOCLCNumber

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b10b8405774eea1113df2863d2d1b113b622da48)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c948b540e48cfd27c461c38cedb0a37357d615b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33951: Set normalized_oclc in opac/opac-readingrecord.pl
Jonathan Druart [Thu, 8 Jun 2023 09:51:17 +0000 (11:51 +0200)]
Bug 33951: Set normalized_oclc in opac/opac-readingrecord.pl

normalized_oclc is used in the template to build the link to syndetics,
but it's not passed from the controller. Is this patch correct? Is
syndetics broken on this page? Should we remove it or keep it?
Is oclc parameter in the URL unecessary and should be removed?

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e93668796fd579e4dcbbbdf01b316ed044bd5bc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f0a6d53df111ed746a5b558a1867f42c9f2189c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: (follow-up) Making the label not showed twice when the tables are in respo...
Hammat Wele [Thu, 27 Apr 2023 21:52:52 +0000 (21:52 +0000)]
Bug 32341: (follow-up) Making the label not showed twice when the tables are in responsive mode

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b608c05fd47e018e0c7085fe7f3d6a4b0023b755)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9cf10160ec64c6c4f514fef27f36dda1328d7642)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: (follow-up) Add responsivity to Curbside pickups table and changing button...
Hammat Wele [Thu, 16 Feb 2023 18:06:56 +0000 (18:06 +0000)]
Bug 32341: (follow-up) Add responsivity to Curbside pickups table and changing button style for finestables

To activate Curbside pickups
    1- Enable the CurbsidePickup system preference
        1.1 Go to Administration > Global system preferences
        1.2 Search for CurbsidePickup
        1.3 Change the value for 'Enable'
        1.4 Click on 'Save all circulation preferences'
    2- Configure time slots for at least one library
        2.1 Go to Administration > Curbside pickup
        2.2 Fill out the form for Centerville (or another library)
            Enable: Check
            Pickup interval: 10 (or other)
            Maximum boss per interval: 3 (or other)
            Patron-scheduled pickup: Check
            Enable for waiting holds only: DO NOT check
        2.3 Add a time slot
            In 'New slot', enter
                Monday
                From: 10:00
                To: 12:00
            Click on 'Add'
    3- Make an appointment from the OPAC
        3.1 Go to OPAC
        3.2 Open mobile mode
        3.3 Connect with a user
        3.4 Click on 'Curbside pickups'
        3.5 Choose the library in 'Pick a library'
        3.6 Choose a date in 'Pickup date'
        3.7 Choose a time range in 'Select a time'
        3.8 Click on 'Schedule pickup'
            => Notice The table is not responsive
    4- Apply the patch
    5- Execute 'yarn build --view opac'
    6- Clean your cache or open your navigator on private mode (to load updated css files)
    7- Perform step 3.1, 3.2, 3.3, 3.4,
    8- click on 'Your pickups'
     => Confirm that the CurbsidePickup table are now displayed correctly and is now responsive.
    9- Click on 'Charges'
     => Confirm that the Charges table are now displayed correctly and is now responsive.

I correct a little bug. The "suspend_hold" button did not work anymore. This change resets it to it's original state.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16008c24c5ec0838eb61b5e19603104b2071c004)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 19ebcd4eb5efa237921242ab7d613a3f325cf955)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: (follow-up) Making the remains OPAC tables responsive
Hammat Wele [Mon, 6 Feb 2023 18:06:26 +0000 (18:06 +0000)]
Bug 32341: (follow-up) Making the remains OPAC tables responsive

Apply the patch and check for the responsivity of the following tables
1- Go to the OPAC
2- Open mobile mode
3- The following tables are not responsive
- Summary - Clubs
- Summary - Recalls
- Summary - Article requests
- Charges - (relative's)
- Search history - Authority
- Checkout history - All
- Checkout history - Checkouts
- Checkout history - On-site
- Recalls history
- Messaging
- Subscription (serial)
- Course reserves - Courses
- Course reserves - Reserves
- Authority search results
4- Apply the patch
5- Execute 'yarn build --view opac'
6- Clean your cache or open your navigator on private mode (to load updated css files)
7- Perform previous step (1-3)
8- Confirm that the tables are now displayed correctly and is now responsive.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6caeb1f6274ead6509b27edcdc701d1c6d1d3c9e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d39115e5fd50b789e6bbfedfb4fce73623cb5aa2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: (follow-up) Alternate button style
Owen Leonard [Mon, 9 Jan 2023 18:53:27 +0000 (18:53 +0000)]
Bug 32341: (follow-up) Alternate button style

This patch applies a different button style and does a couple of clean
up tasks: Removing the redundant sorting-related CSS and moving the
responsive button CSS to _common.scss where other DataTable-related
styles are found.

I think this different button style is more consistent with the OPAC's
design. It also eliminates untranslatable strings from the CSS.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9f277e625ee928246531189afcc511df64a703d2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9ae29591862b1956da02d8d77ea1ba376c923e05)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: (Fix) Changing the placement of the button
Hammat Wele [Thu, 22 Dec 2022 21:54:37 +0000 (21:54 +0000)]
Bug 32341: (Fix) Changing the placement of the button

This attachment correct the placement of the responsive button. It is now in its own column at the last column and the '+' and '-' are remplaced by 'Expand' and 'Unexpand' to make it more clear.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68c3ad5fac8241956ef46475a44db2a19759f620)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 135ac49bd465b80f6daf13ea23a6b9d80bc4f89f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32341: Some OPAC tables are not displayed well in mobile mode
Hammat Wele [Mon, 12 Dec 2022 22:58:28 +0000 (22:58 +0000)]
Bug 32341: Some OPAC tables are not displayed well in mobile mode

Some OPAC tables are not displayed well in mobile mode, it is absolutely necessary to scroll to the right to read the content properly

This patch fix this problem by making the tables responsive

To test:
      1- Go to the OPAC
      2- Open mobile mode
      3- Go to a bibliographic record detail page in the OPAC (opac-detail.pl?biblionumber=X)
      4- Check the Holdings table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> we see very narrow columns
            --> unreadable text
      5- Go to to the page 'Summary' (opac-user.pl)
      6- Check the 'Checked out' table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      7- Check the 'Overdue' table
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      8- Go to the page 'Charges' (opac-account.pl)
      9- Click on 'Show all transactions'
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      10- Go to the page 'Search history' (opac-search-history.pl)
            --> the information is not presented in a table as it is when viewing on a laptop or PC browser screen.
            --> The columns are overflowing to the right
      11- Apply the patch
      12- Execute 'yarn build --view opac'
      13- Clean your cache or open your navigator on private mode (to load updated css files)
      14- Perform previous step (1-10)
      15- Confirm that the tables are now displayed correctly and is now responsive.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb2e0c2efd52f7553cd0035e79c74e6f15a7a21d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e3de75585d9f325a4a05b5ddc3dbbad8c2dfb777)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30002: Adjust perltidy
Jonathan Druart [Tue, 2 May 2023 12:37:01 +0000 (14:37 +0200)]
Bug 30002: Adjust perltidy

Remove the following 3 options that are not available in perltidy
v20190601 that is the version shipped with bullseye
--add-terminal-newline
--valign-exclusion-list
--extended-continuation-indentation

Extend max line length
--maximum-line-length=120

Prevent perltidy to format lists (see bug 30002 comment 10)
--break-at-old-comma-breakpoints

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d46a959a696eb88bc99279ee38838d4bf6291b47)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 761051893eb0f0ad6fca5822503e5ef874f15958)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30002: Remove unused xt/perltidyrc
Julian Maurice [Fri, 31 Mar 2023 10:26:20 +0000 (12:26 +0200)]
Bug 30002: Remove unused xt/perltidyrc

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aae185cf5d533761b7aa7f280dacdd186d261691)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b895e63fb3dd952b38dfb04fc5c7ae6c5c47b466)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 30002: Add .perltidyrc
Julian Maurice [Fri, 31 Mar 2023 10:25:24 +0000 (12:25 +0200)]
Bug 30002: Add .perltidyrc

The options set in this file try to match the current code style without
deviating too much from perltidy's defaults.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfe6767f60c5231fe244d66b067265631ed5a384)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 808fced6f6e802843b2c372215c5da5439d797e2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33950: Don't get marcxml if not necessary - opac-readingrecord.pl
Jonathan Druart [Thu, 8 Jun 2023 08:14:33 +0000 (10:14 +0200)]
Bug 33950: Don't get marcxml if not necessary - opac-readingrecord.pl

We are retrieving normalized_upc from the MARC XML in the controller (opac-readingrec.pl)
for all issues to display, but this is only used if BakerTaylor or Syndetics are enabled.

Test plan:
Have some checkouts and confirm that the checkout history is displayed
the same before and after this patch.
You should also test BakerTaylor or Syndetics and see if they are
working correctly, but I have no idea how to test them!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c4e016f4dfdcce272524dfff5abffe01a276d25e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0db7678c7bcc8ac5ee494f3cde939180d7215000)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33900: Fix handling of due_digest
Pedro Amorim [Mon, 5 Jun 2023 15:38:58 +0000 (15:38 +0000)]
Bug 33900: Fix handling of due_digest

Test plan, on k-t-d
1) Go to 'my account'
2) On 'Patron messaging preferences', click 'Edit'
3) On the 'Item due' row, check the 'Email' and 'Digests only' checkboxes and save
4) On the top search bar, press 'Check out' and enter '42' (koha user cardnumber)
5) On the checkout input bar, enter a barcode e.g. 39999000001372 and press checkout
6) Run the following query to force the due_date to be equal to 'todays' date:
NOTE: change the YYYY-MM-DD below to whatever day it is you're running this test plan

UPDATE issues SET date_due = '2023-06-05 23:59:00' where issue_id = 1;

7) Run the cronjob:
./koha/misc/cronjobs/advance_notices.pl -c --digest-per-branch

8) Notice it hangs, it's stuck on an infinite loop on the 2nd while cycle after if ()
9) Cancel the cronjob script, apply patch
10) Run the cronjob script again (step 7), notice it finishes
11) Access patron's notices:
/cgi-bin/koha/members/notices.pl?borrowernumber=51

Check that the 'Item due reminder' notice is there.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fac7bb247a5a8430152f97727f2cbdd8b4b54e19)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7bb9bad4ef5ed493908e0e6a9da9a9ac5f733035)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33941: Fix wrong URL name in EBSCOPackagesList
Matt Blenkinsop [Wed, 7 Jun 2023 16:07:02 +0000 (16:07 +0000)]
Bug 33941: Fix wrong URL name in EBSCOPackagesList

This patch fixes a URL pointing to the wrong route which stops filtering from working in the table.

Note: To test you will need some EBSCO credentials

Test plan:
1) In ERM, go to EBSCO > Packages and search for a package
2) It should fail with a warning in the console saying that a required param "package_id" is missing
3) Apply patch
4) Repeat step 1
5) It should now successfully fetch packages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab5dc834009b846e3850ca8eb34c3fdb43f855a1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b8f272404e0c245ce691918405b6c7bd9642f50)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: (QA follow-up) Fix tests
Nick Clemens [Tue, 9 May 2023 11:49:48 +0000 (11:49 +0000)]
Bug 32894: (QA follow-up) Fix tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4d613494abef955c41479b2e0269481e73b99176)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bf5ccb47fd54065ed5039cb4ce0c3b9877c565fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Make ->sharee looks like others
Jonathan Druart [Tue, 9 May 2023 09:02:30 +0000 (11:02 +0200)]
Bug 32894: Make ->sharee looks like others

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e84ef47018e5682764b64073c43b6f95f37c5b31)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b20f2fb4f574e9e21cc6b7bb847988d2e08687b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: (follow-up) Koha::Item->last_returned_by
Jonathan Druart [Tue, 9 May 2023 09:00:48 +0000 (11:00 +0200)]
Bug 32894: (follow-up) Koha::Item->last_returned_by

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ad94cf3e06836da81cfef272f65ae9d9fe9cf3e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0e0d1f134db7e464bff6cc109324976dab4a99f4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: (QA follow-up) Fix typo
Martin Renvoize [Fri, 21 Apr 2023 10:24:04 +0000 (11:24 +0100)]
Bug 32894: (QA follow-up) Fix typo

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 70d7bb57d88a8ed6d26d85eacdea8c0cd6550ad7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fd610892142c0ada0189a63c4442f18845ff2934)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Remove incorrect caching from bundle_items
Martin Renvoize [Fri, 21 Apr 2023 10:18:35 +0000 (11:18 +0100)]
Bug 32894: Remove incorrect caching from bundle_items

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8e2d841a2950f3cd6008f296e67c362ebfe4b954)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 946484de015c635684235746b9c71575e21cc18f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Fix test
Jonathan Druart [Tue, 28 Feb 2023 16:14:52 +0000 (17:14 +0100)]
Bug 32894: Fix test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45d882de53058ebf49f9683e53bdc3751cd22e99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 278769067c700b444711af8eb1bc11ea3fb8616d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Koha::Biblio->biblioitem
Jonathan Druart [Tue, 28 Feb 2023 15:40:00 +0000 (16:40 +0100)]
Bug 32894: Koha::Biblio->biblioitem

Can we do better here?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 994132a60a2e4a12eb88cc8b9d1a89f28450a7bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e91d18fcdde2d7c69ad9f2a8453dd5cdc736e6b4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Koha::Item->last_returned_by
Jonathan Druart [Tue, 28 Feb 2023 15:13:56 +0000 (16:13 +0100)]
Bug 32894: Koha::Item->last_returned_by

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3545292513453b2383c406e96c3d51a3a2f5e6c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 143c0e59c821bd08f1014bc5c61f320f28a520b3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Remove wrong caching from Koha:: methods - simple
Jonathan Druart [Tue, 28 Feb 2023 15:11:38 +0000 (16:11 +0100)]
Bug 32894: Remove wrong caching from Koha:: methods - simple

In some of our Koha:: objects we have methods that cache their result and return it in subsequent calls. However there is no invalidation of the cache if the object is modified.

For instance, in Koha/ArticleRequest.pm

sub biblio {
    my ($self) = @_;

    $self->{_biblio} ||= Koha::Biblios->find( $self->biblionumber() );

    return $self->{_biblio};
}

This pattern exists in several places.

It can lead to confusion and incorrect results, such as:

use Koha::ArticleRequests;
my $ar = Koha::ArticleRequest->new({
    borrowernumber => 42,
    biblionumber => 42,
})->store;
say $ar->biblio->biblionumber;               # Display 42, correct
$ar->set({ biblionumber => 24 })->store;
say $ar->biblio->biblionumber;               # Display 42, wrong
$ar->discard_changes;
say $ar->biblio->biblionumber;               # Display 42, wrong
$ar->delete;

We should remove those caching and rely on DBIC/DBMS caching mechanism instead.

This patch is adjusting the trivial occurrences

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68216c541bfd9b5baf5e3fe97c0a99d193dfccce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3347e6682477acd503c591d24670cd66cccaf38f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33904: Fix 2FA registration when library name has non-latin characters
Jonathan Druart [Tue, 6 Jun 2023 08:42:20 +0000 (10:42 +0200)]
Bug 33904: Fix 2FA registration when library name has non-latin characters

If the library name contains non-latin characters, the 2FA registration
process will fail with a JS alert coming from a 500 server-side.

The problem is that Auth::GoogleAuth is expecting an already UTF8 encoded string.
We should set the encoding correctly to make Auth::GoogleAuth deal with
the URL escaping internally correctly, then decode on our own (in the
REST API controller)

Test plan:
* Modify your logged in library name and add some non-latin characters
(eg. "my âť¤ library")
* Turn on TwoFactorAuthentication
* Go to your account > More > Manage 2FA
* Click the enable button
=> Notice that you see the QR code and that both "issuer" and "key id"
entries display the library name correctly.
* Test the whole 2FA process, confirm that the library name is correctly
displayed on the app you are using.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit deeb5ebdbd59956f5f6cf1bfa989ef41c9af9720)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6678645740787c2e57874eabe4363edd98769d6f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33904: Add tests
Jonathan Druart [Tue, 6 Jun 2023 08:40:03 +0000 (10:40 +0200)]
Bug 33904: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dfed7f235d2e079743a74bb2791db2d4ebd63b1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80dec321bdfc9be130a95e55fc58298d56b55945)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33888: (bug 22375 follow-up) Add missing USE KohaDates
Jonathan Druart [Wed, 7 Jun 2023 08:33:40 +0000 (10:33 +0200)]
Bug 33888: (bug 22375 follow-up) Add missing USE KohaDates

Bug 22375 added use of KohaDates without the USE statement.

Test plan:
Make sure you have overdues and go to circ/branchoverdues.pl
Without this patch you get a 500
  Template process failed: undef error - : filter not found at /kohadevbox/koha/C4/Templates.pm line 127
With this patch applied you can see the overdue list

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7eafb103b584dcc41b863c3920ee8ab4e94b2c06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5f24345b676c81a6e04a9d4eab818fdce7be1655)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoBug 34206: Fix display of vendor options in agreements and licenses forms
John Doe [Wed, 5 Jul 2023 15:56:46 +0000 (15:56 +0000)]
Bug 34206: Fix display of vendor options in agreements and licenses forms

Test plan:
1) Go to ERM licenses /cgi-bin/koha/erm/licenses
2) Click 'New license' and click the 'vendor' dropdown
3) Notice how it doesn't bring up any options
4) Apply patch and repeat test plan. Notice how now the vendor options show.
5) Repeat test plan for agreements

The test plan should be done using the 22.11.x branch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
16 months agoUpdate release notes for 22.11.07 release v22.11.07
Pedro Amorim [Fri, 23 Jun 2023 15:18:57 +0000 (15:18 +0000)]
Update release notes for 22.11.07 release

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoIncrement version for 22.11.07 release
Pedro Amorim [Fri, 23 Jun 2023 14:52:40 +0000 (14:52 +0000)]
Increment version for 22.11.07 release

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoFix translations for Koha 22.11.07
Pedro Amorim [Fri, 23 Jun 2023 14:46:30 +0000 (14:46 +0000)]
Fix translations for Koha 22.11.07

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoTranslation updates for Koha 22.11.07
Koha translators [Fri, 23 Jun 2023 12:48:20 +0000 (09:48 -0300)]
Translation updates for Koha 22.11.07

(cherry picked from commit 8e30f83f9e21611071cbe291a66bd316081c31d5)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoBug 34006: Fix value of "Keep current" option on receive so correct fund is saved
Katrin Fischer [Fri, 16 Jun 2023 13:36:37 +0000 (13:36 +0000)]
Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved

Under certain circumstances the "Keep current" option on receive allows
to receive order lines where the fund is otherwise not accessible to the user.
In 22.11 the wrong value is used for the option, so that instead of the fund id
the budget id is used, this can lead to an error 500 if there is no fund with
this id or to a wrong fund being saved.

To test:

1) Create budget and fund
* With the sample data
* Create a new budget "July 2023"
* Create a new fund "Books" under it
* Limit access to Owner and make yourself the owner

2) Create order
* Create a basket
* Create an order line with this access limited fund
* Close the basket

3) Create a staff user with limited permissions
* Edit or create another patron
* Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund)
* Edit username and password

4) Receive, recreating the error
* Log in as the second user in a separate browser
* Receive shipment
* Create invoice
* Receive
* You should see the fund under the "Keep current" heading selected
* Add quantity received, save
* Fund has changed to Fund_1_2 => data loss :(

5) Receive, verify fix
* Create another order line with your privileged user and the "Books" fund
* Repeat 4)
* After receiving the fund should now remain unchanged

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
16 months agoBug 33416: Fix Searchbar_spec.ts
Tomas Cohen Arazi [Wed, 19 Apr 2023 12:19:29 +0000 (09:19 -0300)]
Bug 33416: Fix Searchbar_spec.ts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a39823dbcf63101519413f3a47f4ffa39758155)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 5eec29d2dabfb7a08ed092032f8222f527cc5041)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33416: Fix Agreements.ts
Jonathan Druart [Wed, 5 Apr 2023 08:29:01 +0000 (10:29 +0200)]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 216702802567adf67b0768beb6b43ad6b2c62bd8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e1fbe67683ab873c0832f2b8fe8cc168be85e05d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33902: Move modal inside HTML body
Lucas Gass [Mon, 5 Jun 2023 23:00:43 +0000 (23:00 +0000)]
Bug 33902: Move modal inside HTML body

To test:
-Go Administration > Libraries and add a URL for a branch.
-Also add some OPAC info: ( via HTML Customizations )
-Now find a record belonging to that branch and bring up the OPAC detail page.
-In the holdings table there should be a link under the 'Current library' column.
-Clicking it should bring up a modal.
-Make sure the modal pops up correctly, can be dismissed, and the 'Visit web site' link works.

Nothing about the appearance or behavior of the page should change.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e1be2791b807948c85ae48e471594a7c68709e84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33934: Add more detail to 'No encryption_key in koha-conf.xml'
Jonathan Druart [Wed, 7 Jun 2023 07:30:15 +0000 (09:30 +0200)]
Bug 33934: Add more detail to 'No encryption_key in koha-conf.xml'

If encryption_key is not set in $KOHA_CONF we are raising an exception.

This key was only needed for a couple of feature, but now we are using Koha::Encryption from the update DB process, and so the upgrade fails with no more info than 'No encryption_key in koha-conf.xml'.

We need to provide more detail in this error.

Additionally we reject "__ENCRYPTION_KEY__", in case people will simple
copy/paste that

Test plan:
Apply the patch
Edit $KOHA_CONf, remove the encryption_key entry (or blank)
restart_all
Go to the about page and enable 2FA
=> warning on the about page, and 500 server-side are displaying more
info about how to generate the missing entry
Edit $KOHA_CONF and set the value to __ENCRYPTION_KEY__
restart_all
=> Same messages
Edit $KOHA_CONF and set a correct value
restart_all
=> No error, everything is working correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d7288411f00e3afd2a0284193ce7742545d88266)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33935: (bug 26403 follow-up) Remove occurrences to deleted files
Jonathan Druart [Wed, 7 Jun 2023 09:16:15 +0000 (11:16 +0200)]
Bug 33935: (bug 26403 follow-up) Remove occurrences to deleted files

account_credit_types.sql and account_debit_types.sql have been moved to yml files but there are still references to them in C4::Installer.

If you select the files during the installer process it will explode with

Test plan:
DROP database koha_kohadev
CREATE database koha_kohadev
restart_all
then install Koha using the UI
Select all the sample data files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 633cb15a632cded54ccbd7e385a281ceed3d68cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33524: Use template wrapper for tabs: Authority editor
Owen Leonard [Fri, 26 May 2023 13:45:56 +0000 (13:45 +0000)]
Bug 33524: Use template wrapper for tabs: Authority editor

This patch updates the authority editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.

To test, apply the patch and go to Authorities -> New authority.

- Confirm that the tabs look correct, with the same style they had
  before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
  change and the list of numbered tags in the menu just below should
  change to match the section.
  - Confirm that these tag number links still work correctly to jump you
    down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
  - You should get an error message about missing mandatory fields.
    - Clicking the "Go to field" link should take you to the correct tab
      and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
  e.g. "/cgi-bin/koha/authorities/authorities.pl?authtypecode=PERSO_NAME#tab5XX_panel"
  The correct tab should be selected upon page load.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff22a2006b0eb04950acd83439b2d7bc15890389)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32060: Use selectrow_array
Jonathan Druart [Tue, 16 May 2023 14:36:26 +0000 (16:36 +0200)]
Bug 32060: Use selectrow_array

Trivial ergonomic patch, use selectrow_array, no need to prepare the
query

+ perltidy the sub

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afe24bce2372a748c1960c8e383232f348278a0e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32060: Improve performance of columns_to_str
David Gustafsson [Tue, 1 Nov 2022 14:30:01 +0000 (15:30 +0100)]
Bug 32060: Improve performance of columns_to_str

To test:
1) Ensure the following tests pass
  t/db_dependent/Koha/Item.t
  t/db_dependent/Koha/Bibio.t
2) Go to a biblio (preferably as serial) with many items and
   click "New" -> "New item" and note down the response time.
3) Apply the patch
4) Ensure tests in 1) still pass
5) Repeat step 2), the response time should be substantially
   improved

Sponsored-by: Gothenburg University Library
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 850f6f403ba07d6c963a11f52d774b7a94df4802)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 21983: DBIC schema
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:52:52 +0000 (13:52 -0300)]
Bug 21983: DBIC schema

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6a7d96e1ef0aeb930304de07f686998d0562b6d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32932: Fix resource_id param for EHoldingsLocalResourcesShow
Jonathan Druart [Fri, 9 Jun 2023 07:37:39 +0000 (09:37 +0200)]
Bug 32932: Fix resource_id param for EHoldingsLocalResourcesShow

Caught by cypress tests  "ReferenceError: resource_id is not defined" in "Show title".

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a6d369fe687c945cc80748377b19fcdb9c22163)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32932: Update router to use object references - agreements
Matt Blenkinsop [Tue, 21 Mar 2023 19:14:45 +0000 (16:14 -0300)]
Bug 32932: Update router to use object references - agreements

This patch updates the Vue files for ERM to use router object links rather than urls - this will make it much simpler to maintain the router if urls need to be updated. This first patch only updates the files in the agreements section of ERM as a first step to introduce the topic for discussion.

Test plan:
1) Apply patch
2) Navigate to the Agreements section of ERM and click on different navigation links/buttons
3) The links/buttons should all work as normal
4) Review the code to see that the component files now refer back to the router using objects rather than url strings

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a53351b4a0e2b32d589fea3f74b350f5100a2e72)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32464: (follow-up) fix t/db_dependent/Koha/Item.t
Fridolin Somers [Thu, 15 Dec 2022 09:08:40 +0000 (23:08 -1000)]
Bug 32464: (follow-up) fix t/db_dependent/Koha/Item.t

Remove useless unit tests with mss arg

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 911702014310c704974dc38ff27a5a23e15ca5a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32464: Koha::Item->as_marc_field obsolete option mss
Fridolin Somers [Tue, 13 Dec 2022 21:24:54 +0000 (11:24 -1000)]
Bug 32464: Koha::Item->as_marc_field obsolete option mss

Since Bug 28445 the method Koha::Item->as_marc_field has the option mss not anymore.

This patch removes this in Koha::Filter::MARC::EmbedItems.

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8dfecfb17627881407e5cf9262545d2c6a77d62f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33892: Use template wrapper for tabs: OPAC authority detail
Owen Leonard [Mon, 5 Jun 2023 13:06:39 +0000 (13:06 +0000)]
Bug 33892: Use template wrapper for tabs: OPAC authority detail

This patch updates the OPAC authority detail page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and locate an authority record in the OPAC
which has notes fields.

When viewing the details for that record the notes should appear in a
single "Notes" tab.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afd30b8f4d11c36c86f26a8d5849c7990297f265)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 21983: DBRev 22.11.00.005
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:26:52 +0000 (15:26 -0300)]
Bug 21983: DBRev 22.11.00.005

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa3218855316923f10da873528dd300b58ed0e3a)

16 months agoBug 21983: (QA follow-up) Skip deleted_biblio_id from the API object
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:24:36 +0000 (15:24 -0300)]
Bug 21983: (QA follow-up) Skip deleted_biblio_id from the API object

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88249d602cdc0f0c642edb61bed848cfac471c19)

16 months agoBug 21983: Make DelBiblio update linked ILL requests
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:54:40 +0000 (13:54 -0300)]
Bug 21983: Make DelBiblio update linked ILL requests

This patch makes DelBiblio update the biblio linked ILL requests so the
value in biblio_id is moved to the deleted_biblio_id.

The change is covered by tests.

To test:
1. Apply this patchset
2. Run:
   $ ktd --shell
  k$ updatedatabase
  k$ qa --run-tests
=> SUCCESS: Tests pass! All green/good
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0cf01b8a220c5ecfd102effeec00179226df397)

16 months agoBug 21983: Add Koha::Biblio->ill_requests
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:53:18 +0000 (13:53 -0300)]
Bug 21983: Add Koha::Biblio->ill_requests

This patch adds a new method, used for retrieving the linked ill
requests for a biblio.

To test:
1. Apply this patch and run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9759b3b0e1b9f4812f994012c109d99f9a9aa89)

16 months agoBug 21983: DB update
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:50:00 +0000 (13:50 -0300)]
Bug 21983: DB update

This patch:
- Adds a illrequests.deleted_biblio_id column
- Adjusts existing db_rev so people upgrading have the biblio_id value
  moved to the also created column, before attempting to add the FK
  constraint on the biblios table.
- Adds a new db_rev for those who unfortunately already updated, it
  should be idempotent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1346c20257038e523be0405e9d84fe762d502db)

16 months agoBug 33786: ILL requests table id
Pedro Amorim [Tue, 30 May 2023 09:20:20 +0000 (09:20 +0000)]
Bug 33786: ILL requests table id

Make sure requests table is unique when visiting patron ILL
history so the table state is not shared unintentionally

Reproduce:
1) Have a borrower with >20 ILL requests in their history
2) Visit cgi-bin/koha/members/ill-requests.pl?borrowernumber=<borrowernumber>
3) On the table, click page 2
4) Visit a different borrower with <20 ILL requests
5) Verify that no requests are shown, this is because the table is using page 2 from step 3)
6) Go back to original borrower, click table page 1
7) Now go back to 2nd borrower, verify is now showing page 1 correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d2df9876d389f4ac939d5fec27b877bbe00cf45)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33813: Masthead lists button requires an aria-label
Matt Blenkinsop [Tue, 23 May 2023 16:24:30 +0000 (16:24 +0000)]
Bug 33813: Masthead lists button requires an aria-label

This patch adds an aria-label to the Lists button in the masthead. It is currently not descriptive enough and doesn't identify what is displayed when clicking the button.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7129b772b559c50311bccfa3b9f0402ec1ce1100)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33873: Improve check for inexistant biblio object
Pedro Amorim [Wed, 31 May 2023 14:10:35 +0000 (14:10 +0000)]
Bug 33873: Improve check for inexistant biblio object

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0630b79e4a740dac0992114d40442af0be5b57ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33882: Add spans in dateofbirth column on member.tt
Lucas Gass [Thu, 1 Jun 2023 20:03:53 +0000 (20:03 +0000)]
Bug 33882: Add spans in dateofbirth column on member.tt

To test:
1 Apply patch
2 Do a patron search that will return multiple patrons.
3 Look at the date of birth column and notice the text is now wrapped in a class called 'dateofbirth'
4. Notice that the age hint is wrapped in a class called 'agehint'.
5. Add '.agehint { display: none }' to intranetusercss.
6. Now notice the date of birth still displays but no age information.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5cb185b71be95cc312686701ce8bd719a4b30b13)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33883: "Make sure to copy your API secret" message overlaps text
Owen Leonard [Fri, 2 Jun 2023 14:00:34 +0000 (14:00 +0000)]
Bug 33883: "Make sure to copy your API secret" message overlaps text

This patch updates the markup on the patron API keys page so that it
uses standard classes for dialogs and page sections.

To test you must have RESTOAuth2ClientCredentials enabled.

- Apply the patch and locate a patron record.
- From their checkout or detail page, choose More -> Manage API keys
- Click "Generate a new client id/secret pair"
- Enter a description and click Save.
- You should see a message in a standard message-style dialog, "Make
  sure to copy your API secret now. You won’t be able to see it again!"
- The API key information should be displayed in a .page-section div.
- The table of existing keys should be displayed in a .page-section div.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c652ce764b8e17dde8ce2f06099560c05e88374)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33891: Use template wrapper for tabs: OPAC advanced search
Owen Leonard [Wed, 31 May 2023 17:51:46 +0000 (17:51 +0000)]
Bug 33891: Use template wrapper for tabs: OPAC advanced search

This patch adds the tab WRAPPER markup to the OPAC, adapted for the
Bootstrap version used by the OPAC (4.5.0). The advanced search page is
updated to use the wrapper construction.

Unrelated markup fix: an empty size attribute is removed from an
<input>.

To test, apply the patch and view the the advanced search page in the
OPAC. The tabs for item type, shelving location, and collection should
all look correct and work correctly.

In the staff interface, go to Administration -> System preferences ->
OpacAdvancedSearchTypes and try various configurations, confirming each
time that the OPAC page adjustes correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b754eb5b5a616fa54e721ac71c8049f0f00a52e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33803: Remove comment about tab width
Jonathan Druart [Tue, 23 May 2023 08:58:55 +0000 (10:58 +0200)]
Bug 33803: Remove comment about tab width

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37cb3391d23587bff0719e2171ac3164c2bd4bc4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33525: Use template wrapper for tabs: Basic MARC editor
Owen Leonard [Tue, 23 May 2023 16:45:10 +0000 (16:45 +0000)]
Bug 33525: Use template wrapper for tabs: Basic MARC editor

This patch updates the basic MARC editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.

To test, apply the patch and go to Cataloging -> New record.

- Confirm that the tabs look correct, with the same style they had
  before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
  change and the list of numbered tags in the menu just below should
  change to match the section.
  - Confirm that these tag number links still work correctly to jump you
    down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
  - You should get an error message about missing mandatory fields.
    - Clicking the "Go to field" link should take you to the correct tab
      and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
  e.g. "/cgi-bin/koha/cataloguing/addbiblio.pl#tab5XX_panel" The correct
  tab should be selected upon page load.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 437cadafd8a545132a1db2518623a1eb0360ad09)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33697: DBRev 22.06.00.004
Tomas Cohen Arazi [Mon, 5 Jun 2023 18:22:15 +0000 (15:22 -0300)]
Bug 33697: DBRev 22.06.00.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d196b9b6199d43b05393802dc5aa8cc1e34453e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33697: Remove RecordedBooks (rbdigital) integration
Jonathan Druart [Tue, 16 May 2023 08:18:13 +0000 (10:18 +0200)]
Bug 33697: Remove RecordedBooks (rbdigital) integration

RecordedBooks search API integration is now obsolete following
rbdigital's incorporation into OverDrive. Associated code should be
removed.

https://company.overdrive.com/2020/06/23/overdrive-to-acquire-rbdigital-from-rbmedia/

Test plan:
use git grep extensively and confirm that this patch removes all
occurrences of this feature.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8b9355088ad6e5238921ef554af44ffeb7677364)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33fdf290bbf58ce26756b2218bfccce10049870c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33779: Terminology: biblio record
Owen Leonard [Thu, 25 May 2023 13:48:34 +0000 (13:48 +0000)]
Bug 33779: Terminology: biblio record

This patch corrects a string in the staff interface's ILL requests
template. "This item cannot be issued as it has no biblio record
associated with it" is updated to read "This item cannot be checked out
as it has no bibliographic record associated with it."

I don't know how to trigger the error message in the interface, but the
change is simple enough that it could be verified by examining the
patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 05af370ec1ad367e30bd5b9c879d7b16e6a26846)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: (follow-up) Set debit type for mocked fines
Nick Clemens [Thu, 1 Jun 2023 18:20:14 +0000 (18:20 +0000)]
Bug 33411: (follow-up) Set debit type for mocked fines

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 56715cbb28b5412c83fe3bed993be4ab0451750a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
Nick Clemens [Fri, 7 Apr 2023 18:50:25 +0000 (18:50 +0000)]
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees

To test:
 1 - Find an adult patron in Koha
 2 - Add two guarantees
 3 - Add $1 fine to parent, $5 fine to each guarantee
 4 - Set no issues charge guarantees to 9
 5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
 6 - Note the 64 message starts with Y's that mean patron is blocked
 7 - Repeat with each child barcode
 8 - They are blocked?
 9 - Apply patch, restart all (restart_all will restart SIP)
10 - Try again
11 - Parent blocked, children should not be

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afec5139ff095a92c6ffb626e1a1a773328ac398)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: Unit test update
Nick Clemens [Fri, 7 Apr 2023 18:49:41 +0000 (18:49 +0000)]
Bug 33411: Unit test update

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 638d79036c642eb349711764fb2486021606fee4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33247: (QA follow-up) Remove pending deletion from results array
Marcel de Rooy [Fri, 2 Jun 2023 08:17:45 +0000 (08:17 +0000)]
Bug 33247: (QA follow-up) Remove pending deletion from results array

Both Elastic and Zebra search_auth_compat return a hash key
authid for a result.

Test plan:
Remove an authority that should be in your results list.
Note that it is no longer marked as pending, but just not displayed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f0574dd912a97f588d4e8523319f721093bdb42)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33247: Flag the authority pending deletion in the result list
Jonathan Druart [Thu, 11 May 2023 11:48:50 +0000 (13:48 +0200)]
Bug 33247: Flag the authority pending deletion in the result list

When an authority is removed from the result list it is not removed from
the search engine yet.
This patch suggests to add a note in the summary column to tell the user
that the deletion is pending.

Test plan:
1 - Go to authorities home and perform a search;
2 - Delete any authority;
3 - After the confirmation, the page is refreshed but still contains the
deleted authority, with a red note explaining that the deletion is
pending.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 61de402012ff05ee0eadfe571c6354afc858669f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33748: Fix UI issue when importing records from a staged MARC file
Lucas Gass [Thu, 25 May 2023 22:04:08 +0000 (22:04 +0000)]
Bug 33748: Fix UI issue when importing records from a staged MARC file

This patch attempts to fix a UI issue on addorderiso2709.tt. It removes the <td> which contains the actoin buttons MARC, Card, and Add Order and adds them to the title line. This is so there is more space for the fieldsets.

1. Apply patch
2. Set  MarcItemFieldsToOrder like this:

    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 975$8
    notforloan: 975$7
    quantity: 975$q
    price: 975$g
    replacementprice: 975$v
    uri: 975$u

3. Stage a MARC file where the bibs have items attached
4. From acquisitions create a new basket and add 'From a staged file'.
5. Add the staged files to a basket.
6. Make sure the display looks correct.
7. Expand the data by clicking on the checkbox on the left hand side, or by clicking 'Select all'.
8. Make sure the display looks correct.
9. Tab over to 'Item informtion' and make sure that display looks correct.
10. Shrink the screen size down to less that 992px, ensuring the display remains correct.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 06ba1ce7bfffd2f18da0d8a03edf0afb103220ae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>