koha.git
13 months agoBug 33262: Store the biblionumber of a deleted record in the order line
Katrin Fischer [Thu, 4 May 2023 12:15:36 +0000 (12:15 +0000)]
Bug 33262: Store the biblionumber of a deleted record in the order line

When a bibliographic record is deleted and linked to an order
in the acquisition module, the biblionumber in the order line is
currently deleted as well. This makes it impossible to tell what
was ordered in the first place. This is a big issue for libraries
that need to be able to track how money was spent over long periods
of time.

With this patch the biblionumber of the deleted record will be moved
to a new column deleted_biblionumber in the order line, keeping the FK
on biblionumber.

To test:
* Apply patch, run dataase update
* Create a order/basket in the acquisitions module
* Order several things, you can use existing records from the sample data
* Make sure you order one of the records at least twice
* Take a look at the aqorders table in your database, using a report:

  SELECT biblionumber, deleted_biblionumber, ordernumber from aqorders;

* From the catalog, delete the items on the records and then the records

  Note: There is a warning about attached orders warning about consequences
  for acquisitions. I have chosen to keep it at this point in time, as
  there are still visible side effects of deleting the record, like bug 10758.

* Re-run the report and compare results to the first run. deleted_biblionumber
  should now be filled with the biblionumber of the deleted record.
  biblionumber should be NULL/empty.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c8faeac4cd4cfdeab04c25bedb534d3823bbe83c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33262: Add deleted_biblionumber column to aqorders table
Katrin Fischer [Thu, 4 May 2023 13:23:31 +0000 (13:23 +0000)]
Bug 33262: Add deleted_biblionumber column to aqorders table

This adds a new column deleted_biblionumber to the aqorders table.
This will allow us to store the biblionumber of a deleted record,
so we will still be able to tell what has been ordered once the
record is deleted.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0cf7687e833986d95ce9fa49bdb33252944fbbea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: (follow-up) Nothing is forever
Tomas Cohen Arazi [Fri, 5 May 2023 18:53:31 +0000 (15:53 -0300)]
Bug 22440: (follow-up) Nothing is forever

This patch picks (yet) another class for testing purposes. The class
needs to not implement to_api() and to_api_mapping().

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b22f017a1684948e89b033966585468a16ad8341)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: (follow-up) Fix existing tests
Tomas Cohen Arazi [Fri, 5 May 2023 19:22:20 +0000 (16:22 -0300)]
Bug 22440: (follow-up) Fix existing tests

As we are introducing a FK for illrequests.biblio_id, TestBuilder is
generating a linked biblio, and so tests expecting undef are failing.

This fixes it by explicitly setting biblio_id => undef on creating the
request.

The patch also cleans the area a bit, removing a redundant and fragile
test as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e0c6b397d169e6470f85619844f8682c62e5b07)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: DBRev 22.11.05.004
Tomas Cohen Arazi [Fri, 5 May 2023 12:12:47 +0000 (09:12 -0300)]
Bug 22440: DBRev 22.11.05.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95520f0fb5459244ca10462e2c4c4215311cfea2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: DBIC schema
Tomas Cohen Arazi [Fri, 5 May 2023 12:10:31 +0000 (09:10 -0300)]
Bug 22440: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a35d9fbedfcc144ec12ac458577e984c8db933c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: Move backend statuses api endpoint
Pedro Amorim [Thu, 27 Apr 2023 16:08:56 +0000 (16:08 +0000)]
Bug 22440: Move backend statuses api endpoint

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50909d22668486685343df6b3e7b17f68cf7f243)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: Tests
Pedro Amorim [Thu, 30 Mar 2023 10:07:05 +0000 (12:07 +0200)]
Bug 22440: Tests

Updated API tests

Co-authored-by: Tomás Cohen Arazi <tomascohen@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 3cfce3b79646657a22a6b5accc87f8e961a8c1f0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: ILL API changes
Pedro Amorim [Mon, 24 Apr 2023 15:28:28 +0000 (15:28 +0000)]
Bug 22440: ILL API changes

* Add GET /illbackends/{id}/statuses
* Change API route to ill/requests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 313ce33b22509b2cdb349f1e4bc2793d8d972050)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: New ILL requests table
Pedro Amorim [Thu, 30 Mar 2023 10:07:17 +0000 (12:07 +0200)]
Bug 22440: New ILL requests table

Use kohaTable requesting the REST api instead of the old KohaTable

Co-authored-by: Tomás Cohen Arazi <tomascohen@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 33084fb40c772ec1f76cbbcb06bcbfc5b87a3042)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: Add GET /ill_requests
Tomas Cohen Arazi [Thu, 30 Mar 2023 09:01:08 +0000 (11:01 +0200)]
Bug 22440: Add GET /ill_requests

Co-authored-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e64fd9aafc2b4b554429dcbbffda929c97e46cf8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: Add standard accessors for later usage
Tomas Cohen Arazi [Thu, 30 Mar 2023 08:54:51 +0000 (10:54 +0200)]
Bug 22440: Add standard accessors for later usage

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4b470e43a2a6d3e7608903f3693e1e7c37853a27)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: Add missing foreign key
Tomas Cohen Arazi [Thu, 30 Mar 2023 08:49:51 +0000 (10:49 +0200)]
Bug 22440: Add missing foreign key

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f663221946a9d9ab5bdba586c2696f3302ebd30)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 22440: Add Koha::Illrequests->filter_by_visible
Tomas Cohen Arazi [Fri, 6 Jan 2023 15:48:39 +0000 (12:48 -0300)]
Bug 22440: Add Koha::Illrequests->filter_by_visible

This patch introduces a method for filtering out requests that match the
statuses specified on the *ILLHiddenRequestStatuses* system preference.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Illrequests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a186826e46212ed7a2acbf9e63e0b6eb8e6cc79)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements
Jonathan Druart [Tue, 11 Apr 2023 19:39:02 +0000 (21:39 +0200)]
Bug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a0ec93d84f8b00e7b8b583d9fcbe7a564cba2a42)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33483: Prevent 400 when more than 1 agreement is linked
Jonathan Druart [Wed, 12 Apr 2023 14:59:29 +0000 (16:59 +0200)]
Bug 33483: Prevent 400 when more than 1 agreement is linked

