Commit Graph

53081 Commits

Author SHA1 Message Date
Marcel de Rooy 78c719ea95 Bug 37365: (QA follow-up) Add error checking around AddFile call
Test plan:
Add a return; in AddFile to simulate a failing db insert.
Verify that an alert pops up.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35d90969f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c8cab29919)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:22:36 +01:00
Marcel de Rooy 8768a3f701 Bug 37365: (QA follow-up) Add borrowernumber to referrer url
Since we post to add_message, we need to ensure that the
borrowernumber is added to the referrer url. This 'tric' is
already done there for another form.

Test plan:
See original plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fbc2e2e933)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd45949443)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:22:36 +01:00
Jonathan Druart 710ddbd960 Bug 30397: Remove duplicate entry from length menu of patrons search
If you have 20 in PatronsPerPage, there will be two 20 entries in the
length menu of the patrons search.
jQuery.unique is stupid it seems, it requires the array to be sorted (?)

let x = [1, 2, 1, 2]
jQuery.unique(x);
Array(4) [ 1, 2, 1, 2 ]

x = [1, 1, 2, 2]
jQuery.unique(x);
Array [ 1, 2 ]

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 60249a979c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c45839b5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:19:01 +01:00
David Cook 31a0a7aec3 Bug 22223: t::lib::QA::TemplateFilters missing built-in TT filter "safe_url" causes false warnings
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fe495d19df)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4023df1789)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:54:10 +01:00
David Cook 0048be7498 Bug 22223: Add filter to make item URLs safe in template output
This change adds a "safe_url" filter which takes a text input and
returns a Perl URL object which stringifies to a safe URL.

This change is only needed in the OPAC as the staff interface
handles the item URL display using Javascript not Template Toolkit.

0. Apply patch and koha-plack --restart kohadev
1. Create an item for a record using the following URL
https://koha-community.org?url=https%3A%2F%2Fkoha-community.org
2. Go to the OPAC for that record and verify that the URL is
not double-escaped
3. Create a malicious payload (talk to QA/security team for this if necessary)
4. Note that the malicious payload is escaped
5. prove t/Koha/Plugins/SafeURL.t
6. Celebrate!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e8e00cfeb3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 629d2a6f6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:54:10 +01:00
Jonathan Druart 4eb0a4baba Bug 38303: Set item's replacement price to defaultreplacecost if 0.00
No idea if this is a real bug. This code is fixing the following test
failure:
t/db_dependent/Circulation/CalcFine.t .. 1/7
    #   Failed test 'Amount is calculated correctly'
    #   at t/db_dependent/Circulation/CalcFine.t line 271.
    #          got: '0'
    #     expected: '6'
    # Looks like you failed 1 test of 2.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5776f28efa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 848d6e07ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:40:42 +01:00
Matt Blenkinsop 42ff59d691 Bug 38297: Add a permissions check to the New vendor button
Test plan:
1) Choose a staff patron and make sure they have permissions to log
   into the staff interface
2) Ensure that the patron does not have the vendors_manage permission
   but give them one other acquisitions permission so that they can see
   the link on the homepage (e.g. budget_manage)
3) In an incognito browser, log in with that patron and go to the
   acquisitions homepage
4) The New vendor button will be visible
5) Click on it and fill in the required fields. Submit the form and it
   will error for lack of permissions
6) Apply patch
7) Return to the acquisitions page and the New vendor button should no
   longer be visible
8) Back in your main browser, give the patron the vendors_manage
   permission and then refresh the incognito window - the button should
   be visible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b11b2b213e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 345d1b943a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:38:12 +01:00
Matt Blenkinsop db54be494f Bug 38132: Add data-isbn to shelfbrowser
This patch adds a data-isbn attribute to the shelfbrowser_cover container for use in plugins

Test plan
1) View the patch diff and confirm that the attribute has been correctly added

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2cca46e611)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bf0420b140)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:37:04 +01:00
Jonathan Druart ed9cdb267d Bug 33188: Remove warning from Koha::Item->hidden_in_opac
"Use of uninitialized value in string eq"

