Bug 21703 - Placing holds in staff is broken (TT filter)
Summary: Placing holds in staff is broken (TT filter)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on: 13618
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-27 21:12 UTC by Katrin Fischer
Modified: 2019-10-14 19:57 UTC (History)
4 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:


Attachments
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again (1.79 KB, patch)
2018-10-27 21:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again (1.83 KB, patch)
2018-10-28 12:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again (1.89 KB, patch)
2018-10-28 12:20 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 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 & 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.