We were passing package_agreements.agreement and the server returned
Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" }

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb30aab206e218946fa3fe5104850a1d79553ac6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33483: (follow-up) Update the way we distinguish if AgreementsList is called...
Jonathan Druart [Tue, 11 Apr 2023 19:19:46 +0000 (21:19 +0200)]
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e7ac09fe26a0fba6fa26ba7d0a4646a627594a7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33483: Restore 'select'
Jonathan Druart [Tue, 11 Apr 2023 19:14:25 +0000 (21:14 +0200)]
Bug 33483: Restore 'select'

We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d4204cb9c685f59e213986914594b3dbd4792159)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33483: Make KohaTable accept customizable actions button
Jonathan Druart [Tue, 11 Apr 2023 19:11:48 +0000 (21:11 +0200)]
Bug 33483: Make KohaTable accept customizable actions button

We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d1fe4591c5271bbce6d72169cb47ef17f332e10)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEB...
Pedro Amorim [Tue, 11 Apr 2023 16:33:39 +0000 (16:33 +0000)]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4d9246a6c358b82a5be2f9a029b238d4d309787)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33483: Fix link EBSCO package with local agreements
Jonathan Druart [Tue, 11 Apr 2023 12:13:35 +0000 (14:13 +0200)]
Bug 33483: Fix link EBSCO package with local agreements

Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0b189ff0a0f3493c5767122746b619b80d07620)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33466: Link to the vendor from the ERM module
Jonathan Druart [Tue, 11 Apr 2023 09:27:08 +0000 (11:27 +0200)]
Bug 33466: Link to the vendor from the ERM module

There are 3 tables in the ERM module where we display the vendor name
but without a link to the acquisition module.

This patch adds the links.

Test plan:
Create an agreement, a license and a local package.
Pick a vendor and notice that now there is a link on the list view.

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 f92f967626d3f3d8e1a873a5378f3fdaa0724fac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix table style
Pedro Amorim [Sun, 26 Mar 2023 10:53:25 +0000 (10:53 +0000)]
Bug 33066: Fix table style

Move table rendering outside <ol> to prevent unintended style in _forms.scss from being applied and causing table to not be full width
Remove unecessary table styling

JD: following commit has been squashed. Patch from Pedro is fixing the
FIXME
"""
Bug 33066: Fix style - FIXME

This is not working, see /cgi-bin/koha/erm/eholdings/local/packages/1
The table is not taking width: 100%
I fixed it previously with the display: table in the style block, but
here it's not applied.

There is also the "green tick" (fa-check-square-o) that is not on the
same line https://snipboard.io/jma923.jpg
"""

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8a63e6eeccac73c22223ede70039251ae705bedc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix cypress tests
Jonathan Druart [Fri, 17 Mar 2023 15:20:27 +0000 (16:20 +0100)]
Bug 33066: Fix cypress tests

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0a89bf85e0e961819d724171a6a9f201a089da68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Remove useless use of useDataTable
Jonathan Druart [Fri, 17 Mar 2023 14:38:06 +0000 (15:38 +0100)]
Bug 33066: Remove useless use of useDataTable

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 674585850e2796792a3530cf3519416e5bc41480)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for EHoldingsEBSCOTitlesList
Jonathan Druart [Fri, 17 Mar 2023 14:01:44 +0000 (15:01 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f2b9a44b711760e9bd17c0c62e1f8ebefa97dee2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for EHoldingsEBSCOPackageTitlesList
Jonathan Druart [Fri, 17 Mar 2023 13:39:51 +0000 (14:39 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOPackageTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e03cee38ca24265a5befcd7e194af3199093c0f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Restore '(#id)' to lists
Pedro Amorim [Wed, 8 Mar 2023 18:36:24 +0000 (18:36 +0000)]
Bug 33066: Restore '(#id)' to lists

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8bee4a203a293bc17f840e4cab637eb0d1d35fdb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for EHoldingsEBSCOPackagesList
Jonathan Druart [Wed, 8 Mar 2023 14:57:09 +0000 (15:57 +0100)]
Bug 33066: Use KohaTable for EHoldingsEBSCOPackagesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50b29f6e87638829aab28a1641a5b8ab58d4e73e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for EHoldingsLocalTitlesList
Jonathan Druart [Wed, 8 Mar 2023 14:02:13 +0000 (15:02 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d62764612273f3dac7907e3ff8e515cd052a7993)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for EHoldingsLocalPackageTitlesList
Jonathan Druart [Wed, 8 Mar 2023 13:20:50 +0000 (14:20 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalPackageTitlesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 116bc6d38630c6fb37d9b9fb9cc8a2206cb16fed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for EHoldingsLocalPackagesList
Jonathan Druart [Tue, 7 Mar 2023 20:03:39 +0000 (21:03 +0100)]
Bug 33066: Use KohaTable for EHoldingsLocalPackagesList

Bug 33066: (follow-up) Use KohaTable for EHoldingsLocalTitlePackagesList

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2fb59d88fa85e5d23966c2d3e3762c6025cdc93)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Restore filter by mine
Jonathan Druart [Wed, 8 Mar 2023 12:24:23 +0000 (13:24 +0100)]
Bug 33066: Restore filter by mine

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 83a6aa77e69fdaa209e83d956488109fd5cb0912)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Restore HTML escaping
Jonathan Druart [Tue, 7 Mar 2023 16:40:20 +0000 (17:40 +0100)]
Bug 33066: Restore HTML escaping

And we add a render function that will escape by default

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e129cd5fee9927a148cd525b429e84e86b94d61)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Use KohaTable for LicensesList
Jonathan Druart [Tue, 7 Mar 2023 16:04:01 +0000 (17:04 +0100)]
Bug 33066: Use KohaTable for LicensesList

Bug 33066: (follow-up) Use KohaTable for LicensesList

There was a mismatch, we can embed the whole vendor object info.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c03ff77b272eada4859569389cc37c7e0a0c583)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix width after ColVis change
Jonathan Druart [Tue, 7 Mar 2023 15:46:48 +0000 (16:46 +0100)]
Bug 33066: Fix width after ColVis change

This fixes the width to 100%, otherwise it is not recalculated correctly

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5df53ba5a5aaa1dabd1a279e575f3218e95b5981)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix ColVis
Jonathan Druart [Tue, 7 Mar 2023 15:42:38 +0000 (16:42 +0100)]
Bug 33066: Fix ColVis

The filter (header) was not removed alongwith the column

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b7e6e19aec1245f08ca1c38d6bf272d8e4fc967)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix default_filters
Jonathan Druart [Tue, 7 Mar 2023 15:32:20 +0000 (16:32 +0100)]
Bug 33066: Fix default_filters

Will need to be tested when EHoldingsEBSCOTitlesList.vue will be
adjusted

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6638fdfc31ecd67b4956062e953860d42466a5ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix default_search
Jonathan Druart [Tue, 7 Mar 2023 15:26:43 +0000 (16:26 +0100)]
Bug 33066: Fix default_search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9725551aca34a66ed689659aee2eee7925e01d7e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Remove duplicate 'Actions' column
Jonathan Druart [Tue, 7 Mar 2023 15:13:03 +0000 (16:13 +0100)]
Bug 33066: Remove duplicate 'Actions' column

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit de3f1d1f889a6b6e93c2db849731ee5fd9a03d81)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Embed vendor and retrieve vendor name from the request
Jonathan Druart [Tue, 7 Mar 2023 14:42:48 +0000 (15:42 +0100)]
Bug 33066: Embed vendor and retrieve vendor name from the request

