Commit graph

50680 commits

Author SHA1 Message Date
84d0c6ac9b Bug 35438: Transact each record import separately
When importing a staged file we commit every 50 records
For an authority import we are also merging, which can affect many more biblios, and these all end up in the transaction.
This can cause tables locks and issues across Koha

Test Plan:
1) Apply this patch
2) prove t/db_dependent/ImportBatch.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 74bbb89e99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cc4f879465)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 17:47:39 +00:00
Emmi Takkinen
84cc07b507 Bug 32477: Fix hiding all columns in item batch mod tools
If one hides all columns in batch item modification tool
and then reloads the page or launches tool again, "Holds"
column isn't displayed and "Itemtype" column is. Also
"Itemtype" columns checkbox remains checked. This happens
because "Itemtype" columns id is out of scope of list of column
numbers set in cookies. This patch adds 3 to number of columns
in variable "allColums" to take account all 3 columns we don't
want to hide.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. Use "Hide all columns" checkbox to hide all columns.
3. Confirm all columns expect checkbox, "Title" and "Holds"
columns are hidden correctly.
4. Reload the page.
=> Note that "Holds" column is now hidden and "Itemtype"
column is displayed. Also "Itemtype" checkbox is checked.
5. Apply this patch.
6. Repeat steps 1 to 4.
=> "Holds" column should now be displayed and "Itemtype"
hidden. None of the checkbox should be checked.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.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 deed5233b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 043fd7ffa4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 17:46:02 +00:00
Emmi Takkinen
44adbd6628 Bug 32477: Launch function hideColumns after changing datatables settings
Hiding columns in batch item modification breaks if page is
loaded again. If one hides e.g. column "Collection" and then loads
the page column "Holds" disappears. Also behaviour of checbox
changes for "Collection" column. This happens because we launch
function "hideColumns" before changing datatables settings and
"hidden" column with class "sorting_1" is still present.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. In modification page, hide column "Collection". Confirm
correct column is hidden.
3. Reload the page or modify items again.
=> Note that column "Holds" is now hidden and checking checkbox
for column "Collection" behaves incorrectly (unchecked checkbox
shows column, checked hides it)
4. Apply this patch.
5. Repeat steps 1, 2 and 3.
=> Confirm correct column is now hidden when page is loaded again
and checkbox works correctly.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.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 71a7aa1cdc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff32095205)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 17:46:01 +00:00
e1fcd24cd3 Bug 35702: Fetch biblios at once and loop
Test plan:
prove -v t/db_dependent/Authority/Merge.t

Signed-off-by: David Nind <david@davidnind.com>

Amended-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Replace $biblio->id with $biblio->biblionumber

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 1847e2ab56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa443bcef1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:31:03 +00:00
fc0efe7909 Bug 35702: Use framework code from biblio object
Signed-off-by: David Nind <david@davidnind.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 c703bb2c1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f8ab19a3eb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:31:03 +00:00
8bd1585e1a Bug 35086: (follow-up) Use 5000 as example in conf file
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 ed23bc1364)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a14f44ea8a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:25:22 +00:00
5defc65ddd Bug 35086: Tidy tests
Signed-off-by: David Nind <david@davidnind.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 ddbd00de72)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e1157dcdcd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:25:22 +00:00
eb2617409a Bug 35086: Also split chunks when indexing from background job
The es background indexer is designed to combine background jobs when started based on the 'batch_size' option.

While this is helpful for combining individual updates, it can be problematic when there are several large batch modifications, or when worker has stopped and is restarted.

This patch uses the same logic as in the indexer to split the chunks that are sent directly for indexing.

To test:
1 - Follow test plan on previous patch
2 - Confirm items are correctly indexed and jobs marked

Signed-off-by: David Nind <david@davidnind.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 7496a603cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2f8ae2ec21)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:25:22 +00:00
19f442c18f Bug 35086: Add chunk_size option to elasticsearch configuration
Whne performing batch operations we can send a large numebr of records for reindexing at once.
Currently this can create requetss that are too large for Elasticsearch to process. We need
to break these requests into chunks/

This patch adds a chunk_size configuration to the elasticsearch stanza in koha-conf.xml

If blank we default to 5000.

To test:
0 - Have Koha using Elasticsearch
1 - Create and download a report of all barcodes:
    SELECT barcode FROM items
