Commit graph

50023 commits

Author SHA1 Message Date
382fc1a7c7 Bug 30843: Add unit test for Koha::Auth::TwoFactorAuth::verify
This change adds a unit test to test Koha::Auth::TwoFactorAuth::verify

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ac91b24cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b89e31393e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-17 16:56:21 +00:00
daf3b688fd Bug 30843: Add mfa_range configuration option for TOTP
This change adds a mfa_range configuration option for TOTP
to koha-conf.xml, and overrides the "verify" method from
Auth::GoogleAuth in order to provide a new default for "range"

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
3. Change the syspref to "Enable"
4. Go to
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
5. Click "More" and "Manage two-factor authentication"
6. Register using an app
7. In an Incognito window, go to
http://localhost:8081/cgi-bin/koha/mainpage.pl
8. Sign in with the "koha" user
9. Note down a code from your Authenticator app
10. Wait until after 60 seconds and try it
11. Note it says "Invalid two-factor code"
12. Try a new code from the app
13. Note that it works

14. Add <mfa_range>10</mfa_range> to /etc/koha/sites/kohadev/koha-conf.xml
15. Clear memcached and koha-plack --restart kohadev
16. Sign in with the "koha" user
17. Note down a code from your Authenticator app
18. Wait 4 minutes and then try it
19. Note that it works

20. Disable your two-factor authentication and click to re-enable it
21. Use a code older than 60 seconds when registering for the two
factor authentication
22. Note that the code works

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a0955946e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5cef65a87f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-17 16:56:21 +00:00
5169ed8e8f Bug 34804: Fix translations
This patch fixes some translations in the ERM module

Translations should be wrapped in this.$__()

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c736793cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bd0a79a5eb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-17 16:56:20 +00:00
Jacob O'Mara
38d6e5c2fc Bug 34917: Fix default sort column of table in suggestion.tt
Test plan:
1. Navigate to Acquisitions and load the suggestions management page
2. Ensure that there are some suggestions in the table
3. Observe that the default sort is on the "Suggester Category" column
4. Apply Patch
5. Observe that the default sort is now on the "Suggested on" column
   instead

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 20524530c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efd2fcc842)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:42:13 +01:00
David Nind
8cc4ed69e1 Bug 34942: Fix typo - 'brower' to 'browser'
This fixes a typo in a message used in the advanced cataloguing
editor when macros are converted from being stored in the browser to
being stored in the database (bug 17268 - Advanced cataloging editor
- rancor - macros are lost when browser storage cleared).

Test plan:
1. Search for 'brower' in the codebase - there should be one occurance:
   grep -rn --exclude=*.po brower *
2. Apply the patch.
3. Run the search in step 1 again, there should now be no occurances.
4. Review the diff for the patch a nd make sure that the change makes
   sense.
5. Sign off! 8-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec0a8ae60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20a99ed86c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:41:17 +01:00
ced2496fd9 Bug 34918: Fix userenv for safe_to_delete tests
Instead of the fallback to 51, we pass a borrower that has
permission for editing items.

Test plan:
Do not apply patch.
Run test without a borrower 51 in db. (FAIL)
Apply patch.
Run test again. (PASS)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8233f44a5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e369d47eb7)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:37:01 +01:00
f231484ef3 Bug 34918: Fix hardcoded borrowernumber 42
Test plan:
Run t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3298b27985)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3dc01292aa)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:36:45 +01:00
aa05d63a5a Bug 34930: Change timezone in Koha/Object.t where tests assume it
This is the case for subtest: attributes_from_api() tests.

Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Object.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fb84e424e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 69ce926ff2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:35:59 +01:00
ed23d3ea28 Bug 34489: Fix timezone problem in Patrons.t
See also bug 34930. Using same approach.

Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6109a41ca6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f2228f40ab)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:35:36 +01:00
e0964c19ec Bug 34934: Remove the use of event attributes from OPAC lists page
This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.

The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.

To test, apply the patch and log into the OPAC.

- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
  "Staff only."
  - You should see a message, 'The "Staff only" permission has no actual
    effect while this list is strictly private'
- Change the category to "Public." The message should disappear.

- View the contents of a list.
  - Click the "Send list" button at the top of the table of titles.
  - It should trigger the "Sending your list" popup window.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 56348379ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ea411a563a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:35:11 +01:00
2282021cb9 Bug 34936: Remove the use of event attributes from OPAC detail page
This patch removes the use of event attributes (onclick) from the OPAC's
bibliographic detail page template. These events are defined now along
with the other in-page JS.

The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.

In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.

To test you must have the OPACComments system preference enabled.

- Log in to the OPAC, locate a bibliographic record, and view the detail
  page.
