Commit Graph

5927 Commits

Author SHA1 Message Date
Jonathan Druart d6bc8fe713
Bug 38663: DBIC schema changes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2025-05-05 14:03:08 +02:00
Jonathan Druart a387c0c381
Bug 39075: DBIC schema changes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2025-05-05 14:03:07 +02:00
Jonathan Druart 25a805e8e4
Bug 39826: UTF8-decode vendor interface's password on display
We store an encrypted version of the passwords for vendor's interfaces, but we don't utf8 decode it after it is decrypted

Test plan:
0. Do not apply this patch
1. Create or edit a vendor and add at least one interface with non ascii
   characters, eg. émyPassword❤
2. Go to the detail view of the vendor and click the "Show password"
   link
=> The password is not correctly utf8-decoded
3. Apply this patch, repeat 2
=> The password is correctly displayed
4. Repeat 1 and 2
=> The password is correctly displayed

Note that maybe we should make sure the encrypt_hex is getting a valid
utf8-encoded variable.
2025-05-05 10:17:22 +02:00
Jonathan Druart 9d72067523
Bug 38010: Fix vendor deletion tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:31 +02:00
Matt Blenkinsop 48592d9d3d
Bug 38010: Add protection logic to the DELETE endpoint
Amended-by: Jonathan Druart
typo: subsicriptions => subscriptions

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:30 +02:00
Matt Blenkinsop fb4f2e42b1
Bug 38010: Migrate to_api logic to GET endpoint
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:28 +02:00
Matt Blenkinsop 9105ba1e63
Bug 38010: (QA follow-up) Move syspref values to config endpoint
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:26 +02:00
Jonathan Druart 1e780ea61d
Bug 38010: Add tests for embed contacts,interfaces,aliases
(cherry picked from commit cae75569e6e8f2bfe5a2e6d3acc111485f81cc1e)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:25 +02:00
Jonathan Druart 9c1f586b3d
Bug 38010: Fix wrong use of scalar in the REST API controller
It was wrong, we need to use scalar on the array, not the arrayref
(otherwise it will always be true)
No change in behaviour expected here, just some code cleaning

(cherry picked from commit 7abbcb7ba73da13d988202aaf06ba239e21692da)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:25 +02:00
Jonathan Druart 859d4d6847
Bug 38010: Fix links to the manual
The way we deal with routes for VueJS is messy and will need to be
reconsidered, but it's not within the scope of this patch.

(cherry picked from commit 2558583ef0fbf149664a3d9a2e3cec081ac505ff)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:24 +02:00
Matt Blenkinsop 7d0b44d9dc
Bug 38010: (QA follow-up) Add a config endpoint for permissions
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:16 +02:00
Matt Blenkinsop 64a43ee022
Bug 38010: (QA follow-up) Handle form parameters in the browser
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:14 +02:00
Matt Blenkinsop 6fa18591cb
Bug 38010: (QA follow-up) UI fixes
This patch addresses
- Translation issues in VendorList
- Removing the pagers from the contracts table
- Removing redundant code from the vendors template file

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:13 +02:00
Matt Blenkinsop a327810e9f
Bug 38010: (QA follow-up) Adjust mapping for the manual
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:13 +02:00
Matt Blenkinsop f1b9e5c527
Bug 38010: Change how interface details are displayed
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:59 +02:00
Matt Blenkinsop 0b032c2585
Bug 38010: Check for invoices before allowing vendor deletion
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:56 +02:00
Matt Blenkinsop 29ca78bb48
Bug 38010: Prevent vendor contacts from duplicating
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:55 +02:00
Matt Blenkinsop d4c3342262
Bug 38010: Reset basket view
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:49 +02:00
Matt Blenkinsop 80bac7e221
Bug 38010: Allow searching by alias in the vendors table
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:44 +02:00
Matt Blenkinsop 86bb920254
Bug 38010: Respect AcqViewBaskets syspref
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:42 +02:00
Matt Blenkinsop 8e99ee7dd6
Bug 38010: Adjust vendor update logic
This patch handles the embedded data that might also need updating when editing a vendor

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:36 +02:00
Matt Blenkinsop 1018810681
Bug 38010: Add the form to add a new vendor
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:30 +02:00
Matt Blenkinsop 0cc42d91d6
Bug 38010: Add the component to display a vendor
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:28 +02:00
Nick Clemens 8a628fd131
Bug 38395: Display bibliographic data for deleted biblios in holds history
This patch adds deleted_biblio to the patron holds api and adjsuts the display to
shwo the data for deleted items

To test:
 - place a hold
 - cancel the hold
 - look in patron hold history, see the title
 - delete the biblio
 - reload patron hold history
 - you see a line with no title or author
 - apply patch, yarn build, restart_all
 - reload patron hold history
 - success, you see deleted title info
 - enable OPACHoldsHistory preference
 - sign in to OPAC as patron
 - confirm holds history shows deleted title info

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 08:49:22 +02:00
Matt Blenkinsop 37538b22a0
Bug 39752: Check for biblio existence when matches are found
Currently when adding to a basket from a new/staged file, we don't check whether a matched record still exists when importing. This patch changes the conditional check to be based on the existence of the biblio record rather than just on the biblionumber from the match

