Summary: | ILS-DI does not record renewer_id for renewals creating issue with renewal history view | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Web services | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | RESOLVED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | major | ||
Priority: | P5 - low | CC: | arthur.suzuki, david, janet.mcgowan, lucas, matt.blenkinsop |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.06,22.05.13
|
|
Circulation function: | |||
Attachments: |
Bug 33504: Update patron_to_html to deal with null
Bug 33504: Update patron_to_html to deal with null Bug 33504: Update patron_to_html to deal with null |
Description
Martin Renvoize (ashimema)
2023-04-12 10:09:37 UTC
Oh.. I'm wrong.. it's not that we don't handle it.... it's that we somehow don't have a userenv for ils-di sessions if I'm not mistaken? The symptom here is that the renewal history modal fails to load as the renewer_id isn't set for ils-di renewals. Created attachment 149524 [details] [review] Bug 33504: Update patron_to_html to deal with null In the patron_to_html function we were dealing explicitly with the case where patron may be passed undefined, but forgetting that it may be returned as 'null' from the api too. Changing from `( patron === undefined )` to `( patron == null )` is the recommended approach for detecting 'undefined or null' in javascript. This fixes the symptom, not the cause. To test. 1) Use ILS-DI to renew an checkout 2) View the circulation history for the item 3) Click the 'View' button next to the count of renewals 4) Note that the modal just stalls at 'Retrieving renewals' 5) Apply the patch 6) Now the 'retrieving renewals' message should list the renewals instead. Created attachment 150184 [details] [review] Bug 33504: Update patron_to_html to deal with null In the patron_to_html function we were dealing explicitly with the case where patron may be passed undefined, but forgetting that it may be returned as 'null' from the api too. Changing from `( patron === undefined )` to `( patron == null )` is the recommended approach for detecting 'undefined or null' in javascript. Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. Martin's test plan from Bugzilla: To test. 1) Use ILS-DI to renew an checkout 2) View the circulation history for the item 3) Click the 'View' button next to the count of renewals 4) Note that the modal just stalls at 'Retrieving renewals' 5) Apply the patch 6) Now the 'retrieving renewals' message should list the renewals instead. Note that step 2 should be something like "Go to the "Circulation history" of the patron. https://bugs.koha-community.org/show_bug.cgi?id=22504 Hi Magnus You may wish to change the status to signed off. 8-) And maybe remove the Bugzilla link at the end. David Created attachment 150451 [details] [review] Bug 33504: Update patron_to_html to deal with null In the patron_to_html function we were dealing explicitly with the case where patron may be passed undefined, but forgetting that it may be returned as 'null' from the api too. Changing from `( patron === undefined )` to `( patron == null )` is the recommended approach for detecting 'undefined or null' in javascript. Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. Martin's test plan from Bugzilla: To test. 1) Use ILS-DI to renew an checkout 2) View the circulation history for the item 3) Click the 'View' button next to the count of renewals 4) Note that the modal just stalls at 'Retrieving renewals' 5) Apply the patch 6) Now the 'retrieving renewals' message should list the renewals instead. Note that step 2 should be something like "Go to the "Circulation history" of the patron. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.05. Nice work everyone, thanks! Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release Backported to 22.05.x for upcoming 22.05.13 |