Summary: | Setting to guarantor: JavaScript error form.branchcode is undefined | ||
---|---|---|---|
Product: | Koha | Reporter: | Marc Véron <veron> |
Component: | Patrons | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | brendan, f.demians, gmcharlt, jonathan.druart, julian.maurice, kyle.m.hall, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16450 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 16458: Update library when a guarantor is set
[SIGNED-OFF] Bug 16458: Update library when a guarantor is set Bug 16458: Update library when a guarantor is set |
Description
Marc Véron
2016-05-05 19:05:59 UTC
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? (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? Created attachment 51413 [details] [review] 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 Created attachment 51447 [details] [review] [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> I still see: TypeError: document.form.password is undefined (members.js line 107) (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. Created attachment 52025 [details] [review] 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> (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? Pushed to Master - Should be in the November 2016 Release. Thanks! Pushed in 16.05. Will be in 16.05.01. Patch pushed to 3.22.x, will be in 3.22.8 |