Commit graph

50665 commits

Author SHA1 Message Date
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
31d73fc742 Bug 28012: (QA follow-up) Use form validation for numbering patterns
Activates standard validation and error messages. Converts from
pattern check to digits class for "display order" field.

To test:
* Compare error message when leaving required fields empty
* Compare error message when entering wrong/false data in display order

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f816027ea1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 452ab27397)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
7af0354964 Bug 28012: (QA follow-up) Add numeric imput mode to display order field
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49138a6df7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9be82743f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
Joonas Kylmälä
aa3415ff3f Bug 28012: Creating numbering pattern: mark mandatory fields required
If any of these fields were missing, notably the Numbering formula
then saving the new numbering pattern silently failed, it didn't give
any error but it didn't save any new pattern either.

Note that there is a plan to make description field optional, so even
if it currently is mandatory on the DB level we leave it optional
here (and due to people using production DB's in non-strict mode which
allows this to be optional).

To test:
  1) After applying this patch make sure all the 3 fields must be
  filled in
  /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new
  page and it cannot be saved without those.

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 a69b5e6ee9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 77e7e11c3a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
Joonas Kylmälä
8a9f2a05e0 Bug 28012: Use definedness test instead of bool when checking whether to null fields
Saving a new numbering pattern didn't work without having to fill all
the fields, even those that are not mandatory.

To test:
 1) Go to /cgi-bin/koha/serials/subscription-numberpatterns.pl
    and try creating a new pattern, notice that only Name and
    Description are mandatory after applying this patch
 2) Make sure editing existing numbering patterns still works

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 97aab6a98e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d4a81e4c2a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:08:53 +00:00
Julian Maurice
97939c87b7 Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 002e02710b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d95aa51639)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:05:02 +00:00
8c82b57649 Bug 35588: Scope authorised value desc lookup according to field/subfield
This patch ensures that the authorised value descriptions looked up
are for the correct field/subfield designated in the CSV profile.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following
for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|
111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|
505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995

3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;

5. Go to that list in the staff interface
6. Download that list using your CSV profile

7. Apply the patch
8. koha-plack --reload kohadev

9. Download that list using your CSV profile
10. Note that the output is a little slower, but still quick enough.
11. Note that the output is a bit different. For records like "Gairm",
the output will end in "1" instead of "Yes". This is correct, because
this subfield isn't an authorised value!!!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f53ebe874e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6688687d93)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:05:02 +00:00
b9d05a7e3f Bug 35579: Add unit test
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca754a2c5e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 548c9ce885)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:02:28 +00:00
1c8291f8ae Bug 35579: Cache authorised value lookup by MARC field
This patch adds a "get_descriptions_by_marc_field" method
which caches AuthorisedValue descriptions when searched by
MARC field, which is used when exporting MARC to CSV.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995|952|952$c
3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;
5. Go to that list in the staff interface
6. Download that list using your CSV profile
7. Apply the patch
8. koha-plack --reload kohadev
9. Download that list using your CSV profile
10. Note that the output is the same, but that the output completes much more quickly after applying the patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 78c0e8df8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 423c240339)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 22:02:27 +00:00
Julian Maurice
f4eb54dd6b Bug 31694: Add missing TT filters
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47ffdaf6f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a3e35b0548)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Kevin Carnes
b2f77bd7bb Bug 31694: (follow-up) Use values for operations to avoid translation issues
To test:
    * Try adding a preset rule that has an operation with different translations
      for the column and the pull down (e.g. Outrepasser for fr-CA)
    * Without the patch it appears as Custom (e.g. Personnalisé)
    * With the patch it appears correctly (e.g. Outrepasser)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e9c7f84896)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0db31d75f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Shi Yao Wang
4c83ac6e5c Bug 31694: (follow-up) Fix preset display issue
Preset column should now display the right preset.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35ddacf397)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d6511233b8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Katrin Fischer
5297dfd361 Bug 31694: (follow-up) Further improve translatability
To test:
* Add rules fo different modules and with different settings
* Verify the saved module description for a saved rule matches the pull down
* Verify the saved filter matches the pull downs (especially for source and patron category)

Also:
* Renames 'User category' to 'Patron category'
* Remove some values from translations, that shouldn't be translated, like value attributs for options.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b1cd199aaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4595fdf0de)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
Caroline Cyr La Rose
b9402cb596 Bug 31694: MARC overlay rules presets don't change anything if presets are translated
This patch corrects option value names in MARC overlay rules to prevent
them from being translated.

To test:
1. Install a new language
1.1. In a terminal, run the following commands
gulp po:update
cd misc/translator
./translate install xx-XX
1.2. Go to Administration > Global system preferences
1.3. Search for language
1.4. In the language syspref check the box for the language you just installed
1.5. Save
2. In the staff interface in English, go to Administration > Record
overlay rules
3. In the column 'Preset' try the various options, note that the
'Added', 'Appended', 'Removed', and 'Deleted' settings change depending
on the chosen preset
4. Change the interface language
5. Redo step 3, notice that if the preset name is translated, the other
settings don't change
6. Apply patch
7. Redo step 3, the presets should now change the settings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5a98fe574)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1da66ccc14)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-01-12 21:55:16 +00:00
278dcab1cf Bug 31297: DBIC 2024-01-12 20:38:37 +00:00
41c774c365 Bug 31297: DBRev 23.05.07.001 2024-01-12 20:35:34 +00:00