Bug 33066: (follow-up) Embed vendor and retrieve vendor name from the request

It needs "Bug 32923: Allow to embed user_roles for agreements"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 922ed2d2830dbfe3f8f2b069eb03b314c5d16a5e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Remove build_datatable
Jonathan Druart [Tue, 7 Mar 2023 14:37:10 +0000 (15:37 +0100)]
Bug 33066: Remove build_datatable

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix name display
Jonathan Druart [Tue, 7 Mar 2023 14:36:46 +0000 (15:36 +0100)]
Bug 33066: Fix name display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ea7e7aee26b9b89fd4fba5d3b3a5df5589794d92)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Reintroduce column filters
Jonathan Druart [Tue, 7 Mar 2023 14:02:25 +0000 (15:02 +0100)]
Bug 33066: Reintroduce column filters

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fe3da95290698a57425c8d54ff05ed91c29b3683)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix "Loading..."
Jonathan Druart [Tue, 7 Mar 2023 14:06:50 +0000 (15:06 +0100)]
Bug 33066: Fix "Loading..."

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 730aec445e650f9b8b5406617170f0fde74aee78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Add colvis
Jonathan Druart [Fri, 24 Feb 2023 16:08:58 +0000 (17:08 +0100)]
Bug 33066: Add colvis

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c28ee17c00ba0347d34ff5da2fee15b4759baa2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Fix dt - no need to reselect
Jonathan Druart [Fri, 24 Feb 2023 14:47:41 +0000 (15:47 +0100)]
Bug 33066: Fix dt - no need to reselect

Bug 33066: (follow-up) Fix dt - no need to reselect

Patron search result table was not displayed correctly
Uncaught TypeError: this.on is not a function

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75eaa1f5c58d224b48c332fd8eac31108eb9f375)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33066: Introduce a KohaTable Vue component
Jonathan Druart [Fri, 24 Feb 2023 12:14:19 +0000 (13:14 +0100)]
Bug 33066: Introduce a KohaTable Vue component

The way we deal with DataTables in Vue component is not nice, especially when we
need to add buttons/link in the cell and interact with the rest of the Vue app from
there.

When I started to work on Vue last year there was no good solution from DataTables,
now there is a Vue component. It is not perfect, you still cannot add Vue component
in the DT component, but it brings something to follow. Agustin implemented something
on theke/import_source_vue, but he went too far, and it will need to rewrite the
whole ERM module. Additionally he didn't provide a solution that has the same features
as what we have now.

The goal of this patch is to not duplicate the code in datatables.js, we
don't want to maintain two version of this code (one is enough already!)
We split the huge function in datatables.js in small ones to make them
reusable from the Vue component.

This is quite ugly, and it needs to lot more addition, but it's a first
start!

Help, ideas, and feedback welcome (and needed!)

Bug 33066: Fix agreement name in delete confirmation dialog

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Agustín Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32924: (follow-up) Add left margin to 'Show mine only' label
Pedro Amorim [Thu, 9 Feb 2023 15:14:52 +0000 (15:14 +0000)]
Bug 32924: (follow-up) Add left margin to 'Show mine only' label

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fafccfd76f263445205febab0cfa5a1c8bffb934)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32924: Add the ability to filter agreement by logged in user
Jonathan Druart [Thu, 9 Feb 2023 13:00:56 +0000 (14:00 +0100)]
Bug 32924: Add the ability to filter agreement by logged in user

This patch adds a new filter checkbox at the top of the agreement list
"Show only mine" that will display agreements linked with the logged in
user.

Test plan:
Create several agreements, add your current logged in user to some of
them
On the agreement list view us the new checkbox to filter the agreements
and see those where you are involved in.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2adcd3b828c3bb6518933290efe0c0de1d8f61f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32253: Load all CodeMirror lines initially when using advanced editor
Lucas Gass [Mon, 1 May 2023 22:13:02 +0000 (22:13 +0000)]
Bug 32253: Load all CodeMirror lines initially when using advanced editor

To test:
1. Have advanced editor turned on.
2. Load a record with many lines and see that not all the lines appear until you click on the visible ones.
3. Apply patch and try again
4. All lines should load.

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 827df32798cd8046d62cb6630fd33395d78fb3ef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33588: Add page-section to inventory tool items list
Katrin Fischer [Fri, 21 Apr 2023 20:13:04 +0000 (20:13 +0000)]
Bug 33588: Add page-section to inventory tool items list

The table with items created by the inventory tool was
missing the page-section class and therefore had no
white background.