Test plan:
1) Stage and import a record into Koha
2) Stage the same record again, this time matching on ISBN
3) Check that the match has been found in the batch details
4) Delete the original record that you imported in step 1
5) Find a basket, and add to it from a staged file
6) Choose the file/record you imported in stage 2
7) Select the record and save to add the orders
8) You will get a 500 error
9) Apply patch and restart_all
10) Refresh the page to re-submit the form
11) The form should submit correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-29 17:19:31 +02:00
Tomas Cohen Arazi d7fb4a93fc
Bug 39765: Centralize loaded plugin caching
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-29 17:19:29 +02:00
Pedro Amorim d9c6a1de11
Bug 38441: (QA follow-up): Only look for matchin requests if patron
Previous commit 'HistoryCheck now only considers same patron' added the following regression:
HistoryCheck is performed and shown in the OPAC even if no user is authenticated (using ILLOpacUnauthenticatedRequest).
This fixes that. History check is skipped unless a user exists.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:43 +02:00
Pedro Amorim 4da60d1669
Bug 38441: (QA follow-up): Hackfest feedback
This commit addresses all Hackfest QA related feedback:
1) Update of all strings that required update, including UI messages and
   sys pref description
2) Moved the history check information from staffnotes to its own
   pipe-separated illrequestattribute 'historycheck_requests'
3) Fix display of ILL request information on the history check screen
   (Staff), including proper label naming (e.g. branchcode -> library),
show status description instead of code, uppercase labels.
4) Updated OPAC display to match Staff UI's display of matching history
   requests
5) Removed ISSN criteria for matching requests check
6) Update tests accordingly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:42 +02:00
Pedro Amorim 9a90757e25
Bug 38441: (QA follow-up): HistoryCheck now only considers same patron
Initial implementation checked existing ILLs for same patron and other patrons.
User testing reported ILLs for other patrons are not helpful, and makes this stage
screen show up much more frequently than it should.

This patch simplifies the original implementation to only consider the
patron of the request being placed for an ILL history check.

It also changes the ID matching to only 'DOI' or only 'Pubmed ID' if any of
those is set. This is to minimize scenarios where different articles from
the same journal come up as matching results e.g. same ISSN but different DOI.

It is also updating tests accordingly.

Other QA improvements

Improve HistoryCheck request list:
- Make link external and show icon (to prevent staff member from clicking away from the historyCheck screen unintentionally)
- Show requests' status
- Show requests' placed date
- Add id_prefix to request ID if possible

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:41 +02:00
Pedro Amorim 8a51e15616
Bug 38441: (QA follow-up): Handle undef userenv
C4::Context->userenv may be undef (after a reset_all, trying to place an unauthenticated request without being logged).
This change prevents a nasty 500 error trying use undefined as hash

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:39 +02:00
Pedro Amorim e9ca220884
Bug 38441: HistoryCheck Koha class
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:34 +02:00
Katrin Fischer 6811106bda
Bug 39325: DBIC schema update
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:32 +02:00
Nick Clemens b805f5ff99
Bug 39325: (QA follow-up) Adjust some issues
connexion is a product, added to ignore file

tablee -> tables

a few other small corrections

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:30 +02:00
Owen Leonard 5fd9743c8a
Bug 39325: (follow-up) A few minor corrections
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:29 +02:00
Jonathan Druart 72a876a39e
Bug 39325: Revert dbic schema files
We need the md5sum to be adjusted. This should be done by the RM.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:27 +02:00
Jonathan Druart 69b8341a8c
Bug 39325: Manual fixes
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:23 +02:00
Jonathan Druart 1d844a7d2f
Bug 39325: Automatic fix
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:22 +02:00
Pedro Amorim 3b72b9b3ec
Bug 39446: Show both status and status_alias
If a request has a status_alias and that status_alias does not have a lib_opac defined, it'll show as an empty status on the OPAC.
Staff UI always shows the request's status and adds the status_alias only if that is defined. The same should happen on the OPAC.

To test:
1) Enabled ILLModule
2) Create a new ILL request, visit:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Add '42' on the cardnumber. Pick any library. Click 'Create'.
4) Add a new 'status_alias' entry, visit the authorized values page:
http://localhost:8081/cgi-bin/koha/admin/authorised_values.pl
5) Search for 'ill_'. Pick 'ILL_STATUS_ALIAS'. Click 'Add a new authorized value'.
6) Enter the 'Authorized value' of 'test', and 'Description' of 'test'. Click 'Save'.
7) Visit the previously created ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1
8) Click 'Edit request' from the top toolbar.
9) On the 'Status' dropdown, pick 'test'. Click 'Submit'.
10) Visit the ILL on the OPAC:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
11) Notice the 'status' column does not display the status_alias. Click the 'View', notice the 'status' entry does not display the status_alias.
12) Apply patch. Repeat. Notice it defaults to displaying the authorised value code if lib_opac is empty.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:46 +02:00
Tomas Cohen Arazi 1eb55e9c47
Bug 38340: Make Standard ILL backend templates translatable
This patchset moves the `Standard` backend templates into the right
places so they are picked up for translation.

