Koha-clms/t/db_dependent/Koha
Nick Clemens 93ee314035 Bug 30254: [22.05.x] Don't charge overdue fines unless some fine exists
We need to determine if a book was lost by a patron, the clues we have
are previous charges. If we don't find any, we shouldn't charge a new fine

To test:
 1 - set Lost item fee refund on return policy to "Refund lost item charge and charge new overdue fine", turn on FinesMode, make sure your circ rules charge fines
 2 - have an itemtype / patron combo that charges an overdue fine
 3 - check item out (with a due date in the future) and then right back in again
 4 - confirm patron doesn't have a fine because the item was not late
 5 - set the item to Lost
 6 - in the database, edit the date_due of your checkout to a date in the past
 7 - check the item in, it is marked found
 8 - confirm your patron now has a fine
 9 - Apply patch
10 - Repeat with a new item and patron
11 - Confirm no charges

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30254: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30254: (QA follow-up) Remove warn from tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=32054

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2023-02-24 13:27:54 +00:00
..
Account Revert "Bug 29021: (QA follow-up) Fix for new parameter, add unit test" 2023-02-02 16:54:12 +00:00
Acquisition Bug 30204: Add unit test 2022-04-20 20:43:15 -10:00
Auth Bug 28998: (follow-up) Check missing encryption key in script and module 2022-05-04 05:18:31 -10:00
BackgroundJob Bug 32394: [22.05.x] Regression tests 2023-02-01 18:19:34 +00:00
BackgroundJobs Bug 31351: (QA follow-up) Adjust tests accordingly 2022-10-14 21:36:09 +00:00
Biblio
…
BiblioUtils Bug 29625: Add test for get_all_biblios_iterator 2022-02-21 15:15:47 -10:00
Cash
…
Charges
…
Checkouts
…
CirculationRules Bug 29705: In test suite merge IssuingRules with CirculationRules 2022-05-06 10:33:10 -10:00
Club Bug 29857: (follow-up) Fix t/db_dependent/Koha/Club/Hold.t 2022-03-02 09:40:05 -10:00
Config
…
Edifact Bug 30135: Unit tests 2022-04-13 15:55:39 +02:00
Filter Bug 15187: (QA follow-up) Fix test permissions 2022-09-02 17:56:54 +00:00
Import Bug 30830: Add Koha Objects for Koha Import Items 2022-06-06 14:30:40 +00:00
Item Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-12-05 23:19:21 +00:00
Items Bug 29781: Unit test 2022-02-16 11:51:11 -10:00
Library
…
Objects/Mixin Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Old Bug 26648: Add tests 2022-12-05 18:38:30 +00:00
Patron Bug 29924: Unit tests 2022-05-06 10:33:09 -10:00
Patrons Bug 29005: Unit tests 2022-04-20 09:03:39 -10:00
Plugins Bug 31223: Regression tests 2022-09-12 14:56:22 +00:00
REST Bug 30194: (26351 follow-up) Silence useless warning 2022-03-29 16:44:31 +02:00
SMTP
…
SearchEngine Bug 29561: Unit test 2022-12-05 18:18:10 +00:00
Subscription
…
Tags
…
Template/Plugin Bug 32539: Add tests 2023-02-15 22:07:18 +00:00
UI/Form/Builder Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-12-05 23:19:21 +00:00
XSLT
…
Z3950Responder
…
Account.t
…
ActionLogs.t
…
AdditionalContents.t
…
ApiKey.t
…
ArticleRequest.t
…
ArticleRequests.t
…
Authorities.t
…
BackgroundJob.t Bug 32394: [22.05.x] Add tests 2023-02-01 18:19:34 +00:00
BackgroundJobs.t Bug 30982: [22.05.x] Use the REST API for background job list view 2022-11-01 21:40:18 +00:00
Biblio.t Bug 31196: Remove 'default_value_for_mod_marc-' clear_from_cache calls 2022-12-05 23:19:21 +00:00
BiblioFrameworks.t
…
Biblios.t
…
Checkout.t
…
Checkouts.t
…
CirculationRules.t Bug 29705: In test suite merge IssuingRules with CirculationRules 2022-05-06 10:33:10 -10:00
Cities.t
…
ClassSortRules.t
…
ClassSources.t
…
ClassSplitRules.t
…
CoverImages.t
…
CsvProfiles.t
…
Database.t
…
Desks.t
…
Encryption.t Bug 28998: (follow-up) Check missing encryption key in script and module 2022-05-04 05:18:31 -10:00
Hold.t Bug 31086: (QA follow-up) Add unit tests 2022-09-02 17:08:24 +00:00
Holds.t Bug 31086: (QA follow-up) Fix failing tests 2022-09-02 17:08:06 +00:00
Item.t Bug 30254: [22.05.x] Don't charge overdue fines unless some fine exists 2023-02-24 13:27:54 +00:00
ItemTypes.t
…
Items.t Bug 31473: Fix fragile test about bad OpacHiddenItems conf 2022-10-04 16:28:40 +00:00
KeyboardShortcuts.t
…
Libraries.t
…
Library.t
…
MarcSubfieldStructures.t
…
Notices.t
…
Object.t Bug 29857: (QA follow-up) Fix unit test Object.t 2022-03-01 22:47:47 -10:00
Objects.t Bug 29844: Remove use of wantarray from Koha::Objects 2022-02-09 15:36:23 -10:00
Old.t
…
Patron.t Bug 30399: Make Patron.t pass even if mandatory attributes exist 2022-07-13 19:07:43 +00:00
Patrons.t Bug 29059: Keep non-repeatable attribute from patron to preserve when merging 2022-04-08 15:49:17 +02:00
Pseudonymization.t Bug 31201: Prevent Pseudonymization.t to fail 2022-09-02 14:32:08 +00:00
Quotes.t
…
Ratings.t
…
Recall.t Bug 30291: Changes to tests 2022-05-05 11:17:36 -10:00
Recalls.t Bug 30291: (QA follow-up) Fix for revert to recall_id 2022-05-05 11:17:36 -10:00
Reports.t
…
Reviews.t
…
SMS_Providers.t
…
SearchField.t
…
SharedContent.t
…
Statistics.t
…
Subscription.t
…
Suggestion.t
…
Suggestions.t Bug 30663: Add Koha::Suggestions helper methods 2022-05-05 10:26:41 -03:00
Tags.t
…
Z3950Servers.t
…