Bug 27420 - A mistake in bug 5161 leads to some patron attributes appearing without a fieldset
Summary: A mistake in bug 5161 leads to some patron attributes appearing without a fie...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on: 5161
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-13 11:16 UTC by Martin Renvoize (ashimema)
Modified: 2021-12-13 21:08 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.02,20.05.08
Circulation function:


Attachments
Bug 27420: Use object accessor for $attr_type->class() (1.48 KB, patch)
2021-01-13 11:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 27420: Use object accessor for $attr_type->class() (1.56 KB, patch)
2021-01-13 14:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27420: Use object accessor for $attr_type->class() (1.61 KB, patch)
2021-01-17 16:00 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2021-01-13 11:16:53 UTC
I'm really struggling to describe this issue even though I can happily replicate it with customer data... and the fix is clear and obvious.

When adding, editing a borrower if a patron attribute type has a class associated with it (with a corresponding PA_CLASS AV value or otherwise), then it should appear grouped inside a fieldset with the class associated with it.

However, sometimes that is not the case.. narrowing down when it happens is aluding me :(.

The fix is however clear; in members/memberentry.pl we refer to $attr_type via class methods in most places but treat it like a bare hashref for the class case.

Patch to follow.
Comment 1 Martin Renvoize (ashimema) 2021-01-13 11:28:14 UTC
Created attachment 115110 [details] [review]
Bug 27420: Use object accessor for $attr_type->class()

We introduced a bug in the patron attribute forms with bug 5161.

Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff
Comment 2 Jonathan Druart 2021-01-13 14:23:42 UTC
Created attachment 115114 [details] [review]
Bug 27420: Use object accessor for $attr_type->class()

We introduced a bug in the patron attribute forms with bug 5161.

Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Katrin Fischer 2021-01-17 15:59:23 UTC
This works well and I am passing QA, but there is some other oddity as the entries change sequence every time you reload the page. Filed as: bug 27454
Comment 4 Katrin Fischer 2021-01-17 16:00:58 UTC
Created attachment 115223 [details] [review]
Bug 27420: Use object accessor for $attr_type->class()

We introduced a bug in the patron attribute forms with bug 5161.

Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-01-19 15:24:26 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-01-20 07:26:23 UTC
Pushed to 20.11.x for 20.11.02
Comment 7 Andrew Fuerste-Henry 2021-01-22 14:07:30 UTC
Pushed to 20.05.x for 20.05.08
Comment 8 Victor Grousset/tuxayo 2021-01-22 20:46:19 UTC
Missing dependencies for 19.11.x, shouldn't be affected, no backport.