2 - Batch modify these items
3 - Note a single ESindexing job is created
4 - Create and download a report of all authority ids:
    SELECT auth_header.authid FROM auth_header
5 - Setup a marc modification template, and batch modify all the authorities
6 - Again note a single ES backgorund job is created
7 - Apply patch
8 - Repeat the modifications above - you still get a single job
9 - Edit koha-conf.xml and add <chunk_size>250</chunk_size> to elasticsearch stanza
10 - Repeat modifications - you now get several background ES jobs
11 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t

Signed-off-by: David Nind <david@davidnind.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 9951e230e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 636920558c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:25:22 +00:00
486140a758 Bug 34999: Add unit test
Test plan:
Run t/db_dependent/api/v1/auth.t
[Bonus] Run prove t/db_dependent/api/v1

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b8d9cce664)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ce924fa1db)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:22:25 +00:00
d3ea6d8cbd Bug 34999: Throw exception for public routes if OPACMaintenance is enabled
Test plan:
[1] Try public endpoint like /api/v1/public/biblios/X/items.
    * Replace X by an existing biblionumber.
    You should receive a 200.
[2] Enable OPACMaintenance. Set to Show.
[3] Try same endpoint. You should get a 503 with a json error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1fc82dd827)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 24b14de398)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:22:25 +00:00
dde9176e2c Bug 35756: Correctly serialize patron's data in patron search popup/modal
We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6779e64d95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 65460128f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:20:58 +00:00
ddf41c2dba Bug 35504: Distinguish different RMaint and Topic Expert roles
This patch further splits up release maintanence and topic expert roles
so that they display with further, more accurate, detail in the
development team section.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2ce83fc784)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f09a31a15)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:49 +00:00
48aa0f4994 Bug 35504: Add full maintainers list into development branch
On a stable branch the current maintainer of your running version is
listed at the top of the current maintanence team.. however when you're
on a development branch the RM is responsible for your branch and the
maintainers were missing from display.

This patch adds the maintainers list back to the bottom of the current
maintanence team section, just for the development branch.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7fd998c1e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 74300e9908)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:49 +00:00
360e684a42 Bug 35504: Change 'Jenkins' to 'Continuous integration'
We were naming these roles differently between the 'current team' and
'past roles' display.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a26d4bdf95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 149cc63818)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:49 +00:00
1c47afe807 Bug 35504: Corrections to wiki team
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a4061c3f14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f302c50af3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:48 +00:00
935e51aed5 Bug 35504: Add ktd maintainer
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 29c1225bf8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3c3670142f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:48 +00:00
742e8a73ff Bug 35504: Corrections to team
Correction of 'advocate' to 'advocates' to ensure they appear in the
team.

Addition of 'website' and 'wiki' handling to ensure they also appear
in the team.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8190fdb5bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b301f79526)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:48 +00:00
21d079a497 Bug 35504: Typo fix
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b9da22b490)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ace0ac8f6b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:48 +00:00
852e5fdf47 Bug 35504: New cycle, new team :)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b6cfef878b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5d5ffef0e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:16:48 +00:00
3ad6c60f7f Bug 35774: Use itemnumber instead of biblioitemnumber
With Bug 33639 already pushed to master there should be NO change in behavior.

To test:
1. APPLY PATCH
2. Create one or more item groups for a bib if needed
3. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
4. The item should succesffuly be added to the item group.
5. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
6. Name the new item group.
7. Make sure it is correctly added to the item group.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 95e19e758a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 71247b9a07)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:10:52 +00:00
60091d4f1d Bug 33639: Make add item to item group work from additem.pl
To test:

1, Create one or more item groups for a bib if needed
2. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
3. On the Normal tab, see that the item has not been added to the item group you selected.
4. APPLY PATCH, restart_all
5. Try 1-3 again but this time the item should succesffuly be added to the item group.
6. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
7. Name the new item group.
8. Make sure it is correctly added to the item group.

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 5b14f8b11a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1448ac0c26)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-02-02 16:09:07 +00:00
f6746b49bb Update release notes for the 23.05.08 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 18:06:00 +00:00
2a32a8b1e8 Increment version for 23.05.08 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 17:42:43 +00:00
6dbcc0f7e4 Bug 34893: Unit tests for C4::Auth::checkpw
This patch introduces some tests on the current (and new) behavior for
the `checkpw` function.

