Description
Martin Renvoize
2018-12-14 10:17:13 UTC
Created attachment 83215 [details] [review] Bug 21999: Use Koha::Checkout in C4::Circulation::AddIssue Created attachment 83216 [details] [review] Bug 21999: Update Tests to reflect new return value of AddIssue So.. this is a bit of a 'quick fix'.. the long term we will likely want to deprecate AddIssue and move it into Koha::*.. but, some places already expect the returned value to be a Koha::Checkout so this is the patch I've come up with. Test plan.. the majority of places that call AddIssue do so in VOID context and so this change of return value should not affect them. Most cases where the return value is used were in the tests and those have been updated in the second patch... that just leaves `circ/circulation.pl` where the return is passed into the template (and the Koha::Object should be seamless there). Finally, SIP uses the returned value too but in such a way that the Koha::Checkout being returned instead is also fine (as we only ever look at the date_due field). To Test.. apply patches.. run the full test suit and everything should pass. Created attachment 83244 [details] [review] Bug 21999: Use Koha::Checkout in C4::Circulation::AddIssue Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Created attachment 83245 [details] [review] Bug 21999: Update Tests to reflect new return value of AddIssue Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Created attachment 83327 [details] [review] Bug 21999: Use Koha::Checkout in C4::Circulation::AddIssue Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 83328 [details] [review] Bug 21999: Update Tests to reflect new return value of AddIssue Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 83329 [details] [review] Bug 21999: FIXMEs are fixed! Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 83330 [details] [review] Bug 21999: Move attributes to a variable to not dup them Avoid c/p as much as possible :) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Awesome work all! Pushed to master for 19.05 Enhancement, will not be backported to 18.11.x series |