[Bug 12981] New: Patron attribute type limit by patron category not working on patron entry form
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Bug ID: 12981 Summary: Patron attribute type limit by patron category not working on patron entry form Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If you have a patron attribute type which is limited to a particular patron category the entry field will not appear on the patron entry form. The entry field for patron attribute types which have been limited by patron category are conditionally displayed based on the patron category. An error in the page's markup results in the patron category getting misreported, thus the JavaScript which shows and hides the entry fields incorrectly hides them. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 31845 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31845&action=edit Bug 12981 - Patron attribute type limit by patron category not working on patron entry form To reproduce this bug: - Create a patron attribute type and limit it by patron category - Create a new patron with that category - Observe that there is no entry field for the patron attribute type you created for that patron category. Inspecting the source should show that the entry field has been hidden. The patron entry form tries to hide patron attribute type input fields based on the currently selected patron category. It does this based on the value of $("categorycode"). However, instead of pulling the data from the categorycode input in the body of the entry form, it pulls it from the patron search box at the top of the page. The value of that input is always empty because no category is preselected. This patch corrects the problem by changing the ID of the categorycode <select> in the body of the entry form and making corresponding changes to the JavaScript which depends on it. To test, apply the patch and load the patron entry form for a patron category to which a patron attribute type has been limited. That patron attribute entry field should appear correctly. Choose a different patron category from the "Category" dropdown. Confirm that the patron attribute entry field has been hidden. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@quecheelibrary.org --- Comment #2 from Nick Clemens <nick@quecheelibrary.org> --- I confirmed the behavior The patch works as described. Does it matter that I can change the category in order to make the attribute show, fill it in, change it again and hide the field, but still have the information save? It reuires a pretty deliberate staff action but you end up with an attribute showing that you can't edit -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31845|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 32345 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32345&action=edit Bug 12981 - Patron attribute type limit by patron category not working on patron entry form To reproduce this bug: - Create a patron attribute type and limit it by patron category - Create a new patron with that category - Observe that there is no entry field for the patron attribute type you created for that patron category. Inspecting the source should show that the entry field has been hidden. The patron entry form tries to hide patron attribute type input fields based on the currently selected patron category. It does this based on the value of $("categorycode"). However, instead of pulling the data from the categorycode input in the body of the entry form, it pulls it from the patron search box at the top of the page. The value of that input is always empty because no category is preselected. This patch corrects the problem by changing the ID of the categorycode <select> in the body of the entry form and making corresponding changes to the JavaScript which depends on it. To test, apply the patch and load the patron entry form for a patron category to which a patron attribute type has been limited. That patron attribute entry field should appear correctly. Choose a different patron category from the "Category" dropdown. Confirm that the patron attribute entry field has been hidden. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32345|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 32503 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32503&action=edit [PASSED QA] Bug 12981 - Patron attribute type limit by patron category not working on patron entry form To reproduce this bug: - Create a patron attribute type and limit it by patron category - Create a new patron with that category - Observe that there is no entry field for the patron attribute type you created for that patron category. Inspecting the source should show that the entry field has been hidden. The patron entry form tries to hide patron attribute type input fields based on the currently selected patron category. It does this based on the value of $("categorycode"). However, instead of pulling the data from the categorycode input in the body of the entry form, it pulls it from the patron search box at the top of the page. The value of that input is always empty because no category is preselected. This patch corrects the problem by changing the ID of the categorycode <select> in the body of the entry form and making corresponding changes to the JavaScript which depends on it. To test, apply the patch and load the patron entry form for a patron category to which a patron attribute type has been limited. That patron attribute entry field should appear correctly. Choose a different patron category from the "Category" dropdown. Confirm that the patron attribute entry field has been hidden. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Owen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12981 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org