To test:
* Go to cataloguing > inventory
* When you don't have a lot of data: just submit the form
* Look at the result list, confirm missing white background
* Apply patch
* Confirm the background is now correct

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 3259fb122c9a035bfdf3613df5317c024a9b0375)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32874: Fix cataloguing/value_builder/unimarc_field_700-4.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:55 +0000 (11:58 +0100)]
Bug 32874: Fix cataloguing/value_builder/unimarc_field_700-4.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

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 8f84bc082b6d71cc14554153bb4c062ae918186c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33505: Improve styling of scan index page
Katrin Fischer [Wed, 12 Apr 2023 20:59:34 +0000 (20:59 +0000)]
Bug 33505: Improve styling of scan index page

This patch makes some changes to the 'scan index' page.

* Updates second h1 heading "Scan index:" to h2 level heading "Scan index"
* Removes table from the search form
* Moves search index pull down and search term into one line
* Reorders options with search index first and search term after, matching
  the advanced search form
* Removes the catalog results toolbar from the top, card hold etc. are not needed
  here.
* Fixes doubled up id attribute: scan-index by turning one into scan-index-term.

To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* Check display, especially search options, options at the top of the page etc.
* Apply patch
* Verify changes listed above
* Regression test the normal search results, all should look the same with and without patch.
* If you think the scan index page is nicer now - sign off.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 358cb91a72e85d6ec0e85b8d88b1793062113bd3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33506: Fix false index for series and keep selected index on scan index page
Katrin Fischer [Wed, 12 Apr 2023 20:19:38 +0000 (20:19 +0000)]
Bug 33506: Fix false index for series and keep selected index on scan index page

The pull down with search options had the wrong index
linked to the Series entry: su instead of se

To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* Verify search results link to authors using c
* Switch to series
* Verify search results use 'su' for subject
* Verify that search option pull down always jumps back to first
  entry: Any word
* Apply patch
* Verify the search results for series now use correct index se
* Verify that coming from advanced search, the correct search option is selected
* Verify that changing the search option also keeps the selection after searching

Note: with Elasticsearch and default configuration author, title and series will
give you results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 970fe62f785ce06ca57a8bae8936158c632069ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32745: DBRev 22.11.05.003
Tomas Cohen Arazi [Fri, 5 May 2023 12:12:01 +0000 (09:12 -0300)]
Bug 32745: DBRev 22.11.05.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 601c597726e4812c2edf15f39a9d9d3f76b3b543)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32745: Adjust context for invalid background jobs
Jonathan Druart [Fri, 24 Mar 2023 10:17:58 +0000 (11:17 +0100)]
Bug 32745: Adjust context for invalid background jobs

We had some problems recently and it's possible to have
background_jobs.context=NULL
But the REST API specs is expecting an object.
We could either modify the specs, or adjust the incorrect entries in DB,
which is IMO better.

Test plan:
0. Don't apply the patch
1. Create some background jobs
2. Set context to NULL
UPDATE background_jobs SET context=NULL;
3. List the jobs and note the datatable error, and the error in Koha log
  OpenAPI >>> GET api/v1/jobs [{"message":"Expected object - got null.","path":"\/body\/0\/context"},{"message":"Expected object - got null.","path":"\/body\/1\/context"}]

4. Apply the patch
5. Run `updatedatabase`
6. Confirm that the list and detail view are not working correctly

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 15e234e5963c9c426541c76d599e5b561fd542ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33597: (follow-up) Two other occurrences for holdfor
Marcel de Rooy [Mon, 24 Apr 2023 10:51:15 +0000 (10:51 +0000)]
Bug 33597: (follow-up) Two other occurrences for holdfor

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f99bcfb6521835e6d21cad3c83973aefb0f16cf4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33597: Fix deleting cookie for holdfor(club)
Marcel de Rooy [Mon, 24 Apr 2023 10:35:26 +0000 (10:35 +0000)]
Bug 33597: Fix deleting cookie for holdfor(club)

Resolve:
Cookie “holdfor” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it.

Did not see warning for holdforclub. But since it is created with Lax, we should remove it with Lax.

Test plan:
Similar to previous patch. Check console on logout page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e5e311cb0c88b9223ce98d685668962edc7baee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33597: Get rid of warning about intranet_bib_list
Marcel de Rooy [Mon, 24 Apr 2023 10:23:19 +0000 (10:23 +0000)]
Bug 33597: Get rid of warning about intranet_bib_list

Resolve:
Cookie “intranet_bib_list” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it.
basket_22.1200022.js:67:65

Test plan:
Do not apply this patch.
Logout from staff.
Check browser console warnings.
Apply this patch.
Login and logout again.
Check warnings again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95de1f3e92947f157dbbbf789d88beb48645648b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33598: Use template wrapper for breadcrumbs: Tools, part 5
Owen Leonard [Mon, 24 Apr 2023 11:21:42 +0000 (11:21 +0000)]
Bug 33598: Use template wrapper for breadcrumbs: Tools, part 5

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Pages ->
    - View a page in the staff interface
  - Upload patron images
    - Upload results
  - Quote editor
    - Quotes upload
  - OPAC problem reports (must have OPACReportProblem enabled)

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 18137030ffe5d2187121e311a4394ff2f1a6e94e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33566: Use template wrapper for breadcrumbs: Tools, part 1
Owen Leonard [Wed, 19 Apr 2023 19:10:18 +0000 (19:10 +0000)]
Bug 33566: Use template wrapper for breadcrumbs: Tools, part 1

This patch updates several templates in the tools directory so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Batch extend due dates
  - Access files (it is not necessary to have file access configured to
    test, there are no variations to the breadcrumbs)
  - News, HTML customizations, and Pages: For each category check each
    variation:
    - List of entries
    - New entry
    - Edit entry
- Cataloging ->
  - Batch record deletion
  - Item modifications by age
    - Edit rules

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 266a3ea00ea21efe74992ae021ea883d2d3eb3b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33564: Use template wrapper for breadcrumbs: Serials part 3
Owen Leonard [Wed, 19 Apr 2023 18:17:46 +0000 (18:17 +0000)]
Bug 33564: Use template wrapper for breadcrumbs: Serials part 3

