Bug 22596 - html TT filter is breaking items search with custom field
Summary: html TT filter is breaking items search with custom field
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 13618
Blocks: 20888 22595
  Show dependency treegraph
 
Reported: 2019-03-27 14:35 UTC by Fridolin Somers
Modified: 2020-06-04 20:33 UTC (History)
5 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 22596: use raw TT filter in items search with custom field (1.43 KB, patch)
2019-03-27 14:42 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 22596: use raw TT filter in items search with custom field (1.47 KB, patch)
2019-03-27 21:16 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22596: use raw TT filter in items search with custom field (1.57 KB, patch)
2019-03-29 10:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2019-03-27 14:35:45 UTC
When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.
Comment 1 Fridolin Somers 2019-03-27 14:42:03 UTC
Created attachment 87071 [details] [review]
Bug 22596: use raw TT filter in items search with custom field

When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use the "New field" link
5) Check use of custom field is OK
Comment 2 Liz Rea 2019-03-27 21:16:35 UTC
Created attachment 87123 [details] [review]
Bug 22596: use raw TT filter in items search with custom field

When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use the "New field" link
5) Check use of custom field is OK

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 3 Marcel de Rooy 2019-03-29 10:22:34 UTC
Created attachment 87170 [details] [review]
Bug 22596: use raw TT filter in items search with custom field

When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use the "New field" link
5) Check use of custom field is OK

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Nick Clemens (kidclamp) 2019-03-29 11:46:25 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize (ashimema) 2019-04-01 14:07:41 UTC
Pushed to 18.11.x for 18.11.05
Comment 6 Lucas Gass (lukeg) 2019-04-01 16:50:58 UTC
wont backport to 18.05.x series
Comment 7 Jonathan Druart 2019-04-05 01:04:17 UTC
IMO it would have been better to encode TT-side (see TT plugin To.json), raw must be avoided as much as possible.
Comment 8 Jonathan Druart 2019-04-29 01:59:42 UTC
(In reply to Jonathan Druart from comment #7)
> IMO it would have been better to encode TT-side (see TT plugin To.json), raw
> must be avoided as much as possible.

This must be addressed, we should not use $raw when can be avoided.