Bug 21076

Summary: Javascript error on article requests page
Product: Koha Reporter: Nick Clemens <nick>
Component: Hold requestsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, katrin.fischer, martin.renvoize
Version: master   
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:
Bug Depends on:    
Bug Blocks: 21389    
Attachments: Bug 21076: Don't call autocomplete code after patron found
Bug 21076: Don't call autocomplete code after patron found
Bug 21076: Don't call autocomplete code after patron found

Description Nick Clemens 2018-07-13 17:49:01 UTC
TypeError: $(...).autocomplete(...).data(...) is undefined[Learn More]

Calling code on patron search box when not always present
Comment 1 Nick Clemens 2018-07-13 17:51:22 UTC
Created attachment 76959 [details] [review]
Bug 21076: Don't call autocomplete code after patron found

To test:
1 - Enable article requests
2 - Search on staff client
3 - Click 'Request article'
4 - Find a patron
5 - View error in console
6 - Apply patch
7 - Reload
8 - Not error is gone
Comment 2 Maryse Simard 2018-07-13 19:28:19 UTC
Created attachment 76962 [details] [review]
Bug 21076: Don't call autocomplete code after patron found

To test:
1 - Enable article requests
2 - Search on staff client
3 - Click 'Request article'
4 - Find a patron
5 - View error in console
6 - Apply patch
7 - Reload
8 - Not error is gone

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Comment 3 Katrin Fischer 2018-07-18 05:52:24 UTC
Created attachment 77063 [details] [review]
Bug 21076: Don't call autocomplete code after patron found

To test:
1 - Enable article requests
2 - Search on staff client
3 - Click 'Request article'
4 - Find a patron
5 - View error in console
6 - Apply patch
7 - Reload
8 - Not error is gone

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2018-07-18 05:53:17 UTC
This fixes the JavaScript error, but I noticed a little difference to how the search on the hold page works: When you click the autocomplete result, it translates to the cardnumber and you have to search again - for holds you are immediately forwarded to the record. Maybe something for a future bug.
Comment 5 Nick Clemens 2018-07-19 17:37:58 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize 2018-08-02 13:40:07 UTC
Pushed to 18.05.x for 18.05.03
Comment 7 Fridolin Somers 2018-09-21 09:09:26 UTC
Pushed to 17.11.x for 17.11.10
Comment 8 Fridolin Somers 2018-09-21 09:16:28 UTC
Found a new JS error, see Bug 21389