Bug 21222 - Patron's creation is broken
Summary: Patron's creation is broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 20226 21221
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-14 19:25 UTC by Jonathan Druart
Modified: 2019-10-14 19:57 UTC (History)
2 users (show)

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


Attachments
Bug 21222: (bug 20226 follow-up) Fix patron creation (6.64 KB, patch)
2018-08-14 19:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21222: (bug 20226 follow-up) Fix patron creation (6.68 KB, patch)
2018-08-15 06:05 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21222: (bug 20226 follow-up) Fix patron creation (6.74 KB, patch)
2018-08-16 11:07 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-08-14 19:25:24 UTC
Template process failed: undef error - DBIC result _type  isn't of the _type Category at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc line 22.
Comment 1 Jonathan Druart 2018-08-14 19:25:47 UTC
Caused by bug 20226.
Comment 2 Jonathan Druart 2018-08-14 19:26:04 UTC
Will need bug 21221 to apply.
Comment 3 Jonathan Druart 2018-08-14 19:34:32 UTC
Created attachment 77801 [details] [review]
Bug 21222: (bug 20226 follow-up) Fix patron creation

Since bug 20226 you cannot longer creation a patron, memberentry.pl will
explode with
Template process failed: undef error - DBIC result _type  isn't of the
_type Category at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
line 22.

The problem is that "patron" is actually defined and the test in
str/members-menu.inc does not work as expected.

It comes from
  commit 7b1d08df0f4f69c52826c80a13158245287f4c00
  Bug 19936: Replace Generate_Userid - Update the occurrences
where I needed $patron to be defined in order to use Koha::Patron->generate_userid
on an blessed object.
But this was actually wrong, as it could have side-effects.

Test plan:
Create a new patron
Edit it
Retest bug 19936 and make sure the userid is generated correctly in the
different situations
Comment 4 Katrin Fischer 2018-08-15 06:05:11 UTC
Created attachment 77811 [details] [review]
Bug 21222: (bug 20226 follow-up) Fix patron creation

Since bug 20226 you cannot longer creation a patron, memberentry.pl will
explode with
Template process failed: undef error - DBIC result _type  isn't of the
_type Category at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
line 22.

The problem is that "patron" is actually defined and the test in
str/members-menu.inc does not work as expected.

It comes from
  commit 7b1d08df0f4f69c52826c80a13158245287f4c00
  Bug 19936: Replace Generate_Userid - Update the occurrences
where I needed $patron to be defined in order to use Koha::Patron->generate_userid
on an blessed object.
But this was actually wrong, as it could have side-effects.

Test plan:
Create a new patron
Edit it
Retest bug 19936 and make sure the userid is generated correctly in the
different situations

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize 2018-08-16 11:07:27 UTC
Created attachment 77890 [details] [review]
Bug 21222: (bug 20226 follow-up) Fix patron creation

Since bug 20226 you cannot longer creation a patron, memberentry.pl will
explode with
Template process failed: undef error - DBIC result _type  isn't of the
_type Category at /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
line 22.

The problem is that "patron" is actually defined and the test in
str/members-menu.inc does not work as expected.

It comes from
  commit 7b1d08df0f4f69c52826c80a13158245287f4c00
  Bug 19936: Replace Generate_Userid - Update the occurrences
where I needed $patron to be defined in order to use Koha::Patron->generate_userid
on an blessed object.
But this was actually wrong, as it could have side-effects.

Test plan:
Create a new patron
Edit it
Retest bug 19936 and make sure the userid is generated correctly in the
different situations

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2018-08-16 11:08:42 UTC
All seems solid, Passing QA
Comment 7 Nick Clemens 2018-08-16 14:06:33 UTC
Awesome work all!

Pushed top master for 18.11
Comment 8 Martin Renvoize 2018-08-16 14:44:26 UTC
Not required in 18.05.x as we don't have bug 20226.