Commit graph

7375 commits

Author SHA1 Message Date
b52c32e13e
Bug 33237: (QA follow-up) Remove hardcoded kohadevbox path
Test plan:
Run Letters.t (outside kohadevbox :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:40 +02:00
b1fe94cd58
Bug 35285: (QA follow-up) Tidy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:38 +02:00
64a9e3c999
Bug 35285: Unit tests
This patch adds unit tests for the new 'is_html' function introduced in
Koha::Notice::Message and update the tests to include the new plaintext
handling of html_content.

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

test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:37 +02:00
b77cb006f1
Bug 36793: Unit test
This only applies to 'local' preferences.

Test plan:
Run sysprefs.t with/without second patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:34 +02:00
e62468de2e
Bug 28869: Unit tests
Test plan:
Run t/db_dependent/AuthorisedValues.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-17 10:36:24 +02:00
b31c732105
Bug 19613: Scrub borrowers fields: borrowernotes opacnote
To prevent XSS

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-05-14 15:04:34 -03:00
69c64bcb72
Bug 35362: Adjust other "Close window" clicks
Previous patch "Bug 35362: (follow-up) Fix guaruntor preview modal close in test"
didn't adjust the other occurrences.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-14 15:34:26 +02:00
33e9127082
Bug 36018: Prevent random failure from api/v1/acquisitions_orders.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-14 15:34:26 +02:00
150914e234
Bug 34788: (follow-up) Fix unit tests
prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-13 16:24:19 +02:00
b7e5dab1e7
Bug 30047: (follow-up) Fix failing tests
This patch updates the test files to correctly create authorities and/or correctly
mock the needed data for authorities.

the tests in t/db_dependent/Authority/Merge.t cover the case of 'Default' authorities
which don't have valid headings - so I had to add handling for blanking the heading field
when Default type is used.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-13 16:24:18 +02:00
43eb61f0d8
Bug 29948: Adjust sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-13 16:24:17 +02:00
40ca270825
Bug 29948: OPACAuthorIdentifiersAndInformation
This patch merge the previous patch attempt with the existing OPACAuthorIdentifiers syspref.

It creates a new syspref OPACAuthorIdentifiersAndInformation and remove
OPACAuthorIdentifiers.
"identifiers" become an entry of the new syspref.

Test plan:
Select some entries in OPACAuthorIdentifiersAndInformation
Edit an authority record and enter data in the corresponding subfield
(the list is on the syspref entry)
Go to the biblio detail page or the authority detail page at the OPAC
and notice that the info you selected are correctly displayed.

Sponsored-by: Orex Digital

Signed-off-by: Signed-off-by: Hugo Agud <hagud@orex.es>
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>
2024-05-13 14:00:10 +02:00
391aeaa9a8
Bug 35994: (QA follow-up) Fix Biblio.t
A follow-up changed orders->cancel a bit. This test assumed to
cancel completed lines here. So we are doing it now with a
direct update to have the original result.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:54 +02:00
9f8186eaa1
Bug 35994: Add $biblio->acq_status
This allows you to see quickly if a biblio has linked orders or not.
And if they are all cancelled, or some still in processing, or some
are complete (and the rest cancelled).

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:53 +02:00
c3df59e860
Bug 30047: Unit tests
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>
2024-05-10 16:45:51 +02:00
Julian Maurice
8d24f3e80e
Bug 36486: Fix file perms and tidiness
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:49 +02:00
Julian Maurice
e6382d04ad
Bug 36486: Add tests for Koha::DateTime::Format::SQL
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:49 +02:00
94d5bd4f02
Bug 36018: (follow-up) Do not rely on assumed correct quantities
Now filter_by_active checks quantities, we should ascertain that
our test data is correct, not leaving it to random values from
TestBuilder.

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:47 +02:00
d563baa853
Bug 36018: $orders->filter_by_active should check quantityreceived
An active order that has no items to receive any more is actually
not very active anymore :)

Test plan:
Run t/db_dependent/Koha/Acquisition/Orders.t
Enable OPACAcquisitionDetails.
Add order on basket for new biblio. Check that opac-detail does not
yet count the item as on order (since status is still new).
Close basket. Check opac-detail again. Should count it now.
Reopen basket. Cancel line. Check opac-detail again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:47 +02:00
21c87aeb15
Bug 36018: biblio->active_orders should be ->uncancelled_orders
Active orders are more than just not cancelled. See filter_by_active
in Koha::Acquisition::Orders. They are still in the acq process; we
still need to receive items on those orders.

When we cancel and want to delete a biblio, we should check for not
cancelled orders (broader than active orders as in Orders.pm).