Test plan:
  prove t/db_dependent/Koha/Item.t
should return green

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidied the tests (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f575d4cd73)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b27067e9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:35:48 +01:00
Nick Clemens d4db820adb Bug 38266: (bug 21083 follow-up) Increment after comparison
To test:
 1 - Define a patron attribute as repeatable
 2 - Add multiple values to a patron (I used borrowernumber 5)
 3 - Tools->Batch patron modification
 4 - Modify the patron from step 1, selecting the attribute you created and checking the box to clear
 5 - View the patron, they look correct
 6 - Check the DB:
    SELECT * FROM borrower_attributes WHERE borrowernumber=5;
 7 - There is one blank value
 8 - Apply patch
 9 - Repeat batch modification
10 - Check the DB, no attribute!
11 - Test with multiple attributes in the batch modification and ensure only the correct one is removed
12 - Sign off

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a62953aa9e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5178687b67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:31:04 +01:00
Caroline Cyr La Rose 078afc5161 Bug 38158: Typo in inventory 'Items has no "not for loan" status'
This patch corrects a typo in the inventory tool when an inventory
is done against not for loan items and an item has no not for loan
status.

To test:
1. Go to Cataloging > Inventory
2. Enter a barcode for an item that has items.notforloan = 0 in the "Or scan items one by one" text box
3. Check all the boxes EXCEPT "For loan" under "Optional filters for inventory list or comparing barcodes" > "items.notforloan"
4. Click "Submit"
   --> In the "Problems" column, it says "Items has no "not for loan" status"
5. Apply patch
6. Reload the page
   --> In the "Problems" column, "Item" should now be singular

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit baf884600d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5b320189f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:29:45 +01:00
Lucas Gass 297789e87e Bug 37856: DBIC Schema updates
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5eed8269b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:27:53 +01:00
Lucas Gass b615e56388 Bug 37856: DBRev 23.11.10.004
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1fb5bc4d83)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:21:28 +01:00
Pedro Amorim 94720a0c4a Bug 37856: Add new test to test platform is correctly added to build_url
prove t/db\_dependent/Koha/ERM/EUsage/UsageDataProvider.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e7dbd2a8b7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aae9a4466c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 0b14f213d9 Bug 37856: Fix existing test
A service_platform value was being randomly to 'service_platform' as is a new attribute.
Assign undef to that to fix existing test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b3fb2e85fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b8e7d7152)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Nick Clemens 7614ed0f1f Bug 37856: (QA follow-up) Tidy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b7600e4801)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2e9a6b16f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 600d75dc40 Bug 37856: Add tests
This is using the groundwork from bug 37963.
This is testing the specific error this bug is addressing:
Required parameter Platform is missing

It is also testing that the error message is correctly shown as a background
job report message to the user

Test plan:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit edb6056a74)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 89de703030)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim c03e2ff206 Bug 37856: Consider absence of 'Report_Items'
The SUSHI provider in question for this patchset also does not return any
Report_Items entry. This patch accounts for that.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 72b38a1dbf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 730ca49e06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 18d8d0effd Bug 37856: Consider 'Exceptions' not being part of 'Report_Header'
When fixing the issue around the missing platform parameter, we
noticed this particular provider also returns 'Exceptions' as
its own thing, not part of 'Report_Header', despite documentation:
https://countermetrics.stoplight.io/docs/counter-sushi-api/7cp0h7n1hm2en-tr-j1-journal-requests-controlled

From the link above, search for 'Exceptions'. Notice it should be under 'Report_Header'.
Either way, this patch accounts for this possibility.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c175c2160)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c3681fd9ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 6f6b1d969e Bug 37856: Add service_platform field
The change from this patch itself should be self-explanatory.
Testing for this requires credentials to a specific provider.
But the parameter is only added to the URL if defined.

Test plan, ktd, apply patch, run:
$ yarn js:build
$ yarn api:bundle
$ koha-plack --restart kohadev