I needed it to better understand if an edge case was actually possible
(it wasn't).

Found a really minor annoyance for the internal check with expired
password not returning the $patron object for consistency with the other
use cases.

I think this method deserves (at least) changing the return value to a
sane data structure. But that's not target for backporting to stable
releases. So a separate bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 17:33:44 +00:00
11e2e86da6 Bug 34893: (QA follow-up) Tidy code for qa script
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 17:33:44 +00:00
2d8722c97d Bug 34893: Add checkpw change to REST API
This patch adds the checkpw return value change to the REST API
route for validating user identifiers and password.

Test plan:
0. Apply patch
1. prove t/db_dependent/api/v1/password_validation.t

Bonus points:
1. koha-plack --reload kohadev
2. Enable syspref RESTBasicAuth
3. curl -XPOST -H "Content-Type: application/json" \
-u <staff_userid>:<staff_password> \
-d '{"identifier":"<cardnumber>","password":"<password>"}' \
http://localhost:8081/api/v1/auth/password/validation
4. Validation doesn't fail. It gives you cardnumber, patron_id, userid

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 17:33:44 +00:00
38e1c2a951 Bug 34893: ILS-DI can return the wrong patron for AuthenticatePatron
Imagine we have a set of users. Some of those users have a NULL userid. We then call AuthenticatePatron from ILS-DI for a patron with a NULL userid, but a valid cardnumber. We call checkpw, which returns the cardnumber and userid. We then call Koha::Patrons->find on the userid *which is null*, meaning the borrowernumber returned is not the correct one, but instead the earliest patron inserted into the database that has a NULL userid.

Test Plan:
1) Give three patrons a userid and a password
2) From the database cli, set all patrons's userid to null
   Run this query: update borrowers set userid = null;
3) Call AuthenticatePatron with username being the 1st patron cardnumber,
   and password being the password you set for that patron
   http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=kohacard&password=koha
4) Note you get back a borrowernumber for a different patron. Refresh the page and the number is correct.
5) Do the same with the 2nd patron. Same issue at 1st and correct number after.
6) Apply this patch
7) Restart all the things!
8) Do the same with the 3rd patron.
9) Note you get the correct borrowernumber! :D
10) prove t/Auth.t t/db_dependent/Auth_with_ldap.t t/Auth_with_shibboleth.t t/db_dependent/Auth_with_cas.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 17:33:44 +00:00
1f50091a06 Bug 34893: Add unit tests
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-24 17:33:44 +00:00
Andrew Fuerste Henry
7c9a2beb9d Bug 25835: Include overdues with fines in overdues_report permission
To test:
1 - have a user with circulate_remaining_permissions but not
    overdues_report
2 - confirm user can see and run Overdues with Fines
3 - apply patch
4 - confirm user can no longer see links to Overdues with Fines or load
    the page directly by entering the url
5 - confirm a user with overdues_report or greate permission can see and
    use the tool

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>
(cherry picked from commit 23de67a7e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9825c7ea36)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-19 22:37:52 +00:00
9051088ec0 Bug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious
This patch addresses the fact some of our code still relies on those CGI-era ENV variables.
In particular, C4::Laguages::getlanguage expects it to calculate the most suitable language.

As this is reported as required, I provide a fix.

I did a `git grep HTTP_` on the codebase, and the only other occurences are:

* C4::Output (HTTP_X_REQUESTED_WITH)
* C4::Context (HTTP_USER_AGENT, HTTP_X_FORWARDED_FOR)
* C4::Auth_with_shibboleth (using HTTP_ variables for matchpoints)
* Some handling on the 'Koha as a Mojo app' code
* Some .pl script not relevant to this report

I decided to limit this patch to the requested header which seems harmless. I leave the
other cases.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ qa -c 1
=> FAIL: Tests fail!
3. Apply this patch
4. Run:
  k$ qa -c 2
