https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7046
Jonathan Druart <jonathan.dru...@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102427|0 |1 is obsolete| | Attachment #102428|0 |1 is obsolete| | Attachment #102429|0 |1 is obsolete| | Attachment #102430|0 |1 is obsolete| | Attachment #102535|0 |1 is obsolete| | Attachment #102536|0 |1 is obsolete| | --- Comment #31 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> --- Created attachment 102537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102537&action=edit Bug 7046: Implemented subscription renewal dropdown sub length element To make this work I moved the _get_sub_length function from subscription-add.pl to C4/Serials.pm so that the subscription-renew.pl script could also call it to store the sublength for the appropriate field of the subscriptions database table. Test plan: 1. Create a subscription and notice that there is a dropdown box for sub length containing the values: issues, weeks, months 2. Renew the subscription and notice that there are 3 input text boxes: 'number of num', 'number of weeks' and 'number of months' 3. Input a 'Number of weeks' value of 2 4. Query the subscription database table and notice that the value of 2 has been stored in the weeklength field for the subscription record you just renewed 5. Apply the patch 6. Renew the subscription and notice that there is now a sublength dropdown box containing issues, weeks and months 7. Set the month value to 3 8. Query the database and notice that 3 was stored in the monthlength field for the subscription record 9. Create a new subscription and select the sub length values of issues and 3 10. Query the database and notice that the numberlength field for the subscription you just created is set to 3 showing that the sublength dropbox is still working for creating a new subscription Sponsored-By: Catalyst IT Patch applies and functions as expected in line with test plan. Signed-off-by: Dilan Johnpullé <di...@calyx.net.au> Signed-off-by: David Nind <da...@davidnind.com> Bug 7046: (follow-up) Tidy up to address test feedback * Removed underscores from start of subroutine * Removed tabs in subscription-renew.tt * Added test for C4/Serials/getsublength() in t/db_dependen/Serials/ReNewSubscription.t * Added missing filters Sponsored-By: Catalyst IT Signed-off-by: David Nind <da...@davidnind.com> Bug 7046: (follow-up) Changed subroutine name and added unit tests * Fixed uninitialised value in $subtype in C4/Serials.pm line 1468 * Fixed sub routine name to 'GetSubscriptionLength' * Removed sublength param from being in value of sublength HTML input field * Added more unit tests to include bad params: undef, letters and special characters Test plan: Please follow test plan in first patch Sponsored-By: Catalyst IT Signed-off-by: David Nind <da...@davidnind.com> Bug 7046: (follow-up) Update function call in subscription-add.pl Also removed border around Subscription length in subscription-renew.tt Test plan: Please follow test plan in first patch Sponsored-By: Catalyst IT Signed-off-by: David Nind <da...@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.dru...@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/