Koha-clms/Koha/Patron
Emily Lamancusa bba9feff5c
Bug 34117: Remove side effect from get_expiry_date
If get_expiry_date is passed a DateTime object as a parameter,
it modifies and returns the original object. When memberentry.pl
prefills the input fields for duplicating a patron, it passes the
enrollment date object to get_expiry_date. This causes the enrollment
date object to be modified with the expiry date value.

This patch modifies get_expiry_date to clone the DateTime object that it
receives as a parameter and return the clone, so that references to an
enrollment date object can be passed in safely.

To test:
1. Have or make a patron
2. Duplicate that patron
3. Before saving the new patron, scroll down to Registration Date and
   see that it's defaulting to a date in the future.
4. Apply patch and restart_all
5. Try duplicating a patron again
6. Registration Date should correctly set to today

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-15 11:25:46 +03:00
..
Attribute
…
Password Bug 31739: Password recovery from staff fails if previous expired reset-entry exists. 2022-10-24 14:12:16 -03:00
Restriction Bug 31095: Remove keyed_on_code 2023-01-31 10:19:37 -03:00
Attribute.pm
…
Attributes.pm
…
Categories.pm
…
Category.pm Bug 34117: Remove side effect from get_expiry_date 2023-08-15 11:25:46 +03:00
Consent.pm
…
Consents.pm
…
Debarments.pm Bug 31095: Remove GetDebarments from Koha::Patron::Debarments 2023-01-31 10:19:40 -03:00
Discharge.pm Bug 14251: Allow use of CSS in discharge letter 2023-03-27 11:53:16 +02:00
Files.pm
…
HouseboundProfile.pm
…
HouseboundProfiles.pm
…
HouseboundRole.pm
…
HouseboundRoles.pm
…
HouseboundVisit.pm
…
HouseboundVisits.pm
…
Image.pm
…
Images.pm
…
Message.pm Bug 21699: Allow circulation messages to be editable 2023-05-05 10:18:55 -03:00
Messages.pm Bug 12029: Remove 'params' from filter_by_unread 2023-04-20 15:48:47 -03:00
Modification.pm
…
Modifications.pm
…
Relationship.pm Bug 33671: Update POD, remove unneeded check in relationship->guarantor 2023-05-10 14:19:24 -03:00
Relationships.pm
…
Restriction.pm Bug 31095: (QA follow-up) Fix POD 2023-01-31 10:19:42 -03:00
Restrictions.pm Bug 31095: (QA follow-up) Fix POD 2023-01-31 10:19:42 -03:00