Bug 22596

Summary: html TT filter is breaking items search with custom field
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: SearchingAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, lucas, m.de.rooy, 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:
Bug Depends on: 13618    
Bug Blocks: 20888, 22595    
Attachments: Bug 22596: use raw TT filter in items search with custom field
Bug 22596: use raw TT filter in items search with custom field
Bug 22596: use raw TT filter in items search with custom field

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 2019-03-29 11:46:25 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-04-01 14:07:41 UTC
Pushed to 18.11.x for 18.11.05
Comment 6 Lucas Gass 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.