Summary: | Javascript error on article requests page | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Hold requests | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, martin.renvoize, nick |
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: | ||
Circulation function: | |||
Bug Depends on: | 21076 | ||
Bug Blocks: | |||
Attachments: |
Bug 21389: Correct Javascript error on article requests page
Bug 21389: Correct Javascript error on article requests page Bug 21389: Correct Javascript error on article requests page |
Description
Fridolin Somers
2018-09-21 09:15:47 UTC
Created attachment 79200 [details] [review] Bug 21389: Correct Javascript error on article requests page Bug 21076 fixed a Javascript error on article requests page when patron is found. There is also an error when patron is not found, with message : Patron not found No patron with this name, please, try another This patch fixes by replacing TT condition by a JS condition testing the existance of the patron input. Test plan: 1 - Do not apply patch 2 - Enable article requests 3 - Search on staff client and click 'Request article' 4 - Search for a patron that does not exist 5 - You get a yellow message "Patron not found" 6 - View error in console 7 - Apply patch 8 - Reload 9 - Not error is gone 10 - Search for a patron that does exist 11 - Check there is no error in console 12 - Check that autocompletion works Created attachment 79226 [details] [review] Bug 21389: Correct Javascript error on article requests page Bug 21076 fixed a Javascript error on article requests page when patron is found. There is also an error when patron is not found, with message : Patron not found No patron with this name, please, try another This patch fixes by replacing TT condition by a JS condition testing the existance of the patron input. Test plan: 1 - Do not apply patch 2 - Enable article requests 3 - Search on staff client and click 'Request article' 4 - Search for a patron that does not exist 5 - You get a yellow message "Patron not found" 6 - View error in console 7 - Apply patch 8 - Reload 9 - Not error is gone 10 - Search for a patron that does exist 11 - Check there is no error in console 12 - Check that autocompletion works Signed-off-by: Owen Leonard <oleonard@myacpl.org> I am wondering what is best here: 1. Check in JS or 2. Keep the same TT conditionals (i.e. [% UNLESS no_patrons_found || patrons || patron %]) (In reply to Jonathan Druart from comment #3) > I am wondering what is best here: > 1. Check in JS or > 2. Keep the same TT conditionals (i.e. [% UNLESS no_patrons_found || patrons > || patron %]) For me it logical to prefer JS checks for a JS code. Created attachment 80247 [details] [review] Bug 21389: Correct Javascript error on article requests page Bug 21076 fixed a Javascript error on article requests page when patron is found. There is also an error when patron is not found, with message : Patron not found No patron with this name, please, try another This patch fixes by replacing TT condition by a JS condition testing the existance of the patron input. Test plan: 1 - Do not apply patch 2 - Enable article requests 3 - Search on staff client and click 'Request article' 4 - Search for a patron that does not exist 5 - You get a yellow message "Patron not found" 6 - View error in console 7 - Apply patch 8 - Reload 9 - Not error is gone 10 - Search for a patron that does exist 11 - Check there is no error in console 12 - Check that autocompletion works Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.05 Pushed to 17.11.x for 17.11.12 |