Bug 21076 - Javascript error on article requests page
Summary: Javascript error on article requests page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 21389
  Show dependency treegraph
 
Reported: 2018-07-13 17:49 UTC by Nick Clemens (kidclamp)
Modified: 2019-10-14 19:57 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21076: Don't call autocomplete code after patron found (2.89 KB, patch)
2018-07-13 17:51 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 21076: Don't call autocomplete code after patron found (2.98 KB, patch)
2018-07-13 19:28 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 21076: Don't call autocomplete code after patron found (3.04 KB, patch)
2018-07-18 05:52 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 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 (kidclamp) 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 (kidclamp) 2018-07-19 17:37:58 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize (ashimema) 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