[Bug 16458] New: Setting to guarantor: JavaScript error form.branchcode is undefined
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Bug ID: 16458 Summary: Setting to guarantor: JavaScript error form.branchcode is undefined 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: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To reproduce: - Go to a child parton's detail page - Edit it using the toolbar item "Edit" - Edit "Guarantor information", "Set to patron" or "Change patron" - Select a patron =>Result OK (patron search window closes, guarantor information is set, e.g. Library changes to Guarantor's library if it is different) - Go back to child patron's detail page - This time do not use toolbar "Edit" but the "Edit" link below "Date of birth" / "Guarantor" - Edit "Guarantor information", "Set to patron" or "Change patron" - Select a patron =>Result NOT OK (patron search window does not close, JavaScript console says: TypeError: form.branchcode is undefined (...)/intranet-tmpl/prog/js/members.js Line: 213 Some of the Guarantor's information is not set, e.g. library if it is different. I found this while testing Bug 16450, this error appears without and with 16450 applied. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16450 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It's a tricky one, the JS error occurs because the libraries select is not displayed in the page. Should we update the library even if it's not displayed? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 --- Comment #2 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #1)
It's a tricky one, the JS error occurs because the libraries select is not displayed in the page. Should we update the library even if it's not displayed?
I think it should be consistent. If it's updated if you reach the form via the toolbar Edit it should be updated as well if you go via the "Edit" link. Or it should not be updated in both ways. Maybe there are more values that are not consitently updated? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51413 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51413&action=edit Bug 16458: Update library when a guarantor is set If you edit a patron from the Edit link of the patron information block (step 1 of the memberentry script), the branchcode is not displayed. If you set a guarantor to a child from this form, a JavaScript error will be raised: JavaScript error form.branchcode is undefined It happens because there is the branchcode is not displayed and there is no element with a branchcode name. To avoid this issue, a branchcode hidden input is added to the form and it will be updated when a guarantor is selected (same behavior as when you edit a patron using the complete form). Test plan: Edit a patron using the Edit link of the patron info block (not the Edit button in the toolbar) Set a guarantor => Notice that the branchcode of the patron has been updated with the branchcode of the guarantor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51413|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 51447 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51447&action=edit [SIGNED-OFF] Bug 16458: Update library when a guarantor is set If you edit a patron from the Edit link of the patron information block (step 1 of the memberentry script), the branchcode is not displayed. If you set a guarantor to a child from this form, a JavaScript error will be raised: JavaScript error form.branchcode is undefined It happens because there is the branchcode is not displayed and there is no element with a branchcode name. To avoid this issue, a branchcode hidden input is added to the form and it will be updated when a guarantor is selected (same behavior as when you edit a patron using the complete form). Test plan: Edit a patron using the Edit link of the patron info block (not the Edit button in the toolbar) Set a guarantor => Notice that the branchcode of the patron has been updated with the branchcode of the guarantor Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I still see: TypeError: document.form.password is undefined (members.js line 107) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #5)
I still see: TypeError: document.form.password is undefined (members.js line 107)
Hi Marcel, It's another bug, without this patch you are not able to set a guarantor. It seems that you get the error when saving the patron form. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51447|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52025&action=edit Bug 16458: Update library when a guarantor is set If you edit a patron from the Edit link of the patron information block (step 1 of the memberentry script), the branchcode is not displayed. If you set a guarantor to a child from this form, a JavaScript error will be raised: JavaScript error form.branchcode is undefined It happens because there is the branchcode is not displayed and there is no element with a branchcode name. To avoid this issue, a branchcode hidden input is added to the form and it will be updated when a guarantor is selected (same behavior as when you edit a patron using the complete form). Test plan: Edit a patron using the Edit link of the patron info block (not the Edit button in the toolbar) Set a guarantor => Notice that the branchcode of the patron has been updated with the branchcode of the guarantor Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #6)
(In reply to Marcel de Rooy from comment #5)
I still see: TypeError: document.form.password is undefined (members.js line 107)
Hi Marcel, It's another bug, without this patch you are not able to set a guarantor. It seems that you get the error when saving the patron form.
Well, ok. I am passing qa on this one. @RM: There may be little bit more to fix in this area? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #9 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the November 2016 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #10 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.01. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16458 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.8 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org