Bug 21008 - pay.pl and paycollect.pl raise warning
Summary: pay.pl and paycollect.pl raise warning
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 18789
Blocks:
  Show dependency treegraph
 
Reported: 2018-06-27 17:39 UTC by Tomás Cohen Arazi
Modified: 2019-10-14 19:56 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21008: Use patron object to get category_type (3.69 KB, patch)
2018-06-28 13:33 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21008: Use Koha::Patron->is_child (2.73 KB, patch)
2018-06-28 14:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21008: Use Koha::Patron->is_child (2.82 KB, patch)
2018-06-28 14:42 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21008: Use patron object to get category_type (3.75 KB, patch)
2018-07-08 15:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21008: Use Koha::Patron->is_child (2.88 KB, patch)
2018-07-08 15:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21008: Use patron object to get category_type (3.82 KB, patch)
2018-07-12 17:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21008: Use Koha::Patron->is_child (2.95 KB, patch)
2018-07-12 17:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2018-06-27 17:39:35 UTC
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.
Comment 1 Tomás Cohen Arazi 2018-06-27 17:42:26 UTC
They are used, in patron-search.inc. Still needs fixing.
Comment 2 Jonathan Druart 2018-06-27 18:46:20 UTC
Which variables?
Comment 3 Tomás Cohen Arazi 2018-06-27 20:42:47 UTC
(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.
Comment 4 Tomás Cohen Arazi 2018-06-28 13:33:50 UTC
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.
Comment 5 Jonathan Druart 2018-06-28 14:01:39 UTC
Created attachment 76546 [details] [review]
Bug 21008: Use Koha::Patron->is_child
Comment 6 Tomás Cohen Arazi 2018-06-28 14:42:14 UTC
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.
Comment 7 Katrin Fischer 2018-07-08 15:48:00 UTC
No test plan?
Comment 8 Katrin Fischer 2018-07-08 15:49:55 UTC
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>
Comment 9 Katrin Fischer 2018-07-08 15:49:59 UTC
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>
Comment 10 Jonathan Druart 2018-07-12 17:42:58 UTC
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>
Comment 11 Jonathan Druart 2018-07-12 17:43:03 UTC
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>
Comment 12 Nick Clemens 2018-07-13 13:49:35 UTC
Awesome work all!

Pushed to master for 18.11
Comment 13 Martin Renvoize 2018-07-15 20:41:05 UTC
Pushed to 18.05.x for 18.05.02
Comment 14 Fridolin SOMERS 2018-07-30 14:25:42 UTC
Depends on Bug 18789 not in 17.11.x