- Under the "Comments" tab, click the "Post your comments on this title"
  link. It should trigger a popup window.
  - Submit your comment. When the detail page reloads, return to the
    "Comments" tab and click the "Edit" link on your comment. The same
    popup window should be triggered.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f03cf6cc10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75f595ee52)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:34:25 +01:00
f43bd53f09 Bug 34836: Add patron check to isbd and marc detail pages
Test plan:
- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a MARC detail or ISBD detail bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=76
http://localhost:8080/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=76
- Notice it blows up with error 500, on both occasions
- Apply patch. Repeat.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fadf73a95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c8dda1dcc)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:34:14 +01:00
Katrin Fischer
0df2266f85 Bug 34446: (QA follow-up) Add colons on delete confirm page
This adds the missing colon on the 'confirm deletion' page.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f4ee7f2bb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 70df53df4b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:32:10 +01:00
Laura Escamilla
48174db359 Bug 34446: Added missing colon to Can be guarantee
To test:

1. Go to Administration > patron categories and edit or create a new category. Notice that “Can be guarantee” does not have a colon.
2. Apply patch and refresh the page.
3. Can be guarantee now has a colon — yay!
4. Sign off and have a great day. :)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f9a4097200)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c5da14058)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:31:57 +01:00
0f691e4f04 Bug 34885: Improve confusing pref description for OPACHoldsIfAvailableAtPickup
Changes pref description and sysprefs.sql.
The change is not important enough for a dbrev.

Test plan:
Look at the changed text in Systempreferences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a398c5e9d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit abb035ac32)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:30:54 +01:00
78b510e6da Bug 34781: Add a span tag in opac-memberentry
Test plan:
Enable self registration and GDPR consent (privacy policy).
Look at selfreg page on OPAC. Scroll to bottom.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3db74c8086)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c1054f26f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:29:53 +01:00
ef222e075a Bug 34443: Spelling: Patron search pop-up Sort1: should be Sort 1
This patch instances of "Sort1" and "Sort2" being used
as labels in the interface, replacing the strings with "Sort 1" and
"Sort 2"

To test, apply the patch and test this page:

With the borrowerRelationship system preference populated, edit a
child record and click the "Add guarantor" button. There are two
fields in the form with the updated labels.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 93d4defeda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b548d4ec6e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 14:28:56 +01:00
1e791581e2 RMaint fix: Add execute perms to 22.11.10.000 dbrev
The 22.11.10 release db_revs file was missing execute permissions, this
adds them and should fix any related build errors
2023-10-17 14:07:30 +01:00
ac7960187d Bug 34513: (QA follow-up) Tidy
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 332b95b250)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e193989419)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:44:38 +01:00
5cca53bdfa Bug 34513: Add checkauth unit test for resetting auth state when changing users
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit abbbc5924d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6c1b969a1f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:44:04 +01:00
e8e75e58a0 Bug 34513: Add end-to-end test for authorization check after first failed authorization
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb581fe78b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 644416222e)
2023-10-17 12:41:37 +01:00
5140a14841 Bug 34513: Set auth state correctly when changing auth sessions
This patch sets the $auth_state to failed when changing auth sessions,
so that the new login attempt gets processed correctly (instead
of skipping the authorization step).

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=baseurl
3. Log in as an OPAC user with 0 permissions
4. Note the auth screen "Error: You do not have permission to access this page"
5. Click "Log in"
6. Note that you're still shown a login screen (and that you've been logged out of
your previous authenticated session)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16da12cbbc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6fc8ea422a)
2023-10-17 12:39:44 +01:00
Evan Giles
8bcd2d54bf Bug 34653: Make koha-foreach return the correct status code
I think the correct behavior for this script should be that koha-foreach
will return 0 (success) if all the commands it tried to run succeeded, but
1 (failure) if any of the commands failed.

To test:
1. $ koha-create --create-db test
2. $ vi test.sh
if [ $USER = 'kohadev-koha' ]; then
    echo "FAILED";
    exit 1;
else
    echo "SUCCESS";
    exit 0;
fi

3. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
4. $ echo $?
5. Note that the exit status is 0 (success)

6. Apply patch

7. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
8. $ echo $?
9. Note that the exit status is 1 (failure)

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d9849aaa3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 392edc1a2f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:36:00 +01:00
05a4e15398 Bug 34748: DBRev 22.11.10.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a06396c282)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6dbd5e5fdb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:32:55 +01:00
Katrin Fischer
ab5a9e3870 Bug 34748: Fix column name in columns configuration for basket table
The first column was named basket_number, but it's actually the
order_line.

To test:
* Edit column configuration for acquisition > basket
* Make sure to set at least one checkbox for 'basket_number'
* Apply patch, run database update
* Verify that the first column is now 'order_line', but your
  settings have been preserved

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f9f9c3a7fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit afcbbb3469)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:31:24 +01:00
f646329ee4 Bug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened
If checkin or renew failed, we should not refresh the table or it will
hide the error message.