Test plan:
Git grep active_orders.
Run t/db_dependent/Koha/Biblio.t
Run t/db_dependent/Koha/Acquisition/Order.t
Add two order lines in a basket referring to same biblio. Try to
cancel with delete biblio. Should not be possible.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:46 +02:00
b7448dbd75
Bug 36018: Rename orders->filter_by_current
Current is a bit misleading here. It means the ones that are not
cancelled.
We already use the filter_out_etc naming schema. So in harmony with
that, we switch it to filter_out_cancelled.

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t
Run git grep -l '::Orders' | xargs grep filter_by_current
* All occurrences should be related to Recalls, not Orders.
Go to acqui/basket.pl. Delete a whole basket who has some active
and some cancelled lines.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:46 +02:00
26014e62da
Bug 35907: Add ability to log all custom report runs with or without query
Because of the way Koha::Logger has been used to log to different categories based on the interface and caller, it can be extremely hard to log all of a particular log statement to one place.

For custom report runs, the category is plack-intranet.C4::Reports::Guided when run from the web interface, cron.C4::Reports::Guided when run from runreport.pl, and plack-intranet.C4::Auth when run from svc/report.

We should add a more standardized report run log, both with and without the full query, so that administrators can log all report runs to a centralized location. If an administrator were to need the "point of entry" for reports, it is easy to include via parameters in PatternLayout.

Test Plan:
1) Apply this patch
2) Modify your log4perl file, add the following:

log4perl.logger.reports.execute.time = INFO, REPORTTIME
log4perl.appender.REPORTTIME=Log::Log4perl::Appender::File
log4perl.appender.REPORTTIME.filename=/tmp/report-time.log
log4perl.appender.REPORTTIME.mode=append
log4perl.appender.REPORTTIME.layout=PatternLayout
log4perl.appender.REPORTTIME.layout.ConversionPattern=[%d] [%p] [%P] %m%n
log4perl.appender.REPORTTIME.utf8=1

log4perl.logger.reports.execute.query = INFO, REPORTQUERY
log4perl.appender.REPORTQUERY=Log::Log4perl::Appender::File
log4perl.appender.REPORTQUERY.filename=/tmp/report-query.log
log4perl.appender.REPORTQUERY.mode=append
log4perl.appender.REPORTQUERY.layout=PatternLayout
log4perl.appender.REPORTQUERY.layout.ConversionPattern=[%d] [%p] [%P] %m%n
log4perl.appender.REPORTQUERY.utf8=1

3) Restart all the things!
4) Run a report somehow:
   CLI: ./misc/cronjobs/runreport.pl 1
   API: /cgi-bin/koha/svc/report?id=1
   Web: /cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Run this report
5) Note the report runs are logged to /tmp/report-time.log and /tmp/report-query.log

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:45 +02:00
ac5084641e
Bug 26567: Allow to limit subscription search to subscriptions with routing lists
Adds a search option to the advanced search in the
serials module that allows to limit search on subscriptions
with routing lists.

Test plan:
1. Apply this patch
2. Create two subscriptions, one with a routing list and one without
3. Navigate to Serials home and tick the checkbox labeled "Search routing lists only:"
4. Confirm that the only search result to appear is the subscription you added the routing list to
5. Run unit tests: prove t/db_dependent/Serials.t

Sponsored by: Bibliotheksservice-Zentrum Baden-Wuerttemberg

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Perltidied changes to make QA test tools pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:44 +02:00
d2820f57d6
Bug 34788: (QA follow-up)
This patch fixes a few things:
1) The blue dialog box now clears when navigating away from the page
2) The background job now uses skip_record_index to avoid queuing indexing jobs for every new biblio and instead queues one job at the end
3) Large files that get chunked now successfully create linked biblios if requested
4) Title matching rules have been expanded to check the package ID so that we can have duplicate titles in different packages
5) A link to the package is now included on the job report page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 15:19:09 +02:00
e8763a720c
Bug 34788: Allow import of file with additional columns
This patch allows a file with additional columns to be imported. When the file is submitted, the system will enqueue the background job and send back information to the UI that certain columns have been ignored. The data will stil l import as normal but only the standard KBART columns will be parsed and imported

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 15:19:09 +02:00
d31f453186
Bug 34788: Make biblio creation optional
This patch rebases in the changes from bug 36618 to make biblio creation optional

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 15:19:08 +02:00
3814437003
Bug 34788: Allow for import of CSV files
This commit allows CSV files to be imported alongside TSV files.
It also adds some performance improvements relating to the max_allowed_packet and the matching of titles, as well as some small bugfixes and unit test changes