=> SUCCESS: Tests pass! All green!
5. Sign off :-D

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>
(cherry picked from commit d6e072fb5f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c1ba60ce4d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-19 22:35:50 +00:00
a9025d9d7c Bug 32551: Regression tests
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>
(cherry picked from commit 5292903dc1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0df6ad0aa9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-19 22:35:50 +00:00
Kevin Carnes
f002c47366 Bug 35567: Prevent translation of Host-item in "Show analytics" link
The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f2c17e71d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3ce12b7dca)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-19 22:33:05 +00:00
Katrin Fischer
a4042a3c8c Bug 35713: Remove outdated debian/docs/LEEME.Debian file
This removes the LEEME.Debian README file from the docs
directory. We don't even have an English README here as
we usually refer to the wiki for installation instructions.
It makes sense to remove it from the codebase.

To test:
* Verify that the file is removed
* Verify that all references to the file have been removed as well
  Example: git grep LEEME

Signed-off-by: David Nind <david@davidnind.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 a18e4d0e62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3606493ad)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-19 20:59:50 +00:00
34cefad0ae Bug 35598: Fix selenium/authentication_2fa.t random failure
Jenkins is failing with
koha_1       | STRACE:	/usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
koha_1       | 	/usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
koha_1       | 	(eval 582):1 in Selenium::Remote::Driver::__ANON__
koha_1       | 	(eval 584):2 in Selenium::Remote::Driver::__ANON__
koha_1       | 	(eval 556):17 in Selenium::Remote::Driver::_execute_command
koha_1       | 	/usr/share/perl5/Selenium/Remote/WebElement.pm:125 in Selenium::Remote::WebElement::_execute_command
koha_1       | 	t/db_dependent/selenium/authentication_2fa.t:276 in Selenium::Remote::WebElement::send_keys
koha_1       | 	/usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
koha_1       | 	/usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
koha_1       | 	/usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
koha_1       | 	t/db_dependent/selenium/authentication_2fa.t:294 in Test::More::subtest
koha_1       |
selenium_1   | 1702911648831	Marionette	INFO	Stopped listening on port 41385
selenium_1   | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
selenium_1   | 15:00:49.452 INFO [ActiveSessions$1.onStop] - Removing session c3461b22-7a80-4b56-b177-653a53cc2651 (org.openqa.selenium.firefox.GeckoDriverService)
koha_1       |     # Looks like you planned 7 tests but ran 3.
koha_1       |
koha_1       | #   Failed test 'Enforce 2FA setup on first login'
koha_1       | #   at t/db_dependent/selenium/authentication_2fa.t line 294.
koha_1       | Error while executing command: element not interactable: Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

The error is: "Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard"

A guess is that the input is either 1. outside of the viewport, or 2. not
displayed yet.

1. We are hidding #registration-form then show it when we retrieved the
   info (after POST /api/v1/auth/two-factor/registration)
2. Couldn't there be a race condition?
In auth.tt
284                     success: function (data) {
292                         $("#registration-form").show();
And in the selenium test:
$s->wait_for_ajax; # There is an ajax request to populate the qr_code and the secret
Not sure this wait_for_ajax is waiting for the end of success, I don't
think so.

This patch is supposed to fix both theories.

Test plan:
0. Do not apply the patch
1. Edit auth.tt and sleep 1 second before showing the form:
290                         const sleep = ms => new Promise(r => setTimeout(r, ms));
291                         await sleep(1000);
292                         $("#registration-form").show();

You will also need to replace the following line (284):
  success: function (data) {
with
  success: async function (data) {

2. prove t/db_dependent/selenium/authentication_2fa.t
=> "is not reachable by keyboard" error!

3. Apply the patch, keep the sleep

4. prove t/db_dependent/selenium/authentication_2fa.t
=> Tests are passing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Tidied a bit to clear complaints
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3270d32191)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5aa213e210)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-19 20:53:11 +00:00
ba485664db Bug 35587: (QA follow-up): QA script tidy
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 520c84756a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 95884923f7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:26:58 +00:00
Aleisha Amohia
390e67a748 Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled
This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained.

To test:

1. Go to Koha Administration -> Global system preferences
2. Set the BlockReturnOfLostItems system preference to Block
3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster)
4. Take note of your logged in library
5. Search for an item where the home library is NOT the same as your logged in library
6. Edit this item and give it a lost status
7. Check in the item
8. Notice the item is returned and a transfer is automatically triggered
9. If you go to the item record page, the lost status has been remove

10. Apply the patch and restart services

11. Edit the item again and give it a lost status. This will also cancel the transfer
12. Check in the item
13. Confirm the transfer is NOT triggered and the lost status is retained as expected.
14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block")
15. Check in the item
16. Confirm the transfer is triggered and lost status is removed