1) Enable ERMModule
2) Create a new provider, visit:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/add
3) Ensure 'Service platform' now shows. Create the provider and put something in this field.
4) View the provider, ensure the field is shown, visit:
<staff_url>/cgi-bin/koha/erm/eusage/usage_data_providers/1

Ensure all tests are still passing:
$ cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts
$ prove t/db_dependent/api/v1/erm_usage_*

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b852c042fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c87bb2b3a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 2b7314076d Bug 37856: atomicupdate
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2e4b1ca42f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e4ed8d701)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 31abd7c976 Bug 37856: Append platform parameter to SUSHI url if defined
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dc9a5684f4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d4a4d38974)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Nick Clemens bdc47186c8 Bug 37963: (QA follow-up) Tidy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5b51ef78d4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 209b685871)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:11:23 +01:00
Pedro Amorim bc944005e3 Bug 37963: Case 2 - Consider providers returning error messages lower cased
Test plan:
1) Apply only test patch for case 1. Run tests:
prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t
2) Verify tests fail. Apply the other patch for case 1.
3) Run tests again. Verify they now pass.
4) Repeat the test plan but using patches for case 2

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 23ab84c9b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7baba70b69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:11:23 +01:00
Pedro Amorim 78022e8f03 Bug 37963: Case 2 - Add tests for different case error message
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4c76d2b565)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d4255bf632)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:11:23 +01:00
Pedro Amorim ba9df0ad99 Bug 37963: Case 1 - Return if sushi_errors even if response code >= 400
This ensures that SUSHI errors, if present, are shown on the UI even if
response->code >= 400.
This means that if, for example, SUSHI provider returns 401 with SUSHI
error like so:
{"Code": 2020, "Severity": "Error", "Message": "API Key Invalid"}

Then, the 'API Key Invalid' will be shown to the user, without having to
check logs.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d53bb4bff)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6987bf779f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:11:23 +01:00
Pedro Amorim 06c0a76aa5 Bug 37963: Case 1 - Add tests for invalid api key use case
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 05381ba6b1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 407661f5d3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:11:23 +01:00
David Cook c0b1258f7d Bug 37965: (QA follow-up) fix WYSIWYG in sysprefs
Test plan:
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?
op=search&searchfield=UseWYSIWYGinSystemPreferences
2. Enable the system preference to show WYSIWYG in HTML system preferences
3. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?
op=search&searchfield=OPACSearchForTitleIn
4. Add a link for "http://localhost:8081/cool.pl"
5. Note in the source code that the URL gets mangled

6. Apply the patch

7. Repeat the above test plan
8. Note that the URL has NOT been mangled and remains
http://localhost:8081/cool.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a22ae84fb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51daa12f61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:04:23 +01:00
Lari Taskula 79f5e9a8e0 Bug 37965: Restore Bug 12032 - TinyMCE rewrites urls in a very annoying and unexpected way
To test:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12032#c3

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b38dd9a08)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 65eece2670)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:04:23 +01:00
Jonathan Druart 917e7238bb Bug 38234: Remove unused jszip.min.js file
This specific file is not used since Bug 23013 ("Upgrade DataTables in the staff client")

This version is vulnerable and should not be used in the future anyway.

There is a version embedded in our DataTables bundle, which is jszip-3.10.1.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a00625870)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d288c5a047)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:03:36 +01:00
Fridolin Somers 1f73f72716 Bug 38131: ILS-DI doc must show renewals_count
Since Bug 30275 renamed issues.renewals to issues.renewals_count, the ILS-DI doc needs to be updated in :
koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt
Note that service 'RenewLoan' returns 'renewals' this has not changed.

Test plan :
1) Enable ILS-DI webservice
2) Go to opac : /cgi-bin/koha/ilsdi.pl
3) Click on 'GetRecords'
4) Check you see 'renewals_count' in 'Example response'
5) Click on 'GetPatronInfo'
6) Check you see 'renewals_count' in 'Example response'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37bd87c6fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cea77be3c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 09:59:40 +01:00
Pedro Amorim 286564dea3 Bug 34920: [23.11.x] Add cypress tests
Run the agreements cypress test spec:

cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-12-18 09:58:09 +01:00
Fridolin Somers 98ff3ae2b5 Bug 38274: (RMaint follow-up) Fix DBRev 2024-12-16 11:55:38 +01:00
Hammat Wele 151b1fd171 Bug 37184: Special character encoding problem when importing MARC file from the Acquisitions module
1. Go to Cataloging > "Stage records for import".
2. Upload the file "ExportMemento2024061010532869Marc8.mrc" or a MARC8 encoded file.
3. In the form, select the options :
   - Record type: Bibliographic
   - Character encoding: MARC8
   - Format: MARC
4. Click "Stage for import".
5. Find or create an open basket in the Acquisitions module.
6. Click "add to basket".
7. Select "From a staged file" and select the previous staged file.
9. Click "Select all" to check all records.
10. In the item information tab, choose the Document type.
11. Verify the titles of the records in the basket:
 --> Koha replaces accents with symbols �

12. Apply the patch.
13. Do the same from step 1 and notice there is no more encoding issues.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e8c8b68672)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 23adbf215d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:40:41 +01:00
Lucas Gass 0b01819c32 Bug 38274: DBRev 24.05.05.005
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 889c351d17)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:32:42 +01:00
Fridolin Somers 97dc9f3a00 Bug 38274: Fix typo in arabic language description
In installer/data/mysql/mandatory/subtag_registry.sql we see a missing
char in arabic language description.

Wee see this was correct before Bug 12250 :
&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;

Test plan :
1) Install a fresh Koha with this patch
2) Look in database :
   SELECT * FROM language_descriptions WHERE subtag='ar' AND type='language' AND lang='ar'
=> Check description is correct
3) On a old existing Koha
4) Install patch and run update database
=> Look in database and check description is correct

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e1dc5e8b7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ec93915064)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:31:59 +01:00
Matt Blenkinsop 810a1309cc Bug 38271: (QA follow-up) Fix testcritic
testcritic was failing due to a 'return undef' so this commit amends that

Test plan:
1) prove t/00-testcritic.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 640ce0bc6b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9bf772dd42)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:31:05 +01:00
Kyle M Hall 01d0ea0ef3 Bug 38271: (QA follow-up) Tidy code
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f68688b58)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d0a019756)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:31:05 +01:00
Matt Blenkinsop 2606b4ee2e Bug 38271: Handle missing 008 fields in EDI
This patch adds handling to create a default 008 field on MARC records that are missing one when created through EDI.

Test plan:
1) prove t/db_dependent/Koha/EDI.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b00fb3d557)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4eccb57f06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:31:05 +01:00
Johanna Räisä b439619e06 Bug 38188: fix populating the borrowenumberlist from patron_search_selections
This patch fixes the issue of populating the borrowernumberlist from patron_search_selections.
Adding borrowernumbers to the textarea randomly fails because the textarea is populated with the html() function.

To test:
1) Go to the patron search
2) Select a few patrons
3) Click on the "Batch patron modification" button
4) Use browsers back button to go back to the patron search
5) Find patron_batchmod_form from browser inspector, open it.
6) Check that between the <textarea> tags, there are the borrowernumbers of the selected patrons.
7) Apply the patch
8) Repeat steps 1-6
9) Check that <textarea> tags are not populated with the borrowernumbers of the selected patrons.
10) Remove the display:none from the textarea and check that the borrowernumbers are populated there.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f44a0adb5d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 373099a690)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:28:16 +01:00
Jonathan Druart 17fbc68ead Bug 38138: (bug 33398 follow-up) Don't display code for primary contact method
We have several choices for "primary_contact_method", we don't want to
display the code but the label
phone => Primary phone
phonepro => Secondary phone
mobile => Other phone
email => Primary email
emailpro => Secondary email
fax => Fax

Bonus: it will make it translatable.

Test plan:
1. Edit a patron record to add a Main contact method
2. Place a hold for this patron
3. Check the item in
   --> Pop up says "Main contact method:" followed by the choice.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49e09672b5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bd535936d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:26:24 +01:00