This patch updates several serials templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Serials ->
 - Manage frequencies
   - New frequency
   - Edit frequency
 - Manage numbering patterns
   - New numbering pattern
   - Edit numbering pattern
 - Search subscriptions -> View subscription details
   - If necessary, edit the subscription to enable "Manual
     history"
     - Under the "Planning" tab of the detail page, click
       "Edit history"
   - If necessary, edit the subscription and select a notice under
     "Patron notification."
     - Under the "Information" tab of the subscription detail page,
       click "subscribers"

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d683d4e32f9c490868fa83a03ce308209e75059)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33559: Use template wrapper for breadcrumbs: Serials part 2
Owen Leonard [Tue, 18 Apr 2023 16:18:24 +0000 (16:18 +0000)]
Bug 33559: Use template wrapper for breadcrumbs: Serials part 2

This patch updates several serials templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Serials ->
  - Serials home page
    - New subscription
    - Serials search results
      - Subscription details -> Edit subscription
      - Subscription details -> Serial collection -> Edit serials
      - Select one or more seach results and click the "Edit selected
        serials" to test the batch edit page

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e742755ab1f7b59aea7d8e257c1590fc487ca75)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33437: Use template wrapper for breadcrumbs: Reports part 2
Owen Leonard [Mon, 17 Apr 2023 17:14:05 +0000 (17:14 +0000)]
Bug 33437: Use template wrapper for breadcrumbs: Reports part 2

This patch updates several reports templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Reports ->
  - Most circulated items
    - Report results
  - Items with no checkouts
    - Report results
  - Catalog statistics wizard
    - Report results
  - View dictionary
    - New definition (steps 1-5)
  - Saved reports
    - View report
    - New report
    - Edit report
  - Guided reports
    - Build a report
      - Steps 1 through 6

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb940cf8c4ad9537e7c7c5ca47124b852ab3703d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33634: Correct anchors in system preference submenu
Lucas Gass [Fri, 28 Apr 2023 15:53:19 +0000 (15:53 +0000)]
Bug 33634: Correct anchors in system preference submenu

To test:
1. Go to Koha Administration -> Global system preferences
2. Go to a tab with a few headings like Circulation
3. Click on a heading in the sidebar navigation under Circulation that takes you a bit down the page, like Recalls
4. Notice this anchor link does not work, you are not taken to the recalls preferences
5. Apply patch
6. Try again, the links should take you to the proper place.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d1278aa14bf2a161df87c9d73f105b2c96c5022)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 19249: Fix date inputs on patron quick add form
Jonathan Druart [Wed, 3 May 2023 14:15:28 +0000 (16:15 +0200)]
Bug 19249: Fix date inputs on patron quick add form

This patch create a "apply_flatpickr" JS function to make the code
reusable from the template, where we loop over the date inputs to
reinstantiate flatpickr.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 28dc7f1f02b0515648b76abd71eaa142f5f52396)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33621: (QA follow-up) Typo formated_date
Marcel de Rooy [Fri, 28 Apr 2023 09:58:19 +0000 (09:58 +0000)]
Bug 33621: (QA follow-up) Typo formated_date

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e40135a219e85f91f134bb8c3edc3593d060e8a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33621: Fix claim return
Jonathan Druart [Thu, 27 Apr 2023 04:49:03 +0000 (06:49 +0200)]
Bug 33621: Fix claim return

To test:

1. Set the CaimReturnedLostValue system preference to one of your LOST authorised values
2. Check out an item
3. In the checkouts table, claim return
4. Notice the processing icon keeps spinning
5. Apply the patch
6. Check in the item and resolve the return claim to clear it
7. Check out an item
8. In the checkouts table, claim return
9. Confirm the checkouts table reloads and the return is claimed as expected

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.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 9060282c3b47db28c2c5202c27ba7d277fdfc6c7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33328: Rename x-marc-schema => x-record-schema
Tomas Cohen Arazi [Thu, 23 Mar 2023 22:46:48 +0000 (19:46 -0300)]
Bug 33328: Rename x-marc-schema => x-record-schema

This patch renames the header on the biblio API so it is not entirely
tied to MARC, trying to follow the biblio_metadata table generic
approach.

To test:
1. Apply this patch
2. Run:
   $ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass
3. You agree with the change?
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Change sounds reasonable. Tests pass before and after patch.
"grep -r "x-marc-schema" *" confirms no occurrences after patch.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 00629fe94f728fda4d24a64855ed2768a88e0357)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32250: (follow-up) Remove use of AutoCommit=0
Nick Clemens [Wed, 26 Apr 2023 12:50:03 +0000 (12:50 +0000)]
Bug 32250: (follow-up) Remove use of AutoCommit=0

This patch moves to using txn_begin and txn_commit

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 32250: (follow-up) Remove one more dbh commit and don't start a new transaction when done

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3a58b93c3d1c78153dec8a3e5849561f7cf6607)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32250: (follow-up) Commit background job to the DB
Nick Clemens [Thu, 20 Apr 2023 15:53:10 +0000 (15:53 +0000)]
Bug 32250: (follow-up) Commit background job to the DB

We can't run a background job if it isn't in the database, however,
this script runs with AutoCommit disabled. We need to enable it while
generating the background job, then disable for the updates.

I don't nkow if using a transaction would be preferable.

I tried to solve this independently, but it requires consolidating the
index requests to make this work easily

Signed-off-by: David Nind <david@davidnind.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 bfc1e3c226932df939b616603076120498cf74a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32250: Only reindex records when commiting
Nick Clemens [Fri, 13 Jan 2023 20:07:01 +0000 (20:07 +0000)]
Bug 32250: Only reindex records when commiting

This patch adds an array to catch updated bibs, and defers indexing until a
batch of changes is committed

To test:
1 - Set LinkerModule system preference to either first or last match
    Alternate this between runs of the linker to ensure changes are made
2 - Set SearchEngine to Elasticsearch and reindex (to ensure index is built)
3 - perl  misc/link_bibs_to_authorities.pl -v
4 - Check Admin->Jobs and see that many ES index jobs are queued
5 - Apply patch
6 - perl  misc/link_bibs_to_authorities.pl -v
7 - Check Admin->Jobs and see that 1 index per commit from is enqueued

Signed-off-by: David Nind <david@davidnind.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 cacc16c659ba64ea75602c5122e87c8337a11bbe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32250: Linking authorities does not change holdability
Nick Clemens [Fri, 13 Jan 2023 19:42:53 +0000 (19:42 +0000)]
Bug 32250: Linking authorities does not change holdability