Test plan:
1) Enable the ERM module
2) Navigate to E-resource management > eHoldings > Local > Packages
3) Create at least one package
4) Navigate to E-resource management > eHoldings > Local > Titles
5) There should be a button for "Import from KBART file"
6) Click this button
7) Select the package that you created from the dropdown and then choose your KBART file using the "Choose file" button. I have attached some example files to the bug but feel free to use your own if you have them.
8) Click Submit
9) If your file is a valid file, a background job will be queued, if not then a warning will display showing what is incorrect in your file
10) To test the file format warning, edit your file and add a random column heading into the file e.g. test_column. When you upload it, the warning should show that an invalid column "test_column" has been detected
11) Click on the background job. (If you have uploaded a very large file, the system will chunk the file into smaller pieces and create multiple background jobs)
12) It should display a progress bar followed by a report and any error messages
13) Navigate to E-resource management > eHoldings > Local > Titles and you should see your new titles.
14) Run the unit test: prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 15:19:08 +02:00
4760863cfb
Bug 34788: Add unit test
Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 15:19:07 +02:00
22376af401
Bug 36503: (follow-up) Fix tests count
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:53 +02:00
3c07553b36
Bug 36503: Move and update unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:53 +02:00
4417811d9a
Bug 36503: Fix unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:52 +02:00
Raphael Straub
911342ffec
Bug 36503: Add a plugin hook after user authentication
This plugin hook allows to change patron data or define the patron
based on the authenticated user.

To test: Run
prove t/db_dependent/Koha/Auth/Client.t

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:50 +02:00
b099f62bfc
Bug 31627: (follow-up) Update -Id to -ID
This also makes it match with the Message-ID.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:50 +02:00
c71e9f1e40
Bug 31627: (QA follow-up) Tidy test block
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:49 +02:00
298abcb4cb
Bug 31627: (QA follow-up) Catch more locations
This patch moves the header set into Koha::Email->create and passes the
template_id in a few additional locations to ensure we catch more cases.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:49 +02:00
46c5a51d58
Bug 36774: Add cypress tests
Inside k-t-d, run:
cypress run --spec t/cypress/integration/flatpickr_spec.ts

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:43 +02:00
5c43883a7c
Bug 36582: Fix regressions.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 14:11:41 +02:00
650065fcd2
Bug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only
The tests are no longer relevant

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-05-09 09:32:59 +01:00
26e7ed29af
Bug 36687: (RM follow-up) Fix more unit tests
Use currency.active to test `int(1) DEFAULT NULL` now that itemtypes.notforloan
is `NOT NULL DEFAULT '0'`

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-05-09 09:22:07 +01:00
fba56f0178
Bug 36687: (RM follow-up) Fix unit tests
Set notforloan to '0' as apposed to 'undef' for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-05-09 09:22:00 +01:00
b0bf535881
Bug 36618: Add unit tests
prove t/db_dependent/api/v1/erm_eholdings_titles.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-08 20:04:08 +02:00
8017e60397
Bug 32693: Fix history.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-08 18:23:57 +02:00
a654faf72e
Bug 36750: Fix aria-label for show more/less links
Didn't manage to keep the more_less_labels because of the space in the
key names

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-07 17:41:19 +02:00
98a1f17501
Bug 36396: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-07 15:53:55 +02:00
7f22156b8f
Bug 34972: (QA follow-up) Remove second transfer from Circulation.t
Removing the manual transfer and rightaway doing the Reserve
transfer. One test description was misleading too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-07 15:53:43 +02:00
Emily Lamancusa
dc00e55a32
Bug 34972: Remove GetOtherReserves
GetOtherReserves attempts to set the waiting/transit status for the next
hold on the list when applicable, but in practice it either leaves the
hold state unchanged, or sets the itemnumber without setting the found
status (erroneously converting bib-level holds to item-level holds).

The latter situation only occurs when the user has been prompted to
confirm, cancel, or revert the hold, and is able to ignore the prompt.
In those situations, the hold's state should not change.

GetOtherReserves does not need to change the hold state, and it does not
do so correctly. Besides that, it does not do much other than call
CheckReserves, and is only used in 3 places.

This patch removes GetOtherReserves, and refactors returns.pl and
C4::Reserves::ModReserveCancelAll to call CheckReserves directly instead.

To test:
1. Place 2 bib-level holds for 2 different patrons (Patron A and Patron
    B) on the same record, both for pickup at the logged-in library
