Koha/serials
Jonathan Druart c9a2cf948d
Bug 33901: (bug 30718 follow-up) Predition pattern - don't set end date to today
If the end date is not set we should not set it to today.
On bug 30718 the following change was wrong:
-$enddate = eval { output_pref( { str => $enddate, dateonly => 1, dateformat => 'iso' } ); };
+$enddate = dt_from_string($enddate)->ymd;

output_pref returns undef if str is empty
After the change we returned today's date.

Test plan:
1. Go to Serials > Manage numbering patterns
2. Click Edit next to one of the existing patterns (e.g. Number)
3. Enter information in the Test prediction pattern section
   -  Frequency: choose one (e.g. 1/month)
   -  First issue publication date: enter a date (e.g. 2023-06-01)
   -  Subscription length: issues + enter a number of issues (e.g. 12)
   -  Locale: leave empty
   -  Begins with: enter a number in the X column, e.g. 42
4. Click Test pattern
=> Without this patch only one issue is shown, no matter how many you enter in Subscription length
=> With this patch applied the end date is not set to today and the
prediction pattern list is correct

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-06-09 08:41:53 -03:00
..
acqui-search-result.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
acqui-search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
checkexpiration.pl Bug 29609: Centralized code to build the link to a biblio detail page 2022-04-08 15:49:16 +02:00
claims.pl Bug 30377: Fix two CGI::param called in list context-warnings 2022-04-04 16:23:46 +02:00
create-numberpattern.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
lateissues-export.pl Bug 27045: (follow-up) Fix delimiter in header rows 2022-07-20 11:50:41 -03:00
reorder_members.pl Bug 20015: use Modern::Perl in Serials perl script 2018-02-05 09:46:45 -03:00
routing-preview.pl Bug 31318: Remove GetItemsInfo from serials/routing-preview 2022-08-16 09:27:15 -03:00
routing.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials-collection.pl Bug 29790: Restore warning if deletion of serial item fails 2022-01-11 12:38:35 -10:00
serials-edit.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
serials-home.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials-search.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
showpredictionpattern.pl Bug 33901: (bug 30718 follow-up) Predition pattern - don't set end date to today 2023-06-09 08:41:53 -03:00
subscription-add.pl Bug 11844: Use additional fields for order lines 2023-05-16 12:58:38 +02:00
subscription-batchedit.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
subscription-bib-search.pl Bug 33803: Remove comment about tab width 2023-06-06 09:58:47 -03:00
subscription-detail.pl Bug 23352: Set default collection code when creating subscription 2022-05-10 15:17:17 -10:00
subscription-frequencies.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
subscription-frequency.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
subscription-history.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
subscription-numberpattern.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
subscription-numberpatterns.pl Bug 29608: Made so doesn't require full permission 2022-09-07 13:49:53 -07:00
subscription-renew.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
viewalerts.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00