Bug 21703

Summary: Placing holds in staff is broken (TT filter)
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Staff interfaceAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, jonathan.druart, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21704
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:    
Attachments: Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again

Description Katrin Fischer 2018-10-27 21:12:52 UTC

    
Comment 1 Katrin Fischer 2018-10-27 21:14:18 UTC
The dataurl variable is already escaped, so the uri filter breaks it. 

To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
Comment 2 Katrin Fischer 2018-10-27 21:17:38 UTC
Created attachment 81375 [details] [review]
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again

The uri filter breaks the dataurl variable in the template and
the URL is incorrect with it.

To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
- Apply patch
- Repeat test above, placing a hold should now work.

https://bugs.koha-community.org/show_bug.cgi?id=21413
Comment 3 Jonathan Druart 2018-10-28 00:36:27 UTC
At first glance I'd say the filter should be 'url'.
Comment 4 Katrin Fischer 2018-10-28 00:37:40 UTC
Can you explain?
Comment 5 Katrin Fischer 2018-10-28 00:38:36 UTC
I am wondering if the &amp; in the URL above is correct.
Comment 6 Jonathan Druart 2018-10-28 12:02:34 UTC
Created attachment 81402 [details] [review]
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again

We must not encode & again and use the url filter, instead of uri.

To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
- Apply patch
- Repeat test above, placing a hold should now work.
Comment 7 Katrin Fischer 2018-10-28 12:20:06 UTC
Created attachment 81404 [details] [review]
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again

We must not encode & again and use the url filter, instead of uri.

To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
- Apply patch
- Repeat test above, placing a hold should now work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2018-10-28 12:20:37 UTC
Tiny change - switching to PQA right away. Thx Jonathan!
Comment 9 Katrin Fischer 2018-10-28 15:24:25 UTC
Downgrading severity a bit as searches with one result will work.
Comment 10 Nick Clemens 2018-10-29 01:18:23 UTC
Awesome work all!

Pushed to master for 18.11
Comment 11 Martin Renvoize 2018-11-08 15:34:38 UTC
Caused by bug 13618 not in 18.05.x series.