If the only change is a linked heading, we don't need to rebuild
the holds queue

To test:
1 - Set preference RealTimeHoldsQueue to enable
2 - Run link_bibs_to_authorities
3 - Note holds queue jobs generated
4 - Apply patch
5 - repeat
6 - No holds queue updates

Signed-off-by: David Nind <david@davidnind.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 d29e5c6e0f3e43b8598cfce6b06f45605fc7a84e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33482: Propagate errors from EBSCO's ws to the UI
Jonathan Druart [Tue, 11 Apr 2023 11:46:51 +0000 (13:46 +0200)]
Bug 33482: Propagate errors from EBSCO's ws to the UI

When adding or removing eholdings from EBSCO, if an error happens it is
lost and not propagated to the UI.

We were missing a return in the logic, and always returning 200

Test plan:
Do not apply (or revert) bug 33481
Configure EBSCO for ERM and add a package to your holdings
With this patch applied you will get a 500 that is propagated to the UI
Without this patch nothing happens and the user is not aware that
something bad happened

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit af34d97928215c10b97c7c86d72da2b9ebde085f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32782: Koha to KBart mapping for UNIMARC
Jonathan Druart [Wed, 22 Mar 2023 11:39:59 +0000 (12:39 +0100)]
Bug 32782: Koha to KBart mapping for UNIMARC

Used when creating eholdings from Koha items.

Test plan:
Add some items to a list, then use this list to create eholdings
/cgi-bin/koha/erm/eholdings/local/titles/import

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17be09b903e64a0894abbb6584f4917842d846c6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32782: ERM UNIMARC support
Jonathan Druart [Wed, 1 Feb 2023 13:06:30 +0000 (14:06 +0100)]
Bug 32782: ERM UNIMARC support

Create the biblio record when a resource is created

Test plan:
Create a new local title and confirm that the Koha bibliographic record
is created correctly.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 07e37c541404b102dce4242db6b09b4a93d6931f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33504: Update patron_to_html to deal with null
Martin Renvoize [Wed, 12 Apr 2023 10:49:51 +0000 (11:49 +0100)]
Bug 33504: Update patron_to_html to deal with null

In the patron_to_html function we were dealing explicitly with the case
where patron may be passed undefined, but forgetting that it may be
returned as 'null' from the api too.  Changing from `( patron ===
undefined )` to `( patron == null )` is the recommended approach for
detecting 'undefined or null' in javascript.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Martin's test plan from Bugzilla:

To test.
1) Use ILS-DI to renew an checkout
2) View the circulation history for the item
3) Click the 'View' button next to the count of renewals
4) Note that the modal just stalls at 'Retrieving renewals'
5) Apply the patch
6) Now the 'retrieving renewals' message should list the renewals instead.

Note that step 2 should be something like "Go to the "Circulation
history" of the patron.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 744ac4825ba9a346e2ad1c8e413d3d9423658512)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33156: Fix JS error on batch patron modification
Katrin Fischer [Sun, 19 Mar 2023 22:06:12 +0000 (22:06 +0000)]
Bug 33156: Fix JS error on batch patron modification

The error currently breaks some of the functionality for
updating patron attributes linked to AV values. With the
bug, the input field will not change to the AV list when selected
from the pull down of patron attributes.

It was probably bug 29648 that changed the data structure
without adapting for the additional data that is pushed
to the object for the patron attribute columns.

To test:
* Create several extended patron attributes
  * Make sure at least one is linked to an AV
  * Repeatable and unique patron attributes can't be
  updated in batch patron modification, so you need some
  that can be modified.
* Go to tools > batch patron modification
* Enter one or more cardnumbers to update
* Verify the table is missing columns, export and configure
* Verify when selecting the AV tied patron attribute, the input
  remains a text one
* Apply patch
* Both should work now as expected

Note: I believe there are some more errors on this page,
but they should better be handled separately. So with this
patch we push configuration again for each column to table
columns, but the very last column keeps missing from the
columns settings.

Signed-off-by: David Nind <david@davidnind.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 7ca83d4b8c5581646af50d8378003b4233ad5fa2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33590: Fix DOM id name for tabs after WRAPPER code added to export.tt
Slava Shishkin [Fri, 28 Apr 2023 13:36:23 +0000 (16:36 +0300)]
Bug 33590: Fix DOM id name for tabs after WRAPPER code added to export.tt

The list of CSV profiles was not displayed if the CSV format was selected in the output format settings.

To test:
1. Go to /cgi-bin/koha/tools/export.pl
2. At the bottom of the page in the Output format, select CSV format.
  *If CSV format is not active in the drop-down File format menu, create
   any profile to Usage export records on the link /cgi-bin/koha/tools/csv-profiles.pl
3. Note that the list of CSV profiles is not displayed.
4. Apply the patch.
5. Restart the page and repeat steps 2.
6. Verify that when you select the CSV format, the list of CSV profiles appears.

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 a104722b9d4150c48eb4793c123d10e66144a7c7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33590: Fix DOM id name for tabs after WRAPPER code added to modborrowers.tt
Slava Shishkin [Thu, 27 Apr 2023 13:23:42 +0000 (16:23 +0300)]
Bug 33590: Fix DOM id name for tabs after WRAPPER code added to modborrowers.tt

The submitted numbers were not processed by the search query.

To test:
1. Go to /cgi-bin/koha/circ/modborrowers.pl
2. On the relevant tab, enter the card number or the borrower number in the text area, or upload a text file with a relevant list of numbers.
3. Click "Continue" and verify that a message appears stating "No patron card numbers or borrowernumbers given".
4. Apply the patch.
5. Restart the page and repeat steps 2 and 3. Make sure you receive the correct response -- a list of borrowers or a message indicating that the specified numbers were not found.

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 3915c1c331d0b9a5f254967be7787918e6663022)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33590: Fix DOM id name for tabs after WRAPPER code added to serials-collection.tt
Slava Shishkin [Wed, 26 Apr 2023 17:35:00 +0000 (20:35 +0300)]
Bug 33590: Fix DOM id name for tabs after WRAPPER code added to serials-collection.tt

