Commit graph

52233 commits

Author SHA1 Message Date
Emily Lamancusa
f726c7ebfe Bug 35934: Correct missed case of switching items.transfer to transfer in detail.tt
To test:
1. Put an item with no holds/recalls in transit (manually or by checking
  it in at a branch other than its homebranch to trigger a ReturnToHome)
2. Go to the item's bib record
--> Note that the item's status will display as something like,
    "In transit from X to Y since 01/29/2024 Available"
3. Apply patch and refresh the page
--> Note that item now shows only the transit status, but not "Available"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 687963b016)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:23:10 +01:00
3e0bab0bb9 Bug 36224: Remove unused spsuggest from templates
To test:
-APPLY PATCH
-Review the OPAC results and staff interface results pages.
-Nothing should change, it would be impossible to end up inside of the [% IF koha_spsuggest %] condition because there is nothing like that in the scripts!

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 e07c6d0729)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:20:29 +01:00
Laura Escamilla
c8d97a97a1 Bug 36292: Fixed 'See all charges' hyperlink for guarantees/guarantor linked charges
To test:
1. Add a guarantee / guarantor relationship for two patrons.
2. Add a manual fee to the guarantees' account.
3. Go to the guarantor's account and view the 'Details' tab. Under contact information there should be a Guarantees section. There you will see the charges for your guarantee. Click on ‘See all charges’. The link leads you no where.
4. Apply the patch and restart_all
5. Refresh the guarantor’s page and click on ‘See all charges’ again. This time it will take you down to the ‘Guarantees’ Charges’ panel.
6. Sign off and have a great day! :D

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 e2d54b1279)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:18:13 +01:00
72e78f72a3 Bug 36298: In patrons search fix road type with authorized value
In new patrons search via API, the road type code is displayed in patron address instead of authorized value description.

Also road type is missing a space separator in DE and FR format.

Test plan :
1) Create two entries in authorized value category "ROADTYPE" :
   R1 "Road"
   R2 "Street"
2) Edit a patron (ie Delgado, Floyd) to set road type to "Road"
3) Perform a search on patrons (click on letter D)
4) Check you see in address "Road" and not "R1"
5) Edit authorized value category "ROADTYPE" to delete entry "R1"
6) Perform a search on patrons (click on letter D)
7) Check you see in address "R1"

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 3c0ac4cb9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:17:06 +01:00
6d1125fa8f Bug 35997: (QA follow-up) Number of tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 304d8e17d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:14:59 +01:00
5a281485c6 Bug 35997: Cancelling a hold should remove the hold from the queue
Test plan:
1) Place a hold for a record for a patron
2) Build the holds queue
3) Note the holds queue contains a match for that patron and record
4) Cancel the holds queue
5) Reload the holds queue page, note the match for  that patron and
   record is gone!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4d2df6f985)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:14:59 +01:00
9f10949c6b Bug 35997: Add tests
Test plan: see next patch

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit eff15066b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:14:59 +01:00
5710afb1cd Bug 36332: Add missing semicolon in moremember.tt
It's fixing a JS error
Uncaught ReferenceError: script is not defined

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 23b05e812a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:10:37 +01:00
e5cdf2bbc1 Bug 35796: Properly set patron_expiration value
To test:
1) Set an expiration on the password in a patron account and save.
2) Go to patron details (moremember.pl) and confirm the password has an expiration.
3) Edit the patron account without touching anything and save the account.
4) Go back to patron details (moremember.pl) and note that the expiration on the password has been removed.
5) APPLY PATCH
6) Try 1 - 4 again except this time password expiration is not removed.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

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 60dcb2b077)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:09:26 +01:00
b5755796a8 Bug 35473: Also disable the plugin
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 293d9c66ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:04:51 +01:00
fff9f77a93 Bug 35473: Handle room reservations plugin conflict
We now look for the existance of the room reservations 'bookings' table
prior to attempting to install the core bookings table and migrate it in
the same way the upstream plugin does before proceeding with installing
the core bookings tables.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 af47cc3056)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 10:04:51 +01:00
1a2c3ce39b Bug 36233: Set select2 width to 100%
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 638b5ef1b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:57:08 +01:00
e6e927fa9d Bug 36233: (follow-up) Fix width and enable clear option
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c29390736f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:57:08 +01:00
bb5fd20c68 Bug 36233: Use select2 to load vendors on invoice search
This patch moves the dropdown to use select2 and avoids loading all
vendors at page load.