Kyle M Hall 49540025a2 Bug 37582: Add unit test
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4d1b0303ff)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c72e1f96f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:21:09 +01:00
Kyle M Hall 733ffb1f62 Bug 37582: Tidy write_msg
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 768a5d197c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0845639a8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:21:09 +01:00
Kyle M Hall e3865d7030 Bug 37582: Add ability to for SIP to convert control and separator characters to spaces
This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information.
It seemed to have been caused by patrons with multiple restrictions and a new line in the response

This patch also does minor refactoring to write_msg to pass the server variable that contains
all the previously passed parameters, and removes the never used "file" parameter.

Test Plan:
1) Add multiple debarments to a patron
2) Run a sip patron information response, note the presence of newlines
3) Apply this patch
4) Add the new option convert_control_characters to your SIP account,
   set the value to " -- "
5) Restart all the things!
7) Run a sip patron information response, note the newlines have been replaced!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a20ac7f99)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d76b6a9b42)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:21:09 +01:00
Fridolin Somers 7fb5f6bad7 Bug 36317: Koha::Biblio->host_items must use me.itemnumber
Koha::Biblio->host_items fails with search_ordered() because of ambiguous column 'itemnumber' in where clause.
It must use me.itemnumber like in Koha::Biblio->items

Test plan :
prove t/db_dependent/Koha/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a9964bc8a9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 405ddad65b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:20:14 +01:00
Fridolin Somers 8f9f6ffcdf Bug 36317: Add unit test
If fails it shows :
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'itemnumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 399

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d193455ec2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a267e9a25d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:20:14 +01:00
Tomas Cohen Arazi ac9d935fd5 Bug 38249: Fix typo in koha-list --help
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 85239f0fbf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ec28414168)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:08:39 +01:00
Nick Clemens d2b9bdba11 Bug 38117: Only show 'not checked in' message if item is checked out
To test:
 1 - Enable system preference 'ShowAllCheckins'
 2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
 3 - Check in an item
 4 - Note 'Item was not checked in message'
 5 - Confirm it happens for any item that is not currently issued
 6 - Check out an item to a patron
 7 - Mark the item as withdrawn
 8 - Check the item in
 9 - Note message 'Item was not checked in' appears too
10 - Apply patch
11 - Confirm checking in an item not checked out only shows 'Not checked out'
12 - Confirm the withdrawn item still shows 'Item was not checked in'
13 - Confirm above message remains whne checking in more items that were not issued

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 91ba4fcfd7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5bb19beff8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:04:44 +01:00
Kevin Carnes de3d7a776f Bug 36171: Fix template toolkit tags split by HTML parser
It appears that the template parser parses HTML tags first and then template
toolkit tags. This can cause a template toolkit tag that contains an HTML tag
to have its start and end markers separated. This causes it to be treated as
text that can be translated instead of a template toolkit tag.

This patch searches for text sections that have a template toolkit end marker
without a start and then searches for the start in previous sections. It then
creates a new template toolkit section with the start and end markers.

The action buttons in the staff Lists view have been changed to allow
translation.

To test:
1. You will need to edit the staff-prog.po for a language and modify the
   the translation for "SET line_break". You can change SET to FOO.
2. Install the translation for the language.
3. View the details of a patron in the staff interface with the language.
4. The page will have an error.
5. Apply the patch.
6. Install the translation for the language.
7. View the details of a patron in the staff interface with the language.
8. The page should now display correctly.

If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure
that the template tag is no longer included in .po file.

You can also add translations for "Edit", "Delete", and "Transfer" in
messages.po to make sure that the action buttons are translated in the Lists
view.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Amended-by: Jonathan Druart
Tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cf634fa014)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2d2e2bbb5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 16:01:08 +01:00
Nick Clemens ffa6c013bd Bug 38237: Add POD
This patch adds POD to the script and rpelaces the custom help script with pod2usage

TO test:
perl misc/cronjobs/erm_run_harvester.pl
Confirm you get helpful usage data

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0ff61ab9d9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6264f861a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-13 15:58:45 +01:00