To test:
* Add a subscription
* From the subscription detail page, click on serial collection link in left hand navigation
* Create some additional issues
* "Clear all" link for selecting issues to edit won't work, "Select all" link neither
* Apply the patch *
* "Clear all" link for selecting issues to edit works now, "Select all" link works too.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3794a869674062ea6e37fd8777ac62607dbd9ec)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33590: Fix DOM id name for tabs after WRAPPER code added to article-requests.tt
Slava Shishkin [Wed, 26 Apr 2023 16:59:14 +0000 (19:59 +0300)]
Bug 33590: Fix DOM id name for tabs after WRAPPER code added to article-requests.tt

This commit fixed two cases:
1. Fixing "Select all" and "Clear all" links on the page.
2. Fixing the interaction with selected entries when switching between the "New" and "Pending" tabs.

To test:
(Create article requests if they don't exist)

Case 1:
1. Go to /cgi-bin/koha/circ/article-requests.pl and don't switch between tabs.
2. Click on "Select all" and verify that it's not working -- the checkboxes are not selected.
3. Activate any checkbox and click "Clear all" -- the checkbox is not cleared.
4. Apply the patch.
5. Restart the page and, without switching between tabs, repeat steps 2 and 3. Verify that it works now.

Case 2:
1. Go to /cgi-bin/koha/circ/article-requests.pl.
2. Switch between tabs and leave "New" active.
3. Select any entry and delete or move it to another tab.
4. Verify that the entry remains in the table until the page reloads.
5. Apply the patch.
6. Restart the page and repeat steps 2 and 3. Make sure that everything works now.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ebe303e14e0c5ca542c6d3da5df1369ab3b6c18)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33629: allow pbuilder to use network via build-git-snapshot
Mason James [Thu, 27 Apr 2023 14:15:05 +0000 (02:15 +1200)]
Bug 33629: allow pbuilder to use network via build-git-snapshot

to test...

- build master packages, observe failure :(

   debian/build-git-snapshot -d -v 22.12.00-24~git1 -D dev -b base_22.12.00+deb10 --noautoversion
     "/usr/bin/perl" build-resources.PL
    yarn install v1.22.19
    warning You don't appear to have an internet connection. Try the --offline flag to use the  cache for registry queries.

- apply patch

- build master packages, observe success :)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0a0c6554d72ea5acec1a6c4fe63b77e9383e2e56)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblio...
Fridolin Somers [Tue, 25 Apr 2023 06:05:50 +0000 (20:05 -1000)]
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field

Since bug 29486, misc/maintenance/search_for_data_inconsistencies.pl search for biblio.biblionumber in MARC record with $record->subfield().
This fails when field is a control field (< 10).
Idem for biblioitems.biblioitemnumber

Test plan :
1.0) On a UNIMARC database (biblio.biblionumber is on 001)
1.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Without patch you get error : Control fields (generally, just tags below 010) do not have subfields, use data()
=> With patch no error
2.0) On a MARC21 database (biblio.biblionumber is on 999c)
2.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see no error

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc1695ba96b79d85fe778af1c60b092b149dd449)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33128: DBRev 22.12.00.024
Tomas Cohen Arazi [Mon, 24 Apr 2023 13:43:00 +0000 (10:43 -0300)]
Bug 33128: DBRev 22.12.00.024

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33128: Add Polish translations for language descriptions
Janusz Kaczmarek [Fri, 3 Mar 2023 15:26:52 +0000 (16:26 +0100)]
Bug 33128: Add Polish translations for language descriptions

This adds the Polish translations for the different languages to
subtag_registry.sql that is used by all languages during installation.

* Apply patch
* Run database update
* Install pl-PL and activate it for the OPAC
* Go to advanced search
* Look at the language pull down - it shows the languages in their
  language and then translated to English
* Switch to Polish - verify the Polish translations are used now
  There are 2-3 cases where the translation = name, so only name is shown.
* Drop your database, create your database
* Run the web installer
* Everything should complete without error and the language pull down
  should look exactly the same and be translated

Signed-off-by: Nick <nick@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 0b4e73cd7b5a456f2e994937f96244fc0b19be0c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33560: Batch edit link broken if subscriptions are selected using "select all...
Owen Leonard [Tue, 18 Apr 2023 16:51:04 +0000 (16:51 +0000)]
Bug 33560: Batch edit link broken if subscriptions are selected using "select all" link

This patch revises the process by which the serials search results page
redirects to the batch edit page based on which checkboxes are checked.

To test, apply the patch and go to serials. You should have some
subscriptions which are open and some which are closed.

- Perform a search which will return at least one result under each tab
  (Open and Closed).
  - Checking one or more checkboxes should activate the "Edit selected
    serials" link, which should work correctly to redirect you to the
    batch edit page.
  - Unchecking all the checkboxes should make the edit link disappear.
  - Check that the "Select all" and "Clear all" links work the same way
    manually checking checkboxes does.
  - Confirm that controls under each tab work correctly just for the
    results under that tab.

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 9e26828a62ffcdbbdda5a62cfa4a61e2ce503485)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33021: (QA follow-up) Fix QA errors
Martin Renvoize [Thu, 11 May 2023 10:46:01 +0000 (11:46 +0100)]
Bug 33021: (QA follow-up) Fix QA errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 30352: Add a comment to the substatus translation
Marcel de Rooy [Wed, 19 Apr 2023 14:59:15 +0000 (14:59 +0000)]
Bug 30352: Add a comment to the substatus translation

The tric of combining the XPath union operator (|) with the
value-of instruction works as a sort of ternary operation.
The value-of only picks the string value of the first node
from the union in document order.

So, if there is a translation, it will be the first node. If there
is no translation, the original substatus will be used. Note that
there will be no translation for authorised values like Staff
collection, etc.

Test plan:
None. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 c652ed4b1dcc204d36921d55120d91c758803632)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 30352: Allow translation of Not for loan in OPAC XSLT results
Marcel de Rooy [Wed, 19 Apr 2023 13:52:16 +0000 (13:52 +0000)]
Bug 30352: Allow translation of Not for loan in OPAC XSLT results

