After bug 18789, both controller scripts log warnings due to and attribute not existing in the unblessed patron object. Trying to fix that warning I found that the populated variables weren't actually used on the templates at all! They should be removed.
They are used, in patron-search.inc. Still needs fixing.
Which variables?
(In reply to Jonathan Druart from comment #2) > Which variables? 1- $b_ref->{extendedattributes} The other scripts set $template->param( extendedattributes => ... ); 2- CATCODE_MULTI I made a mistake on this one, as it is used in patron-search.inc. But the current logic prevents it to be populated. 3- catcode Same as 2. I really think this should all be moved into using the global $patron object.
Created attachment 76545 [details] [review] Bug 21008: Use patron object to get category_type This patch makes borrower_add_additional_fields() in both pay.pl and paycollect.pl use the right object to pick the category_type. It also populates the extendedattributes template variable in pay.pl which was missed by a change.
Created attachment 76546 [details] [review] Bug 21008: Use Koha::Patron->is_child
Created attachment 76547 [details] [review] Bug 21008: Use Koha::Patron->is_child Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: I removed the category parameter as it is not really used.
No test plan?
Created attachment 76766 [details] [review] Bug 21008: Use patron object to get category_type This patch makes borrower_add_additional_fields() in both pay.pl and paycollect.pl use the right object to pick the category_type. It also populates the extendedattributes template variable in pay.pl which was missed by a change. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 76767 [details] [review] Bug 21008: Use Koha::Patron->is_child Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: I removed the category parameter as it is not really used. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 76898 [details] [review] Bug 21008: Use patron object to get category_type This patch makes borrower_add_additional_fields() in both pay.pl and paycollect.pl use the right object to pick the category_type. It also populates the extendedattributes template variable in pay.pl which was missed by a change. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 76899 [details] [review] Bug 21008: Use Koha::Patron->is_child Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: I removed the category parameter as it is not really used. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.02
Depends on Bug 18789 not in 17.11.x