17. Confirm tests pass

prove t/db_dependent/Circulation/Returns.t
prove t/db_dependent/Circulation/Branch.t

Sponsored-by: Pymble Ladies' College
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 930ad0178d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fc777d84a4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:26:58 +00:00
e953644aac Bug 35696: Fix regression caused by bug 33167
A case was missed when switching from item.transfer.field to just
transfer.field.

This meant that the daterequested date wasn't getting filled properly in
the UI.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1f16ac11e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3ac46b388)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:24:50 +00:00
9d32dd34ac Bug 35629: Remove redundant code
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 9149dc4d06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8810cffc0f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:22:37 +00:00
cc78b7a2bb Bug 34900: (follow-up) Add version information to more entries
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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 dbc2060822)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2dc5d7bf1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:20:09 +00:00
David Nind
23a765b0e6 Bug 34900: (follow-up) List alphabetically and tidy ups
Listed in alphabetical order (except for Koha, which is listed
at the start).

Tidy ups and consistency changes:
- end of each entry: remove full stops
- separator between software and license: use a colon
- headings for software/library name: use sentence case
  unless a noun, abbreviation, or the actual software name
- http and https: use https where site uses it
- URLs: update where required
- license names: use consistent full names with title case

Signed-off-by: David Nind <david@davidnind.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 4cb2f7f2db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3c24c5afb2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:20:09 +00:00
deefc64297 Bug 34900: (follow-up) Correct last entry
Signed-off-by: David Nind <david@davidnind.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 99e5791994)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a670c4cd3c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:20:09 +00:00
0b37409572 Bug 34900: Simplify text of about page license information
This patch simplifies the language describing third-party libraries and
their licenses so that translation are not so complicated.

The patch also removes information about some assets which are no longer
part of Koha.

The license information now lists only the library name, version (if
possible) and license.

To test, apply the patch and go to the about page in the staff
interface. Open the "Licenses" tab and check the content.

Signed-off-by: David Nind <david@davidnind.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 84f18c3cc2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8f4c60372)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:20:09 +00:00
Julian Maurice
a4edd5ca08 Bug 35070: Fix get_enabled_plugins when database is not created yet
Koha::Plugins::get_enabled_plugins is called by Koha::Plugins::call
which is called by C4::Templates->new, which is used in the web
installer when the database is not created yet

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3df1cb33c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fec97b4ae8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:16:26 +00:00
8860b00ae8 Bug 35070: (QA follow-up) Fix missing TT filter
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c3d78bc35a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8df06a8cd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:16:26 +00:00
Julian Maurice
28623f6aa9 Bug 35070: Add test verifying plugins cannot override core templates
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2233c230b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 829ef649c0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:16:26 +00:00
63a48597c4 Bug 35070: Tidy
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 21fd864416)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cd2e54f6e1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:16:25 +00:00
Julian Maurice
49c5392ae6 Bug 35070: Add plugin hook template_include_paths
It allows to add paths to Template::Toolkit's INCLUDE_PATH option

http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

Test plan:
1. Install the modified kitchen sink plugin:

    git clone --branch template-include-paths \
    https://github.com/jajm/dev-koha-plugin-kitchen-sink.git

2. Run misc/devel/install_plugins.pl
3. Restart memcached and koha
4. Go to Administration -> Manage Plugins
5. Run the KitchenSink plugin's tool
6. Click on "Schedule greeting"
7. Go to Administration -> Manage jobs
8. If you don't see any jobs, uncheck "Current jobs only"
9. You should see a job of type "Unknown job type
   'plugin_kitchensink_greeter". Click on the "View" button
10. Under the Report section you should see "This is the report block"
11. Under the Detailed messages section you should see "This is the
    detail block"
12. Open the browser console, you should see a message "This is the js
    block"

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 5047e0761c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fe5b461cbf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:16:25 +00:00
27464fbe39 Bug 35698: (bug 32162 follow-up) fix bug number in db rev
Should be 32162, not 31162.

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 bc8a9b36ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6694512cf0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:13:08 +00:00
5df77a718d Bug 35658: Fix misaligned collectionFormat in patron_holds.yaml
This patch fixes a silly typo.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 54b07ffc18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 104c6bf1cc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:11:01 +00:00