Note: Test plan below can be followed in English. If you would like
to see the vernacular results, you need to update PO files and
translate 'Not for loan', and update templates (xslt files) accordingly.
The bootstrap PO does not yet include that string without %s suffix
in the current codebase.

Test plan:
[1] Apply this patch and make the following change in
MARC21slim2OPACResults.xsl, line 1207.
Change:
  <status english="Not for loan">Not for loan</status>
to:
  <status english="Not for loan">NOT for loan</status>
Important: Change text inside, not the attribute!
Restart all.

[2] Pick a biblio, add some items with different statuses: Checked out,
Damaged, Not for loan, Staff collection.
[3] Make it appear in a OPAC results display (not detail).
[4] You should see the different statuses, including NOT for loan. The
uppercase NOT serves to prove that the string has been translated. Also
verify that you see Staff collection as-is.
[5] Bonus: Toggle with values in Reference_NFL_Statuses to move results
from Reference section to Not available section v.v.
[6] Revert the change from step 1. Sign off :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 8d7e3cec32dffa5f96de696f8707bf8e015c49d2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32484: (QA follow-up) Few typos
Marcel de Rooy [Tue, 18 Apr 2023 12:36:17 +0000 (12:36 +0000)]
Bug 32484: (QA follow-up) Few typos

Test plan:
Run git grep "specifique key"
Run git grep "the fonction"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 201d7f9ac6519fc5003beaf0b756a9ec5e2884cd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32484: (QA follow-up) Polishing unit test
Marcel de Rooy [Tue, 18 Apr 2023 12:33:47 +0000 (12:33 +0000)]
Bug 32484: (QA follow-up) Polishing unit test

Test plan, removed done_testing.
License.
Since we are in t/db, good to add transaction, although we currently
do not change anything here. But who knows?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc5a6e8d55780f909ef455b55e549077c9cf9688)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32484: (QA follow-up) Fixes to POD
Marcel de Rooy [Tue, 18 Apr 2023 12:32:46 +0000 (12:32 +0000)]
Bug 32484: (QA follow-up) Fixes to POD

Resolve:
 FAIL   Koha/UI/Form/Builder/Biblio.pm
   FAIL   pod coverage
                POD is missing for build_authorized_values_list
                POD is missing for create_key

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f5af35a0851d5cba817ceb9adf4795412f3bf915)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32484: Replace DateTime->now by Koha::DateUtils::dt_from_string
Julian Maurice [Fri, 24 Feb 2023 12:00:47 +0000 (13:00 +0100)]
Bug 32484: Replace DateTime->now by Koha::DateUtils::dt_from_string

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 689632256f411a9fd965edbb09e0320628bbb4fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 32484: Enable plugins when UseACQFrameworkForBiblioRecords is set
Julian Maurice [Thu, 22 Sep 2022 07:53:46 +0000 (09:53 +0200)]
Bug 32484: Enable plugins when UseACQFrameworkForBiblioRecords is set

Test plan:
1. Do not apply the patch yet
2. Make sure you have an ACQ biblio framework with some framework
   plugins enabled. Create it if you don't.
3. Enable UseACQFrameworkForBiblioRecords system preference
4. Create a new acquisition basket.
5. On this new basket, click on "+ Add to basket", then "From a new
   (empty) record"
6. You should see a simplified MARC editor based on ACQ framework.
   Confirm that the plugins are not enabled (no visible buttons, nothing
   happening on focus/blur)
7. Apply patch
8. Repeat step 5
9. You should now see the plugins' buttons (only if you enabled plugins
   that use the 'click' event)
10. Confirm that the enabled plugins work correctly

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 edcabe372878316a21046e001e4b274a206f771e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33447: (RMaint follow-up) Fix test plan
Martin Renvoize [Thu, 11 May 2023 10:36:41 +0000 (11:36 +0100)]
Bug 33447: (RMaint follow-up) Fix test plan

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33210: (Bug 31963 follow-up) No hold fee message on OPAC should be displayed...
Janusz Kaczmarek [Mon, 13 Mar 2023 14:06:52 +0000 (15:06 +0100)]
Bug 33210: (Bug 31963 follow-up) No hold fee message on OPAC should be displayed when there is no fee

After resolving Bug 31963 everything works as expected when there is
hold fee defined (!= 0).  But in case when the fee for given patron
category is set to 0.00, the user will always see the message "You will
be charged a hold fee of 0,00 ...", which is obviously not intended.

This is because categories.reservefee is returned from database as
'0.000000' and as such, without type casting, is interpreted as string
in Perl. Prior to Bug 31963 the result was compared to 0 before sending
anything to the template, so the casting was done, now it is not.

To test:
========
1. Go to Administration -> Patron categories
2. Edit your patron category and give a hold fee of 0.
3. HoldFeeMode does not matter - you can set it to any value.
4. In another tab, open the OPAC.
5. Search the OPAC for any record with an item.
6. Go to place a hold on this record.  You will see "You will be
   charged a hold fee of 0,00" --> This is a bug.
7. Apply patch and restart services.
6. Repeat step 6.
8. You should NOT see the hold fee message.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4b94e4d82d5f96a0b1125f41fc8e41a47826627)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33210: Add unit test
Janusz Kaczmarek [Fri, 24 Mar 2023 16:17:20 +0000 (17:17 +0100)]
Bug 33210: Add unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 203646418a75efb86f513e33a0f3d4e13675c50d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
13 months agoBug 33336: Use a dedicated column for plugin status in plugins table
Fridolin Somers [Sat, 25 Mar 2023 01:19:06 +0000 (15:19 -1000)]
Bug 33336: Use a dedicated column for plugin status in plugins table

In plugins table plugins/plugins-home.pl the status enable/disable is with the name, styled as a label.
With new interface ENABLED is yellow, this looks weird.
Also I bet this is bad for accessibility.

I propose to move this info to a dedicated column.
I use bootstrap classes bg-success and bg-warning like in about.pl

Test plan:
1) Install some plugins
2) Go to Administration > Manage plugins
3) Check you see table with column status
4) Disable a plugin
5) Check you see 'Disabled' in status

Signed-off-by: Laura Escamilla <laura.escamilla@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 e102daaf310de6a64389e33f7c7fd473752c5e33)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>