To test:
 1 - Create some extra vendors in your system, ideally over 20
 2 - Search for a vendor in acquisitions
 3 - Click 'Invoices'
 4 - Note the dropdown of all vendors 'Vendor:' in search bar on left
 5 - The vendor you came from shoudl eb selected
 6 - Apply patch
 7 - Repeat
 8 - Note only a partial list of vendors is loaded, confirm current vendor still selected
 9 - Search in the dropdown and confirm vendors are returned
10 - Select a vendor and search
11 - confirm selection is retained

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6b1b371888)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:57:08 +01:00
da258a3195 Bug 33898: Implement reaping for database polling
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e29e058851)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:56:02 +01:00
7aa97b161c Bug 33898: Alternative approach with receive frame timeout
See bug 33898 comment6.

Test plan:
Based on comment12: Stage MARC import and manage. Look at the same
time to the results of ps aux|grep Z. Verify that the lines with
[background_jobs] <defunct> disappear within 10 seconds.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bc42006019)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:56:02 +01:00
5d73ff2da1 Bug 32671: Prevent selenium/basic_workflow.t to fail if run on slow servers
When submitting the form to create a new patron we are doing a POST
memberentry.pl that is redirecting to moremember.pl

The selenium test is expecting for the end of the request to test the
page's title against "Patron details for ".

But it's only waiting for the POST response (302), not the GET
moremember that will display the patron's details.

You can simulate a slow server using cpulimit: `cpulimit -b -p $PID -l 1`
replacing $PID with the pid of the starman process.

Note that other tests are failing using 1%, but... baby steps.

The current failre:
 #   Failed test at t/db_dependent/selenium/basic_workflow.t line 122
 Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125
 #                   'Add patron (test cat description) › Patrons › Koha'
 #     doesn't match '(?^u:Patron details for test_patron_surname)'

The next one (NOT fixed by this patch):

 #   Failed test at t/db_dependent/selenium/basic_workflow.t line 256.
 #                   '
 #
 #             Checkouts (0)#         #         '#     doesn't match '(?^u:Checkouts \(1\))'
 t/db_dependent/selenium/basic_workflow.t .. 14/22 #   Failed test at t/db_dependent/selenium/basic_workflow.t line 256.
 #                   '
 #
 #             Checkouts (1)
 #
 #         '
 #     doesn't match '(?^u:Checkouts \(2\))'
 t/db_dependent/selenium/basic_workflow.t .. 16/22 #   Failed test at t/db_dependent/selenium/basic_workflow.t line 256.
 #                   '
 #
 #             Checkouts (2)
 #
 #         '
 #     doesn't match '(?^u:Checkouts \(3\))'

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4e166e07c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:54:37 +01:00
408730bca7 Bug 36215: (QA follow-up) Fix &? confusion
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dee7ad88a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-18 09:50:07 +01:00
e196ce3849 Bug 36232: Fix error in DBRev dealing with OAI-PMH:AutoUpdateSetsEmbedItemData typo
This patch fixes the case of the wrong syspref variable co-existing with
the good one.

OAI-PMH:AutoUpdateSetsEmbedItemData is the only case, as the rest of the
mispelled ones are just case fixes, which would not trigger the same
situation as the `systempreferences` table collation is
case-insentitive.

To test:
1. Run:
   $ ktd --shell
  k$ koha-mysql kohadev
   > INSERT INTO systempreferences VALUES ('OAI-PMH:AutoUpdateSetEmbedItemData',0,'','','YesNo');
   > UPDATE systempreferences SET variable = 'IllCheckAvailability' WHERE variable = "ILLCheckAvailability";
   > INSERT INTO systempreferences VALUES ('IllCheckAvailability',0,'','','YesNo');
=> FAIL: The last command fails because the good and wrong values cannot
coexist
2. Set the version to a prior one:
   > UPDATE systempreferences SET value="23.1200004" WHERE variable like 'version';
3. Run:
  k$ updatedatabase