Test plan:
Apply the DO NOT PUSH patch
Do a renew
=> No error in the table
Apply this patch
Do a renew
=> You see the error
Revert the DO NOT PUSH patch
Do a renew
=> The table is refreshed

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d80a1df25)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e27ae1d138)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:25:51 +01:00
8f04bc45b4 Bug 34835: Highlight logged-in library in patron searches fix for new staff interface
Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;

This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'

Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
   currently logged in.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9f59ea2f61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3b8187d620)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:24:34 +01:00
61e5d46859 Bug 34848: (QA follow-up) Resolve warn on useless constant
Useless use of a constant ("Dies if sip user cannot be found") in void context at t/db_dependent/SIP/Message.t line 582.

We should remove the comma..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b07842d243)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa117f566b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:20:41 +01:00
eca4b81d87 Bug 34848: Fix SIP/Message.t if DB has been upgraded
There were a lot of failures (in the context of bug 34841)

t/db_dependent/SIP/Message.t .. 2/16
    #   Failed test 'Found AH field as timestamp in response'
    #   at t/db_dependent/SIP/Message.t line 820.

    #   Failed test 'Found AH field as SQL date in response'
    #   at t/db_dependent/SIP/Message.t line 825.
    # Looks like you failed 2 tests of 8.
t/db_dependent/SIP/Message.t .. 3/16

    #   Failed test 'Desensitize flag was set for patron category not in inhouse_patron_categories'
    #   at t/db_dependent/SIP/Message.t line 1133.
    #          got: 'N'
    #     expected: 'Y'

    #   Failed test 'Desensitize flag was set for empty inhouse_patron_categories'
    #   at t/db_dependent/SIP/Message.t line 1139.
    #          got: 'N'
    #     expected: 'Y'

Because renewalsallowed is 0 for upgraded DB, when it's 5 for new
install.

We need to set the value.

This patch also adds some missing transaction

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fd7857e3f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3041af984a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:20:26 +01:00
819b2fec54 Bug 34843: DBRev 22.11.10.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aea9fce4b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9452ff0095)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:19:41 +01:00
b662886e99 Bug 34843: Fix database comment inconsistency on toc_request
Bug 29093 had a dbrev without comment, but added comment to
kohastructure.

Test plan:
Check (or remove) comment on article_requests.toc_request.
Run dbrev.
Check if comment was added (if you removed).
Run t/db/Koha/Database/Commenter.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f809c272af)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5b5b1d90d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:13:04 +01:00
bcb4327ea8 Bug 34054: Allow to embed biblio on GET /items
Test plan:
Request the /items REST API endpoint and ask for the biblio's info to be
embeded into the response passing x-koha-embed

curl -u koha:koha --request GET 'http://localhost:8081/api/v1/items' --header "x-koha-embed: biblio" --header "Content-Type: application/json"

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9afc411a15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cf017af80c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:12:46 +01:00
1cb9b17325 Bug 34054: Add tests
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd0380c272)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66a790e6cd)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
2023-10-17 12:12:34 +01:00
bd8272bebb Bug 34846: Fix SIP/ILS.t if DB has been upgraded
t/db_dependent/SIP/ILS.t .. 12/15
    #   Failed test 'Renewal succeeded'
    #   at t/db_dependent/SIP/ILS.t line 346.
    #          got: '0'
    #     expected: '1'
    # Looks like you failed 1 test of 2.
t/db_dependent/SIP/ILS.t .. 15/15
 #   Failed test 'renew'
 #   at t/db_dependent/SIP/ILS.t line 348.
 # Looks like you failed 1 test of 15.

Because renewalsallowed is 0 for upgraded DB, when it's 5 for new
install.

We need to set the value.

Test plan:
perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only

prove t/db_dependent/SIP/ILS.t

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5f55775f40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb19ca1618)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 11:06:18 +01:00
da3aef00f8 Bug 34844: DBRev 22.11.10.002
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aacbadb22f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bf1eb47651)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 10:41:44 +01:00
2f2962f43d Bug 34844: Add db update file
JD amended patch: tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b46b31998)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f4e867fe32)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 10:37:37 +01:00
3fbcf5d550 Bug 34844: Add manage_item_editor_templates to userpermissions.sql
Test Plan:
1) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t
2) Note failure
3) Apply this patch
4) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t
5) Tests pass!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d2f3ffe7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c580aa2037)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-10-17 10:33:21 +01:00
9cfe5294ff Bug 34794: Fix typo in recalls_to_pull.tt
Fixed typo - it's v its

Test plan:
Look at the bug patch and confirm the change is correct

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b385a2c36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 445ec77de3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:13:52 +00:00
263abb4dc6 Bug 34716: Fix typo
Fixes a typo where "it's" should be "its"

