Created attachment 122973 [details] [review] Bug 28723: Fix holds table display when a biblio has no title Test plan: 1. Create a biblio without title, then create an item for this biblio. 2. Place a hold on it. 3. Go to the patron detail page and click on the Holds tab 4. Confirm that holds are correctly displayed Created attachment 122975 [details] [review] Bug 28723: Fix holds table display when a biblio has no title Test plan: 1. Create a biblio without title, then create an item for this biblio. 2. Place a hold on it. 3. Go to the patron detail page and click on the Holds tab 4. Confirm that holds are correctly displayed The English text added in the patch is untranslatable, please see https://wiki.koha-community.org/wiki/Coding_Guidelines#JS5:_Enabling_translation_of_language_strings_in_linked_JavaScript Created attachment 135447 [details] [review] Bug 28723: Fix holds table display when a biblio has no title Test plan: 1. Create a biblio without title, then create an item for this biblio. 2. Place a hold on it. 3. Go to the patron detail page and click on the Holds tab 4. Confirm that holds are correctly displayed (In reply to Joonas Kylmälä from comment #3) > The English text added in the patch is untranslatable Fixed in the last patch Created attachment 135452 [details] [review] Bug 28723: Fix holds table display when a biblio has no title Test plan: 1. Create a biblio without title, then create an item for this biblio. 2. Place a hold on it. 3. Go to the patron detail page and click on the Holds tab 4. Confirm that holds are correctly displayed Signed-off-by: David Nind <david@davidnind.com> koha-tmpl/intranet-tmpl/prog/js/checkouts.js: + (oObj.title ? oObj.title.escapeHtml() : '' ); koha-tmpl/intranet-tmpl/prog/js/checkouts.js: + (oObj.title ? oObj.title.escapeHtml() : '' ); koha-tmpl/intranet-tmpl/prog/js/holds.js: + (oObj.title ? oObj.title.escapeHtml() : __('No title')); It's inconsistent. (In reply to Jonathan Druart from comment #7) > It's inconsistent. What do you suggest ? I can replace 'No title' by an empty string, but if instead we want 'No title' in checkouts.js too, that should be done in another bug IMO biblio-title.inc uses 'No title' I would go with the empty string for now. Created attachment 135484 [details] [review] Bug 28723: Replace "No title" by an empty string This is to be consistent with what is done in checkouts.js Created attachment 135485 [details] [review] Bug 28723: Fix holds table display when a biblio has no title Test plan: 1. Create a biblio without title, then create an item for this biblio. 2. Place a hold on it. 3. Go to the patron detail page and click on the Holds tab 4. Confirm that holds are correctly displayed Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 135486 [details] [review] Bug 28723: Replace "No title" by an empty string This is to be consistent with what is done in checkouts.js Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 22.11. Nice work everyone, thanks! Pushed to 22.05.x for 22.05.01 pushed to 21.11.x for 21.11.07, thx! Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved. |
Steps to reproduce: 1. Create a biblio without title, then create an item for this biblio. 2. Place a hold on it. 3. Go to the patron detail page and click on the Holds tab 4. Confirm that holds are not displayed (the table is there but empty) In the browser console you can see an error message: > Uncaught TypeError: oObj.title is null