=> FAIL: You get this error:
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'OAI-PMH:AutoUpdateSetsEmbedItemData' for key 'systempreferences.PRIMARY' at ...
4. Apply this patch
5. Repeat 3
=> SUCCESS: It works!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Mohd Hafiz Yusoff <mhby87@gmail.com>
Signed-off-by: Mohd Hafiz Yusoff <mhby87@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c73c27e02d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-13 09:10:31 +01:00
9ec9fc3d78 Bug 36215: Remove limit on fetching bookings
This removes the paging from the bookings request so we take into
account all bookings.

We may want to replace this with date bounded paging in the future, but
lets not try to optimise until we need to.

To test:
 1 - Find a record detail page in Koha staff interface
 2 - Click on a barcode to go to items tab
 3 - Edit 'bookable' to 'yes'
 4 - Return to details page
 5 - Place 5 bookings on a record
 6 - Set system preference RESTDefaultPageSize  2
 7 - Click the 'Bookings' tab on the record details
 8 - Confirm onyl 2 bookings shown in calendar view
 9 - Apply patch, reload
10 - All bookings now show in calendar

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1201a73967)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-13 09:04:04 +01:00
fdd7731a46 Revert "Bug 34755: Backport Koha::Token change from bug 34478"
This reverts commit 46c0419a11.
2024-03-12 14:14:27 +01:00
46c0419a11 Bug 34755: Backport Koha::Token change from bug 34478
This change includes the Koha::Token changes which uses
Koha::Session for generating and checking CSRF tokens.

0. Apply the patch and koha-plack --restart kohadev
1. Setup Keycloak OIDC SSO according to "Testing SSO"
wiki guide
2. In a regular window go to http://localhost:8080
3. In a private window go to http://localhost:8080 and click
the SSO "Log in with..." button, but don't log into Keycloak
4. In the regular window, login locally, and navigate to 5-6 pages
5. In the private window, log into Keycloak
6. Note that you are redirected back to Koha and logged in
successfully (no wrong_csrf_token error).

Signed-off-by: Olivier Hubert <olivier.hubert@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-03-12 12:05:05 +01:00
97026a069d Bug 35955: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0631153f06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-12 11:55:23 +01:00
222777ba98 Bug 35955: Cache CSRF token in template plugin
This change uses the Koha::Cache::Memory::Lite cache to
cache the CSRF token, so that it is only generated once,
and is re-used by the Koha::Template::Plugin::Koha object
throughout the entire template processing for the HTTP request.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 108c955eac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-12 11:55:23 +01:00
e0f35d65e2 Bug 36066: (follow-up) Move 403 to 409 when status ne cancelled
Test plan:
Run t/db_dependent/api/v1/acquisitions_orders.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4032da3f96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:35:52 +01:00
1c556d6ed1 Bug 36066: Only allow cancelled order deletion in API
Note: I had trouble with listing orders in API without
status, although formally not required according specs.

Test plan:
Run t/db_dependent/api/v1/acquisitions_orders.t

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dcbda39c0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:35:52 +01:00
1bc64dcef4 Bug 36066: Add tests
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] As Victor discovered, the test with status new in subtest
'delete' needed the authorised user now.

