Bug 18047 - JavaScript error on item search form unless LOC defined
Summary: JavaScript error on item search form unless LOC defined
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 16115
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-03 11:36 UTC by Nick Clemens
Modified: 2017-02-23 20:22 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18047 - JavaScript error on item search form unless LOC defined (2.24 KB, patch)
2017-02-03 11:40 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18047 - JavaScript error on item search form unless LOC defined (2.29 KB, patch)
2017-02-13 02:23 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 18047 - JavaScript error on item search form unless LOC defined (2.35 KB, patch)
2017-02-14 10:18 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-02-03 11:36:47 UTC
If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'
Comment 1 Nick Clemens 2017-02-03 11:40:59 UTC
Created attachment 59875 [details] [review]
Bug 18047 - JavaScript error on item search form unless LOC defined

If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'

This patch fixes it by handling this specific case.

Note that the "Status" column is still displayed.

Test plan:
Remove your LOC authorised values
Go on the item search form
=> You will not get the JS error and the "Shelving location" bloc is no longer
displayed. There is no need to display it if empty.
Comment 2 M. Tompsett 2017-02-13 02:22:52 UTC
Didn't cleanly apply without applying 16115 first. :)
Comment 3 M. Tompsett 2017-02-13 02:23:32 UTC
Created attachment 60135 [details] [review]
Bug 18047 - JavaScript error on item search form unless LOC defined

If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'

This patch fixes it by handling this specific case.

Note that the "Status" column is still displayed.

Test plan:
Remove your LOC authorised values
Go on the item search form
=> You will not get the JS error and the "Shelving location" bloc is no longer
displayed. There is no need to display it if empty.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Jonathan Druart 2017-02-14 10:18:31 UTC
Created attachment 60179 [details] [review]
Bug 18047 - JavaScript error on item search form unless LOC defined

If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'

This patch fixes it by handling this specific case.

Note that the "Status" column is still displayed.

Test plan:
Remove your LOC authorised values
Go on the item search form
=> You will not get the JS error and the "Shelving location" bloc is no longer
displayed. There is no need to display it if empty.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Kyle M Hall 2017-02-14 14:11:38 UTC
Pushed to master for 17.05, thanks Nick!
Comment 6 Katrin Fischer 2017-02-14 20:53:29 UTC
This patch has been pushed to 16.11.x and will be in 16.11.04.
Comment 7 Julian Maurice 2017-02-20 10:02:38 UTC
Pushed to 3.22.x for 3.22.17
Comment 8 Mason James 2017-02-23 20:22:19 UTC
Pushed to 16.05.x, for 16.05.10 release