2. Check in an item from that record to fill Patron A's hold
3. Set the hold's expiration date to yesterday by accessing the database
    in the command line:
    - In a ktd shell prompt, open the db client with koha-mysql kohadev
    - UPDATE reserves
        SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
        WHERE borrowernumber = <Patron A's borrowernumber>
4. Go to Circulation > Holds Awaiting Pickup, and find the hold in the
    "holds waiting past their expiration date" tab
5. Click the "Cancel hold" button in the Actions column next to the hold
   (do not check in the book)
6. Return to the bib record and look at Patron B's hold
--> Note that Patron B's hold is now an item-level hold and does not
    have a waiting status

7. Cancel Patron B's hold
8. Place 2 new holds on the record: one for Patron A at the logged-in
    library, and one for Patron B at a different library
9. Check in an item to fill Patron A's hold
10. Repeat steps 3-5 to expire and cancel Patron A's hold
11. Return to the Holds tab of the bib record and look at Patron B's hold
--> Note that Patron B's hold is now an item-level hold, and there is no
    "Revert transit status" button

12. Place 2 bib-level holds for 2 different patrons (Patron A and Patron
    B) on the same record, both for pickup at the logged-in library
13. Check in an item from that record to fill Patron A's hold
14. Check in the same item again. A modal will pop up, saying that the
    hold is already waiting
15. In the modal, choose a cancellation reason and click "Cancel hold"
--> A new modal will pop up to fill Patron B's hold
16. Click "Ignore" on the modal for Patron B's hold
17. Return to the bib record and look at Patron B's hold
--> Note that Patron B's hold is now an item-level hold and does not
    have a waiting status

18. Apply patch
19. Repeat steps 1-6
--> Note that Patron B's hold is still a bib-level/"next available" hold
20. Repeat steps 7-11
--> Note that Patron B's hold is still a bib-level/"next available" hold
21. Repeat steps 12-17
--> Note that Patron B's hold is still a bib-level/"next available" hold

Make sure correct behavior is unchanged:

22. Cancel Patron B's hold
23. Place 2 new holds on the record: one for Patron A at the logged-in
    library, and one for Patron B at a different library
24. Check in an item from that record to fill Patron A's hold
25. Check in the same item again. A modal will pop up, saying that the
    hold is already waiting
26. In the modal, choose a cancellation reason and click "Cancel hold"
--> A new modal will pop up to fill Patron B's hold
27. Click "Print slip, transfer, and confirm" on the modal for Patron B's hold
--> Confirm that the information on the slip is correct
--> Confirm that the hold is correctly put in transit

22. Set HoldsAutoFill and HoldsAutoFillPrintSlip to "Do"

23. Place a bib-level hold for the logged-in library
24. Check in an item from that bib
--> Confirm the information on the slip is correct
--> Confirm the hold is correctly assigned and set to waiting
25. Place a bib-level hold for a different library
26. Check in an item from that bib
--> Confirm the information on the slip is correct
--> Confirm the hold is correctly put in transit
27. Change the logged-in branch to match the hold pickup location
28. Check the item in
--> Confirm the information on the slip is correct
--> Confirm the hold is correctly assigned and set to waiting

29. Repeat steps 22-26
--> Confirm a correct hold slip pops up for Patron B's hold
--> Confirm that Patron B's hold is correctly put in transit
30. Cancel Patron B's hold
31. Place 2 bib-level holds for 2 different patrons (Patron A and Patron
    B) on the same record, both for pickup at the logged-in library
33. Repeat steps 24-26
--> Confirm a correct hold slip pops up for Patron B's hold
--> Confirm Patron B's hold is correctly set to Waiting

34. Prove t/db_dependent/Circulation.t
35. Prove t/db_dependent/Koha/Holds.t
--> Tests pass

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>
2024-05-07 15:53:42 +02:00
Emily Lamancusa
d71f527202
Bug 34972: Add tests for ModReservesCancelAll
To test:
1. Apply this patch only
2. prove t/db_dependent/Koha/Holds.t
--> Tests pass
3. Apply the other patch
4. prove t/db_dependent/Koha/Holds.test
--> Tests still pass

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>
2024-05-07 15:53:42 +02:00
2e91745b4c
Bug 27753: (QA follow-up) Enhance unit tests
This patch further unit tests highlighting possible issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-06 09:12:14 +02:00
9e5d4f2384
Bug 27753: (QA follow-up) Improve unit tests
This patch adds unit tests that test the functionality more specifically
and adds a few notes/fixme for things we need to consider here

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-06 09:12:13 +02:00
Laura Escamilla
2e42bc5584
Bug 27753: (follow-up) Tidy unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-06 09:12:12 +02:00