Test plan:
Run t/db_dependent/api/v1/acquisitions_orders.t
Without the follow-up patch this should FAIL.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8bb61c4f88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:35:52 +01:00
fdc2bbb76f Bug 35983: Remove extra selected=selected from dropdown menu
To test:
1. Admin > Circ & fine rules
2. Select a library at the top of the forms ( #selectlibrary )
3. Try to change the 'Refund lost item replacement fee' to "Refund lost item charge (only if unpaid)".
4. Press save and let the page reload.
5. Look at the dropdown again, the value is now set to "Refund lost item charge and restore overdue fine".
6. APPLY PATCH
7. Try steps 2 - 5 again but this time the value in the dropdown should not change.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit af5453bbd2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:34:01 +01:00
Shi Yao Wang
8644a1165f Bug 35916: Purchase suggestions bibliographic filter should be a "contains" search
Make all bibliographic information fields filter do a contain match
rather than an exact match

Test plan:
1. Create a purchase suggestion with a multi-word title (e.g. one day in december)
   1.1. Go to Acquisitions > Suggestions > New purchase suggestion
   1.2. Enter a title (e.g. one day in december)
   1.3. Click on Submit your suggestion

2. Search for one of the words in the title
   2.1. In the "Filter by" section, click on Bibliographic information
   2.2. In the title field, enter one of the words of the title (e.g. december)
   2.3. Click Go
   --> No results

3. Apply the patch
4. Redo step 2 and notice there is now a valid result

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 3d7ea3bd99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:30:25 +01:00
de4f54b3fa Bug 36103: Remove the "Cancel hold" link for item level holds
This link is broken and doesn't make sense from a UI/UX perspective
and thus should be removed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c91a43ca1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:29:27 +01:00
ea66e6bf5b Bug 35950: Adjust tests
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 85f316f9c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:20:33 +01:00
9b2d032d1e Bug 35950: Move AddReturn call into circulation.pl
There should be no change in beahavior. Following the test plan from Bug 35840.

To test:
1. APPLY PATCH, restart_all
2. Turn on RecordLocalUseOnReturn
3. Create a Statistical patron.
4. Check an item out to a regular patron.
5. Check the item out to a Statistical patron.
6. This should trigger a return and you will see 2 entries in the statistics table, one for localuse and one for a return.
7. Try checking out an item to the Stats patron that is NOT checked out.
8. You should only see 1 entry, localuse, in the statistics table.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 834bff6317)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:20:33 +01:00
c2f992e7a0 Bug 35840: (QA follow-up) Tidy and critic fix
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e0554260c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:19:07 +01:00
a2848e9ee8 Bug 35840: Add unit tests
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8b14aca56c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:19:07 +01:00
fb1a9b949a Bug 35840: Add option to AddReturn to skip recording of localuse
To test:
1. APPLY PATCH, restart_all
2. Turn on RecordLocalUseOnReturn
3. Create a Statistical patron.
4. Check an item out to a regular patron.
5. Check the item out to a Statistical patron.
6. This should trigger a return and you will see 2 entries in the statistics table, one for localuse and one for a return.
7. Try checking out an item to the Stats patron that is NOT checked out.
8. You should only see 1 entry, localuse, in the statistics table.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ffc722554e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:19:07 +01:00
Shi Yao Wang
d35481b1ab Bug 35911: Make archived suggestions not show in patron's account
Remove archived suggestions in patron's account page

Test plan:
1. Go to a patron's account in the staff interface
2. Go to the Suggestions tab
3. Click New purchase suggestion and create a suggestion
4. In another browser tab, go to Acquisitions > Suggestions
5. Click the small arrow next to the edit button to the right of the suggestion, and choose Archive (alternatively, check the suggestion's box and click Archive selected)
   --> Suggestion disappears from the suggestions management page (OK)
6. Go back to the tab with the patron's account and refresh
   --> Suggestion is still visible
7. Apply the patch
8. Redo step 6 and notice the suggestion is not visible anymore
9. Redo step 4 and 5 but this time, unarchiving the suggestion
10. Redo step 6 and notice the suggestion is back

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 ac71adbd23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:16:17 +01:00
b8bc451938 Bug 35718: Remove ES6 warnings branches.tt
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a0db6c1c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:13:54 +01:00
f3733ae8d6 Bug 35718: Remove ES6 warns from JS system preferences
To test:
1. Add some JS like this to any of the UserJS system preferences:

$(document).ready( function() {
    let something = 1;
    const another_thing = 2;

    let an_arrow_function = (a, b) => a + b;
    console.log( an_arrow_function(something, another_thing) );
});

2. Notice the icons and warnings to the left of the line numbers:

let is available in ES6
const is available in ES6
arrow_function_syntax is available in ES6

3. APPLY PATCH
4. Try steps 1 and 2 again, the warnings should be gone.
5. Check that the JavaScript still works, in my example it should console.log 3.

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 5e3ae14aa0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:13:54 +01:00
Laura Escamilla
17ba879fec Bug 36004: Fixed typo in successfully
To test:

1. Turn on the syspref 'OpacCatalogConcerns'

2. Go to view a record in the OPAC and click on "Report a concern" in
   the column located on the right-hand side.

3. Fill out the title on the form and leave everything else the same.
   Click on submit and notice that the message on the screen says "Your
   concern was sucessfully submitted."

4. Apply the patch.

5. Submit a new concern. Notice that the text now has "successfully"
   spelled correctly.

6. Sign off and have a great day! :D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6bf839d892)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:11:14 +01:00
Laura Escamilla
72dd84251e Bug 36005: Fixed typo in "Your concern was successfully submitted." text
To test:

1. Turn on the syspref 'CatalogConcerns'

