In Koha 20.05 and 19.11, when a Professional Patron Category patron and an Organizational patron category patron are linked, from the Professional patron, there is a tab to see the 'Relative Checkouts', but Koha just will spin and say processing. Koha is looking for a first name to link the relative checkouts from a professional to the linked Organizational patron. On an organizational patron, there is no first name and therefore Koha can not do the link.
*** 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?