[Koha-bugs] [Bug 22928] "Update child to adult patron" link no longer displayed
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri May 17 15:16:04 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22928
Kyle M Hall <kyle at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #89866|0 |1
is obsolete| |
Attachment #89867|0 |1
is obsolete| |
--- Comment #5 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 89899
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89899&action=edit
Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link
Looks like it is caused by bug 20226, however I am pretty sure it works when I
wrote the patch.
[% IF Categories.scalar.all(category_type => 'A').count > 0 %]
is always wrong.
It must be, either:
[% IF Categories.all(category_type => 'A').size > 0 %]
or
[% SET adult_categories = Categories.scalar.all(category_type => 'A') %]
[% IF adult_categories.count > 0 %]
In the first case we are getting an array whereas in the later, a
Koha::Patrons which is preferable.
Test plan (from 20226):
- Remove all your adult categories (categories.category_type='A')
- Create a patron with a child category
- Try to update to adult category
=> The entry does no longer appears! (This is a change in the behaviour)
- Create one adult category
- Update to adult category
=> There is a JS confirmation message, if you accept the patron will
be updated to the adult category
- Create (at least) another adult category
- Create another child
- Update to adult category
=> No more confirmation message but a popup to select the adult category
- Pick one
=> The patron has been updated to the adult category
Signed-off-by: Liz Rea <wizzyrea at gmail.com>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list