Summary: | Error when trying to access Relative Checkouts between Professional and Organizational patron categories | ||
---|---|---|---|
Product: | Koha | Reporter: | Kelly McElligott <kelly> |
Component: | Patrons | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, fridolin.somers, gmcharlt, jonathan.druart, jzairo, kyle.m.hall, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27133 | ||
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
|
|
Circulation function: | |||
Attachments: |
Bug 26797: Escape firstname to prevent relative's checkouts to crash
Bug 26797: Escape firstname to prevent relative's checkouts to crash Bug 26797: Escape firstname to prevent relative's checkouts to crash |
Description
Kelly McElligott
2020-10-23 12:37:59 UTC
*** Bug 26796 has been marked as a duplicate of this bug. *** Confirmed on master. Created attachment 114091 [details] [review] Bug 26797: Escape firstname to prevent relative's checkouts to crash If no firstname is defined for a relative, the "Relative's checkouts" tab will be "processing" forever. JS error: TypeError: oObj.borrower.firstname is null Test plan: Patron A is Org and guarantor of patron B Check an item out to B Go to the details page of A, click "Relative's checkouts" Note that there is a UI issue display (header number mismatch). See bug 27133. Created attachment 114099 [details] [review] Bug 26797: Escape firstname to prevent relative's checkouts to crash If no firstname is defined for a relative, the "Relative's checkouts" tab will be "processing" forever. JS error: TypeError: oObj.borrower.firstname is null Test plan: Patron A is Org and guarantor of patron B Check an item out to B Go to the details page of A, click "Relative's checkouts" Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> I have an organization (school) with a guarantee that doesn't have a firstname. (empty string, also tested with a patron created without firstname) But I don't have an error in the console and the table loads. What is missing in my test plan? https://picat.drycat.fr/aXxAy7eU.png I even tried with a library being the guarantee of a school. Created attachment 114977 [details] [review] Bug 26797: Escape firstname to prevent relative's checkouts to crash If no firstname is defined for a relative, the "Relative's checkouts" tab will be "processing" forever. JS error: TypeError: oObj.borrower.firstname is null Test plan: 1 - Create a patron (PatronA) in a category with type 'Org' 'School' in sample data works 2 - Add a guarantee (Patron B) 3 - Check out an item to PatronA 4 - Go to PatronB's record and click relativwe's checkouts 5 - There is an error and the table doe snot load 6 - Apply patch 7 - Reload 8 - Table loads correctly Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> (In reply to Victor Grousset/tuxayo from comment #6) > I have an organization (school) with a guarantee that doesn't have a > firstname. (empty string, also tested with a patron created without > firstname) > But I don't have an error in the console and the table loads. > What is missing in my test plan? > > https://picat.drycat.fr/aXxAy7eU.png > > I even tried with a library being the guarantee of a school. The patch was correct, the test plan was wrong - the guarantee could not load the checkouts for the guarantor Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.02 This doesn't fix the issue for me in 20.05. Patch applies fine, but I get this error when trying to see the Org's checkoouts in the prof's record: checkouts_20.0507002.js:785 Uncaught TypeError: Cannot read property 'escapeHtml' of null at mDataProp (checkouts_20.0507002.js:785) at datatables.min_20.0507002.js:57 at Object.b.fnGetData (datatables.min_20.0507002.js:51) at B (datatables.min_20.0507002.js:56) at Ha (datatables.min_20.0507002.js:64) at O (datatables.min_20.0507002.js:55) at datatables.min_20.0507002.js:88 at i (datatables.min_20.0507002.js:74) at Object.success (checkouts_20.0507002.js:802) at i (jquery-2.2.3.min_20.0507002.js:2) Jonathan, any ideas? Andrew, it looks like a cache issue, can you confirm the cache has been correctly flushed? |