[Bug 16911] New: Koha::Patrons - Move ExtendMemberSubscriptionTo to -> extend_subscription
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Bug ID: 16911 Summary: Koha::Patrons - Move ExtendMemberSubscriptionTo to ->extend_subscription Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org The goal of these patches will be to move the 2 subroutines GetExpiryDate and ExtendMemberSubscriptionTo to the 2 methods of Koha::Patron::Category->get_expiry_date and Koha::Patron->get_expiry_date This way, we will have a nice code like my $patron = Koha::Patrons->find( 42 ); $patron->move_to_deleted; # From bug 16907 $patron->delete; # Which will handle the different deletion to do before deleting a patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16846 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16846 [Bug 16846] Move patron related code to Koha::Patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53338&action=edit Bug 16911: Koha::Patron::Categories - Add tests for ->get_expiry_date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53339 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53339&action=edit Bug 16911: Koha::Patron::Categories - Move GetExpiryDate to ->get_expiry_date This patch moves the code from C4::Members::GetExpiryDate to Koha::Patron::Categories. Nothing much exiting, please follow test plan in next patches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53340 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53340&action=edit Bug 16911: Koha::Patrons - Add tests for ->extend_subscription -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53341 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53341&action=edit Bug 16911: Koha::Patrons - Move ExtendMemberSubscriptionTo to ->extend_subscription This patch moves the code from C4::Members::ExtendMemberSubscriptionTo to Koha::Patron->extend_subscription. The expected behavior is: When a new patron is created, the enrolment period defined for the patron category is used unless an enrolment period date is defined. In that case, this date is used. When an account is renewed, the pref BorrowerRenewalPeriodBase is used to determine if the subscription is renewed from today or from the day when his/her account has expired. Test plan: Confirm that the behavior is correct before this patch and that it's still the same after this patchset applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16912 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16912 [Bug 16912] Koha::Patrons - Move AddEnrolmentFeeIfNeeded to add_enrolment_fee_if_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, just a note about the name: extend_subscription sounds more like a routine in serials. I was thinking maybe extend_membership or something like renew_account could work a bit better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53346&action=edit Bug 16911: Rename extend_subscription with renew_account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha::Patrons - Move |Koha::Patrons - Move |ExtendMemberSubscriptionTo |ExtendMemberSubscriptionTo |to ->extend_subscription |to ->renew_account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53338|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53514&action=edit Bug 16911: Koha::Patron::Categories - Add tests for ->get_expiry_date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53339|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53515&action=edit Bug 16911: Koha::Patron::Categories - Move GetExpiryDate to ->get_expiry_date This patch moves the code from C4::Members::GetExpiryDate to Koha::Patron::Categories. Nothing much exiting, please follow test plan in next patches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53340|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53516&action=edit Bug 16911: Koha::Patrons - Add tests for ->extend_subscription -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53341|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53517&action=edit Bug 16911: Koha::Patrons - Move ExtendMemberSubscriptionTo to ->extend_subscription This patch moves the code from C4::Members::ExtendMemberSubscriptionTo to Koha::Patron->extend_subscription. The expected behavior is: When a new patron is created, the enrolment period defined for the patron category is used unless an enrolment period date is defined. In that case, this date is used. When an account is renewed, the pref BorrowerRenewalPeriodBase is used to determine if the subscription is renewed from today or from the day when his/her account has expired. Test plan: Confirm that the behavior is correct before this patch and that it's still the same after this patchset applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53346|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53518&action=edit Bug 16911: Rename extend_subscription with renew_account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- This seems to work correctly with a patron category which has a fixed expiration date, but when I try to add a patron with an enrollment period defined in months I get an error: Can't locate object method "add" via package "2016-07-06" (perhaps you forgot to load "2016-07-06"?) at Koha/Patron/Category.pm line 185. "2016-07-06" is the date I entered in the "registration date" field. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 53533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53533&action=edit Bug 16911: ->get_expiry_date accepts strings To make sure nothing else will be broken, it's certainly better to handle date strings in a first phase. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Owen Leonard from comment #12)
This seems to work correctly with a patron category which has a fixed expiration date, but when I try to add a patron with an enrollment period defined in months I get an error:
Can't locate object method "add" via package "2016-07-06" (perhaps you forgot to load "2016-07-06"?) at Koha/Patron/Category.pm line 185.
"2016-07-06" is the date I entered in the "registration date" field.
Good catch Owen, I did not try that case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53514|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54752 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54752&action=edit Bug 16911: Koha::Patron::Categories - Add tests for ->get_expiry_date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53515|0 |1 is obsolete| | --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54753 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54753&action=edit Bug 16911: Koha::Patron::Categories - Move GetExpiryDate to ->get_expiry_date This patch moves the code from C4::Members::GetExpiryDate to Koha::Patron::Categories. Nothing much exiting, please follow test plan in next patches. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53516|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54754 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54754&action=edit Bug 16911: Koha::Patrons - Add tests for ->extend_subscription -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53517|0 |1 is obsolete| | --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54755 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54755&action=edit Bug 16911: Koha::Patrons - Move ExtendMemberSubscriptionTo to ->extend_subscription This patch moves the code from C4::Members::ExtendMemberSubscriptionTo to Koha::Patron->extend_subscription. The expected behavior is: When a new patron is created, the enrolment period defined for the patron category is used unless an enrolment period date is defined. In that case, this date is used. When an account is renewed, the pref BorrowerRenewalPeriodBase is used to determine if the subscription is renewed from today or from the day when his/her account has expired. Test plan: Confirm that the behavior is correct before this patch and that it's still the same after this patchset applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53518|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54756&action=edit Bug 16911: Rename extend_subscription with renew_account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53533|0 |1 is obsolete| | --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54757 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54757&action=edit Bug 16911: ->get_expiry_date accepts strings To make sure nothing else will be broken, it's certainly better to handle date strings in a first phase. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Patches rebased. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54752|0 |1 is obsolete| | --- Comment #22 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54789&action=edit [SIGNED-OFF] Bug 16911: Koha::Patron::Categories - Add tests for ->get_expiry_date Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54753|0 |1 is obsolete| | --- Comment #23 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54790 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54790&action=edit [SIGNED-OFF] Bug 16911: Koha::Patron::Categories - Move GetExpiryDate to ->get_expiry_date This patch moves the code from C4::Members::GetExpiryDate to Koha::Patron::Categories. Nothing much exiting, please follow test plan in next patches. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54754|0 |1 is obsolete| | --- Comment #24 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54791 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54791&action=edit [SIGNED-OFF] Bug 16911: Koha::Patrons - Add tests for ->extend_subscription Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54755|0 |1 is obsolete| | --- Comment #25 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54792&action=edit [SIGNED-OFF] Bug 16911: Koha::Patrons - Move ExtendMemberSubscriptionTo to ->extend_subscription This patch moves the code from C4::Members::ExtendMemberSubscriptionTo to Koha::Patron->extend_subscription. The expected behavior is: When a new patron is created, the enrolment period defined for the patron category is used unless an enrolment period date is defined. In that case, this date is used. When an account is renewed, the pref BorrowerRenewalPeriodBase is used to determine if the subscription is renewed from today or from the day when his/her account has expired. Test plan: Confirm that the behavior is correct before this patch and that it's still the same after this patchset applied. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54756|0 |1 is obsolete| | --- Comment #26 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54793&action=edit [SIGNED-OFF] Bug 16911: Rename extend_subscription with renew_account Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54757|0 |1 is obsolete| | --- Comment #27 from Aleisha Amohia <aleishaamohia@hotmail.com> --- Created attachment 54794 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54794&action=edit [SIGNED-OFF] Bug 16911: ->get_expiry_date accepts strings To make sure nothing else will be broken, it's certainly better to handle date strings in a first phase. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54789|0 |1 is obsolete| | --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55191 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55191&action=edit Bug 16911: Koha::Patron::Categories - Add tests for ->get_expiry_date Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54790|0 |1 is obsolete| | --- Comment #29 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55192 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55192&action=edit Bug 16911: Koha::Patron::Categories - Move GetExpiryDate to ->get_expiry_date This patch moves the code from C4::Members::GetExpiryDate to Koha::Patron::Categories. Nothing much exiting, please follow test plan in next patches. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54791|0 |1 is obsolete| | --- Comment #30 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55193&action=edit Bug 16911: Koha::Patrons - Add tests for ->extend_subscription Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54792|0 |1 is obsolete| | --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55194 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55194&action=edit Bug 16911: Koha::Patrons - Move ExtendMemberSubscriptionTo to ->extend_subscription This patch moves the code from C4::Members::ExtendMemberSubscriptionTo to Koha::Patron->extend_subscription. The expected behavior is: When a new patron is created, the enrolment period defined for the patron category is used unless an enrolment period date is defined. In that case, this date is used. When an account is renewed, the pref BorrowerRenewalPeriodBase is used to determine if the subscription is renewed from today or from the day when his/her account has expired. Test plan: Confirm that the behavior is correct before this patch and that it's still the same after this patchset applied. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54793|0 |1 is obsolete| | --- Comment #32 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55195&action=edit Bug 16911: Rename extend_subscription with renew_account Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54794|0 |1 is obsolete| | --- Comment #33 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55196&action=edit Bug 16911: ->get_expiry_date accepts strings To make sure nothing else will be broken, it's certainly better to handle date strings in a first phase. Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #34 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 55197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55197&action=edit Bug 16911: (QA followup) CGI->param should not be called in list context Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #35 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 55424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55424&action=edit Bug 16911 [QA Followup] - Fix number of categories to look for after deleting one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #36 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #37 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 55447 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55447&action=edit Bug 16911 [QA Followup] - No need to 'use C4::Members' For some reason, this is causing t/db_dependent/Circulation.t to fail if run independently. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #38 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Kyle M Hall from comment #37)
Created attachment 55447 [details] [review] Bug 16911 [QA Followup] - No need to 'use C4::Members'
For some reason, this is causing t/db_dependent/Circulation.t to fail if run independently.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
I do not understand this patch, the subroutine AddEnrolmentFeeIfNeeded from C4::Members is called from Koha::Patron. It would make sense to use it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17307 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 [Bug 17307] Some edit buttons/links for patrons do not work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #39 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #38)
(In reply to Kyle M Hall from comment #37)
Created attachment 55447 [details] [review] [review] Bug 16911 [QA Followup] - No need to 'use C4::Members'
For some reason, this is causing t/db_dependent/Circulation.t to fail if run independently.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
I do not understand this patch, the subroutine AddEnrolmentFeeIfNeeded from C4::Members is called from Koha::Patron. It would make sense to use it.
Do the unit tests fail for you without that patch? If not, maybe it's a quirk of my environment. Because the call to AddEnrolmentFeeIfNeeded is fully qualified, the 'use' is not needed, and would be unnecessary overhead ( though incredibly minimal ). If the tests pass for you without that patch, I'd be happy to revert that specific commit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 --- Comment #40 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Kyle M Hall from comment #39)
(In reply to Jonathan Druart from comment #38)
(In reply to Kyle M Hall from comment #37)
Created attachment 55447 [details] [review] [review] [review] Bug 16911 [QA Followup] - No need to 'use C4::Members'
For some reason, this is causing t/db_dependent/Circulation.t to fail if run independently.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
I do not understand this patch, the subroutine AddEnrolmentFeeIfNeeded from C4::Members is called from Koha::Patron. It would make sense to use it.
Do the unit tests fail for you without that patch? If not, maybe it's a quirk of my environment. Because the call to AddEnrolmentFeeIfNeeded is fully qualified, the 'use' is not needed, and would be unnecessary overhead ( though incredibly minimal ).
If the tests pass for you without that patch, I'd be happy to revert that specific commit.
No, the tests don't pass, but I don't understand why they do with this patch. I am suspecting there is bug hidden somewhere else :-/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17699 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17699 [Bug 17699] DateTime durations are not correctly subtracted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16911 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #41 from Mason James <mtj@kohaaloha.com> --- (In reply to Kyle M Hall from comment #36)
Pushed to master for 16.11, thanks Jonathan!
Enhancement, skipping for 16.05.x branch -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org