[Bug 33872] New: Duplicated patron's registration date is set to expiration date of template patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Bug ID: 33872 Summary: Duplicated patron's registration date is set to expiration date of template patron Change sponsored?: --- Product: Koha Version: 22.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: catrina@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When duplicating a patron, the duplicated patron’s registration date automatically populates with the expiration date of the patron being duplicated. So, the registration date for the new patron is the expiration date of the original patron. This appears to be new behavior in 22.11 - I cannot replicate on 22.05. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor Version|22.11 |master --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Confirmed on master. Didn't spot the problem. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 --- Comment #2 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 152265 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152265&action=edit Bug 33872: Auto calc duplicated patron's registration date to today's date Test Plan: 1. Create a duplicate patron and save the record. Notice that the registration date is set incorrectly. 2. Apply patch 3. Restart all 4. Repeat step 1. Notice that the registration date is now set to today’s date. 5. Sign off! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |Laura.escamilla@bywatersolu |ity.org |tions.com CC| |Laura.escamilla@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152265|0 |1 is obsolete| | --- Comment #3 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 152331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152331&action=edit Bug 33872: Auto calc duplicated patron's registration date to today's date Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk Status|Needs Signoff |Signed Off --- Comment #4 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- Works as described, thanks for the patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152331|0 |1 is obsolete| | --- Comment #5 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 152806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152806&action=edit Bug 33872: Auto calc duplicated patron's registration date to today's date Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34117 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov --- Comment #6 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Thanks for submitting a patch, Laura!
From what I can tell, this issue occurs when memberentry.pl calls get_expiry_date( $data{dateenrolled} ) on line 724, because $data{dateenrolled} is a DateTime object, and get_expiry_date uses the DateTime add method, which edits the original object rather than returning a copy, according to the docs (https://metacpan.org/pod/DateTime#Math-Methods). This causes $data{dateenrolled} to be incorrect, which is why it populates an incorrect value into the template.
The patch on bug 34117 fixes the underlying data inconsistency by setting $data{dateenrolled} to a string instead of an object (thus causing get_expiry_date to create its own object), so that might be the better solution in this case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33872 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED Resolution|--- |DUPLICATE --- Comment #7 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Thanks for the feedback, Emily. I'll mark this one as a duplicate of 34117. *** This bug has been marked as a duplicate of bug 34117 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org