Koha/t/db_dependent
Emmi Takkinen 9fe3c489f4 Bug 26498: Set default expiration date for holds
Koha doesn't automatically set expiration date for holds
so they can live in the system forever. This patch adds
new sysprefs to control setting of default expiration
date for holds. Note that expiration date is only set
if input field for it is left blank.

To test:
1. Apply patch and update database.
2. Enable syspref "DefaultHoldExpirationdate" and set some values
to "DefaultHoldExpirationdatePeriod" and
"DefaultHoldExpirationdateUnitOfTime".
3. Add some holds for patron from staff client or OPAC and leave
expiration date input field blank.
=> Holds expiration date should be set according your settings
4. Disable "DefaultHoldExpirationdate" and repeat step 3.
=> Expiration date shouldn't be set.

Also prove prove t/db_dependent/Hold.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-07 13:10:31 +02:00
..
Acquisition Bug 27486: Rename system preference delimiter to CSVDelimiter 2021-01-29 09:03:45 +01:00
api/v1 Bug 27366: Unit tests 2021-03-16 16:08:31 +01:00
Auth
AuthoritiesMarc Bug 21958: (QA follow-up) Correct indirect object notation 2021-04-01 17:13:56 +02:00
Authority
Biblio Bug 25306: Remove framework paramter from ModBiblioMarc 2021-01-12 16:13:50 +01:00
Circulation Bug 24446: (QA follow-up) Correction to datecancelled for ModItemTransfer 2021-03-03 15:36:13 +01:00
CourseReserves
Creators
cronjobs
data Bug 22824: Adjust tests to match final behaviours 2021-03-04 16:18:42 +01:00
Exporter
Holds Bug 27058: Add test for IsAvailableForItemLevelRequest and notforloan 2021-03-08 15:15:49 +01:00
Illrequest
Items Bug 4037: Add item type filter to inventory tool 2021-02-09 09:23:51 +01:00
Koha Bug 27993: Add unit tests 2021-04-01 17:58:49 +02:00
Labels
LDAP
Letters
Members
misc/translator
OAI Bug 27673: Replace YAML with YAML::XS 2021-02-16 14:54:50 +01:00
Patron Bug 26937: Add an optional delay to the CheckPrevCheckout syspref. 2021-03-01 15:14:22 +01:00
Record
Reports Bug 27380: FIX Reports/Guided.t 2021-02-12 14:31:01 +01:00
Reserves Bug 26634: Remove GetHoldRule subroutine in C4::Reserves 2020-12-21 10:07:38 +01:00
Search
selenium Bug 27029: Add a selenium regression test 2021-01-27 12:03:42 +01:00
Serials
SIP Bug 25690: Add SIP2 tests for checking out with holds 2021-03-04 16:18:42 +01:00
Template/Plugin
Utils Bug 27715: Use $dbh->quote_identifier to quote untrusted input 2021-02-24 00:12:59 +01:00
www
00-strict.t
01-test_dbic.t
Accounts.t
Acquisition.t
Amazon.t
ArticleRequests.t
AudioAlerts.t
Auth.t Bug 27491: Rename system preference opaclanguages to OPACLanguages 2021-01-22 14:59:27 +01:00
Auth_with_cas.t
Auth_with_ldap.t
AuthorisedValues.t Bug 23830: Make Koha::AuthorisedValues use Koha::Objects::Limit::Library 2021-02-08 17:09:34 +01:00
AuthoritiesMarc.t Bug 21958: Fix bibliographic record field comparison with authority 2021-04-01 17:13:56 +02:00
AuthUtils.t
BackgroundJob.t
Barcodes.t
Barcodes_ValueBuilder.t
Biblio.t Bug 21958: Fix bibliographic record field comparison with authority 2021-04-01 17:13:56 +02:00
Breeding.t
Budgets.t Bug 27673: Replace YAML with YAML::XS 2021-02-16 14:54:50 +01:00
Cache.t
Calendar.t
Charset.t
check_kohastructure.t
check_sysprefs.t
Circulation.t Bug 25690: Remove double usage of 'Reserved' return value 2021-03-04 16:18:42 +01:00
Clubs.t
Context.t
Contract.t
CourseReserves.t
db_structure.t
DecreaseLoanHighHolds.t
Filter_MARC_ViewPolicy.t
Fines.t
FrameworkPlugin.t
Heading.t Bug 21958: Allow 'e' subfield for authorities 2021-04-06 15:56:30 +02:00
Heading_MARC21.t
Hold.t Bug 26498: Set default expiration date for holds 2021-04-07 13:10:31 +02:00
Holds.t Bug 17229: Move tests to t/db_dependant/ILSDI_Service.t 2021-01-19 16:03:18 +01:00
HoldsQueue.t Bug 24359: (QA follow-up) Fix tests 2021-03-09 10:31:46 +01:00
Holidays.t
Illcomments.t
Illrequestattributes.t
Illrequests.t
ILSDI_Services.t Bug 24446: (QA follow-up) Fix ModItemTransfer tests 2021-03-03 15:36:13 +01:00
ImportBatch.t Bug 24469: Move the new queries to a dedicated ImportBatch subroutine 2021-02-18 11:52:59 +01:00
ImportExportFramework.t Bug 27569: Add tests for ODS export 2021-02-16 10:22:13 +01:00
Installer.t
Items.t Bug 24446: (QA follow-up) Update unit test for ModItemTransfer 2021-03-03 15:36:13 +01:00
Koha.t
Koha_Authority.t
Koha_Database.t
Koha_Elasticsearch.t
Koha_ExternalContent_OverDrive.t
Koha_ExternalContent_RecordedBooks.t
Koha_Misc_Files.t
Languages.t
Letters.t Bug 28017: (follow-up) Fix Letters.t 2021-04-06 15:53:28 +02:00
LibraryGroups.t
Linker_Default.t
Linker_FirstMatch.t
Log.t
MarcModificationTemplates.t Bug 26894: Handle subfield 0 and delete empty fields 2021-01-12 16:02:35 +01:00
Members.t Bug 26517: Add unit test 2021-04-01 17:06:34 +02:00
MungeMarcPrice.t
NewsChannels.t
Overdues.t
Passwordrecovery.t
Patroncards.t
PatronLists.t
Patrons.t Bug 27554: Clarify and add tests for update_category_to 2021-02-01 16:21:25 +01:00
Record.t
RecordProcessor_EmbedSeeFromHeadings.t
Reports.t
Reserves.t Bug 27921: Log correct timestamp for HOLD MODIFY when set waiting 2021-04-01 18:51:37 +02:00
rollingloans.t
RotatingCollections.t Bug 26618: (QA follow-up) Fix unit test for TranferCollection change 2021-03-03 15:36:13 +01:00
Search.t Bug 27928: FindDuplicate should use simple_search_compat 2021-04-01 18:03:23 +02:00
Serials.t Bug 27673: Replace YAML with YAML::XS 2021-02-16 14:54:50 +01:00
Serials_2.t
Service.t
ShelfBrowser.t
Sitemapper.t
Stats.t
StockRotationItems.t Bug 22569: Add Unit Tests 2021-03-11 11:51:40 +01:00
StockRotationRotas.t
StockRotationStages.t
SuggestionEngine_ExplodedTerms.t
Suggestions.t
sysprefs.t
TablesSettings.t
Tags.t
Templates.t
TestBuilder.t
Upload.t
UsageStats.t Bug 20410: Remove OpacGroupResults and PazPar2 2021-02-08 16:12:42 +01:00
Virtualshelves.t
XISBN.t Bug 26364: Adjust unit tests 2021-01-07 15:37:15 +01:00
XSLT.t Bug 21260: Introduce local pref to affect status grouping 2021-04-01 17:58:49 +02:00
yaml.t Bug 22824: Adjust tests to match final behaviours 2021-03-04 16:18:42 +01:00
zebra_config.pl