2. Go to view a record in the staff intranet and click on "New catalog concern" which is located in the "+New" dropdown.

3. Fill out the title on the form and leave everything else the same. Click on submit and notice that the message on the screen says "Your concern was sucessfully submitted."

4. Apply the patch.

5. Refresh the page and submit a new concern. Notice that the message now has "successfully" spelled correctly.

6. Sign off and have a wonderful day! :D

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fcf48c55f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 15:10:24 +01:00
f552f23d93 Bug 36070: Fix CSS class
1) Enable UseRecalls
2) Checkout an item to a patron:
   Top INTRA search bar: pick 'check out' and paste a patron
   cardnumber:
   23529000035676
   press enter
3) Enter an item barcode:
   39999000003154
   Press checkout
4) As user koha/koha, visit OPAC page for this biblio:
   opac-url/cgi-bin/koha/opac-detail.pl?biblionumber=76
5) Notice all sidebar actions on the right have hover effect except for
   'Place recall'

Apply patch, repeat test plan.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0bdd12ea22)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:41:06 +01:00
Raphael Straub
0e511dffcf Bug 36032: Use a single angle in the "Next" button
The "Next" pagination button in the OPAC result list has a double angle
whereas the "Previous" button only has a single angle. This patch fixes
that error.

To test:
1) Do a search in the OPAC with more than one page of results.
2) Observe that the "Next" button has a double angle whereas the
   "Previous" button has only a single angle.
3) Apply the patch.
4) Repeat steps 1 and 2.
5) Verify that the "Next" button now has a single angle.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c1ce64593)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:30:42 +01:00
e37c7d27e1 Bug 35538: Sort OPAC self registration library list by library name
This patch modifies opac-memberentry.pl so that the list of libraries is
sorted by library name instead of library code.

To test, apply the patch and restart services.

- If using the default testing data you'll have to go to Administration
  -> Libraries and edit one or more libraries so that the library name
  is alphabetically different than the library code. e.g. Centerville ->
  Zanzibar.
- Go the OPAC and click "Create an account" (requires the
  PatronSelfRegistration system preference).
- Under "Home library," the dropdown of libraries should be ordered by
  library name.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5998fe93f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:29:25 +01:00
fa4ce83a9d Bug 35357: Enhance unit tests
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Fixed typo in test output.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 285a0fc74d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:25:23 +01:00
b91c1d6005 Bug 35357: Remove item from holds queue when it is checked out
Test Plan:
1) Place a hold on an item
2) Build the holds queue
3) Check out the item to a different patron than the one
   targeted in the holds queue
4) Verify the holds queue viewer still shows that item and patron
5) Apply this patch
6) Repeat stepts 1 through 3
7) Verify the holds queue viewer no longer shows that patron and item!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0eced80866)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:25:23 +01:00
29fd20e068 Bug 35357: Add unit test
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0e11bc0de5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:25:23 +01:00
26ba5fba8b Bug 36056: Clarify subpermissions AND behavior
Working on bug 31791, I found myself wondering if our current recursive
code in C4::Auth::haspermission() would allow checking AND on
subpermissions.

As it is not documented in the POD or tested, I decided to write some
unit tests for it.

It turned out it was well supported, so I decided to submit the tests,
and a small tweak in the POD to reflect that.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Auth/haspermission.t
=> SUCCESS: Tests pass! The code supports AND on subpermissions!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit aa1049fdd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:23:45 +01:00
118012dcd8 Bug 35469: Add 'manage_bookings' permission to biblios/checkouts
This patch adds the manage_bookings subpermission check to the
biblios/{biblio_id}/checkouts endpoint and updates the corresponding
unit test too.

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 5e0afb772a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:22:54 +01:00
0d028159e5 Bug 35469: Add 'manage_bookings' subpermission to /checkouts
This patch adds the 'manage_bookings' permission to allow fetching of
checkouts on the API should the user have 'manage_bookings' but not have
'circulate_remaining_permissions'

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 30b3a8c382)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:22:54 +01:00
9e50622d26 Bug 35773: Add manage_bookings subpermission to patron searching
This quickly fixes the issue to allowing those who have the
manage_bookings subpermission to also search for users.

It's deliberately bare as I'm keen to subsequently remove it again in
bug 29509 where we will deal with this properly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 52fbb93cda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-11 11:22:07 +01:00