Test plan:
1) Check the commit and observe that the change has been made correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5540d8c94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 61b0558a3c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:13:52 +00:00
6d275bb0f8 Bug 34847: Fix t/db_dependent/Search.t
If 01e still exists then the test will fail with
Truncated incorrect DECIMAL value: '01e' at t/db_dependent/Search.t line 945

Test plan:
% perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only
% prove t/db_dependent/Search.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca3243d00f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fae321c6a7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:54 +00:00
40cef822bb Bug 34730: Add responsive behavior to more tables in the OPAC
This patch adds responsiveness to several DataTables which were not
updated in 32341. The patch removes the CSS-based responsive styling
which was previously used for these tables.

This patch also adds some additional configuration to the tables on the
user home page so that the title column is always prioritized when
DataTables collapses columns in narrow views.

To test, apply the patch and rebuild the OPAC CSS. Ideally this should
be tested with a user who has checkouts, overdues, holds, tags, and a
checkout history.

- Log in to the OPAC and test the user summary page. Check that each
  table adjusts well to narrow browser widths. In each case the column
  containing the title should never be hidden no matter how narrow the
  window:
  - Checkouts
  - Relatives' checkouts (requires that the user is a guarantor for a
    patron with checkouts and that the guarantee's account is set up to
    show checkouts to the guarantor).
  - Overdues
  - Holds
  - Article requests

The new places the responsive DataTables extension is being used:

- Checkout history
- Suggestions
- Tags (in the table of user-submitted tags)
- Most popular

Again, in each case the table should be responsive and the title column
should be prioritized so that it doesn't get hidden at narrow page
widths.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2661943214)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff1b7f74d6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:54 +00:00
Aleisha Amohia
58b17792e4 Bug 34760: Confirm session ID is set to save OPAC search history to logged in user
This patch confirms that a session ID has been set before trying to save search history to a logged in user on the OPAC.

This depends on EnableOpacSearchHistory system preference being enabled.

Apply the patch and test that you don't see an Error 500 page at any point through this plan:

1. Do an OPAC search, ensure you are not logged in
2. Confirm your search was saved to search history
3. Do another search, then log in
4. Confirm you are brought back to the search results after logging in
5. Confirm all search history from the session is visible

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7707b768b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f11452e2dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:53 +00:00
6de1ded81f Bug 33734: Remove incorrect URL escaping on search filters
This patch removes an incorrect URL escaping on search filter
facet URLs.

Without this patch, search filters using non-ASCII characters won't
return results.

To test:
0. Apply patch
1. Enable SavedSearchFilters syspref
2. Search for "the"
3. Save as search filter (to show on both OPAC and staff interface)
4. Search for "ü" in staff interface
5. Apply the "the" filter
6. Note that search results appear
7. Search for "ü" in OPAC
8. Apply the "the" filter
9. Note that search results appear

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 51e602e61c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4a3175b7cf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:53 +00:00
d6dfe009e9 Bug 34732: (QA follow-up): tidy up code
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 703ecab2c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 84ce5d3e2c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:53 +00:00
59f3cd7c21 Bug 34732: For Code39, append or prepend asterisk if missing from barcode
This patch appends or prepends an asterisk on Code39 barcodes if
they are missing from the input. This is so that they form correct
Code39 barcode images.

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl
3. Type 39999000001310 into "Barcode" and click "Show barcode"
4. Note that the barcode text on the right includes asterisks around it
5. Type *39999000001310 into "Barcode" and click "Show barcode"
6. Note the same as above
7. Type 39999000001310* into "Barcode" and click "Show barcode"
8. Note the same as above
9. Type *39999000001310* into "Barcode" and click "Show barcode"
10. Note the same as above

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f888f48fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66e179f905)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:10:52 +00:00
5447d72b93 Bug 32942: (follow-up) Restore missing statuses
At some stage we lost some of the core statuses. This patch simply
adds them back into the list.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e33042105)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 555575745b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:24 +00:00
fe18d04f27 Bug 32942: (follow-up) Fix typo
Spelling typo fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 07a602d995)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6fb3ec5f74)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:24 +00:00
5d4f6d2d00 Bug 32942: (follow-up) Fix test
I missed a test case when doing follow-ups before.. this patch catches
that case and create the required authorized value to allow
ModSuggestion to succeed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 078e98a7a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8558dafce5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:24 +00:00
e03747678b Bug 32942: (QA follow-up) Fix regression test
With the move to checking status during store, we broke the api
regression test introduced earlier in the patch set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8eb27c40e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6444a30adc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:23 +00:00
b735d4ad66 Bug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40ca7aa06c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ea062497a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-12 16:00:23 +00:00