To test:
1. Apply this patches
2. Notice the `Standard` ILL backend works as expected
3. Run:
   $ ktd --shell
  k$ cd misc/translator/po
  k$ git fetch ; git reset --hard origin/main
  k$ cd ..
  k$ perl translate update es-ES
  k$ cd po
  k$ git diff
4. Inside the diff pager, make a search for 'backends/Standard'
=> SUCCESS: There are strings that come from the Standard backend!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:43 +02:00
Tomas Cohen Arazi a294d72233
Bug 38340: Move templates
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:42 +02:00
Tomas Cohen Arazi 814af57e83
Bug 39600: Rewrite API controllers
This patch splits the controller in two:

* A controller for staff users use
* An unprivileged access controller

A new endpoint is added for publi access:

* `/public/patrons/:patron_id/ill/requests`

The public one makes use of the state-of-the-art in Koha for public
endpoints, using the `$c->auth->public` validation helper and leaving
the (newly added) public path spec with no special permissions
requirements.

The staff-oriented endpoint gets the right permissions added (at least
those used in the main `/ill/requests` endpoint.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ prove t/db_dependent/api/v1/ill_requests.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:41 +02:00
Tomas Cohen Arazi 87b0773d5f
Bug 39600: Add Koha::Patron->ill_requests() accessor
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:40 +02:00
Tadeusz „tadzik” Sośnierz a715c695f7
Bug 39600: Cleanup the changes -- tidy, document, add a missing TT filter
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:40 +02:00
Tadeusz „tadzik” Sośnierz 4929170536
Bug 39600: Implement public_read_lists for ILL::Request and ::Attribute
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:38 +02:00
Tadeusz „tadzik” Sośnierz 44743bc3c7
Bug 39600: Switch OPAC ILL request listing to server-side rendering
This brings it technologically closer to intranet's ILL table and also enables pagination.

Test plan:

1. In KTD, go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=master+switch and enable the ILL module
2. Run the following in koha-shell to populate the request list for user `koha`:

    perl -Mt::lib::TestBuilder -e '
      my $builder = t::lib::TestBuilder->new;

      do {
        $builder->build_sample_ill_request({borrowernumber => 51});
      } for (1..50);
    '
3. Navigate to http://localhost:8080/cgi-bin/koha/opac-illrequests.pl, log in as `koha` as needed
4. Observe the new request list being paginated and server-side-sortable

Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 19:23:38 +02:00
Kyle Hall 9806508b24
Bug 32034: Add item transfers to action logs
Having branch transfers in the action logs would help to more fully show the cycle of holds that require transfers.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new syspref LogTransfers
5) Create and finish some transfers, note the new logs in the log
   viewer!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 18:35:02 +02:00
Tomas Cohen Arazi 5ca5977da1
Bug 39092: Use pre-loaded plugin
This patch removes plugin loading from the method, and makes it leverage
on the plugin instance already loaded by `load_backend` (if any).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 18:34:51 +02:00
Tomas Cohen Arazi 459e5ea387
Bug 39092: (follow-up) Do not look for plugins if Standard backend used
If we've been asked the `Standard` backend we shouldn't be trying to
load plugins.

Trivial refactoring of the order things are done.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 18:34:51 +02:00
Tomas Cohen Arazi a3c8e710aa
Bug 39092: Cache the plugin object when loading plugin backend
This patch makes the `load_backend()` method cache the plugin instance
object when calculated. This will reduce the calls in other places where
we query for the plugin.

It is also the excuse to add some tests for this methods which were
lacking.

To test:
1. Apply the unit tests
2. Run:
   $ ktd --shell
 k$ prove t/db_dependent/Koha/Plugins/ILL/Backends.t
=> FAIL: Tests fail, plugin instance caching is not happening
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 18:34:50 +02:00
Pedro Amorim f329de03a7
Bug 38339: Make core field descriptions translatable
Test plan, before applying patches:
1) Enable ILLModule and create an ILL request (make sure it has an author and a title)
2) Install es-ES, on ktd run:
   koha-translate -i es-ES --dev kohadev
3) Access the ILL request on the OPAC:
   http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=view&illrequest_id=1
4) Activate es-ES language from the footer. Notice 'Title' and 'Author' still show as english
5) Apply patches. restart plack and update translation
   koha-plack --restart kohadev
   koha-translate --update es-ES --dev kohadev
6) Repeat 3). Notice those labels are now translated.
7) Ensure the table renders correctly and displays the data author and title data:
   http://localhost:8080/cgi-bin/koha/opac-illrequests.pl

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 18:34:49 +02:00