Bug 25615

Summary: Empty select in "Holds to pull" filters
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: aleisha, lucas, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.01, 19.11.07, 19.05.13
Bug Depends on: 22536    
Bug Blocks:    
Attachments: Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

Description Jonathan Druart 2020-05-28 10:11:20 UTC
Caused by 
  commit 9a321c128fed457bf6d11d2ce7ee7edf7dd28004
  Bug 22536: Display problem in Holds to Pull report


https://snipboard.io/BoULP6.jpg
Comment 1 Jonathan Druart 2020-05-28 10:14:47 UTC
Created attachment 105406 [details] [review]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

On the "Holds to pull" view there are filters that are built on the
value of the cells.
Bug 22536 improved the ergonomic by adding a ul list, but the filters
are now broken, the ul and li tags are retrieved and put in the filter
list.

The idea of this patch is to remove the HTML tags and skip if the value
is then empty.

Test plan:
Place a hold on an item
Go to Home › Circulation › Holds to pull
Open the "libraries" filter
=> Without this patch you see empty entries
=> With this patch the filter contain only the libraries
Comment 2 Jonathan Druart 2020-05-28 10:18:41 UTC
And, of course, make sure the filter works!
Comment 3 Owen Leonard 2020-05-28 10:49:57 UTC
Created attachment 105407 [details] [review]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

On the "Holds to pull" view there are filters that are built on the
value of the cells.
Bug 22536 improved the ergonomic by adding a ul list, but the filters
are now broken, the ul and li tags are retrieved and put in the filter
list.

The idea of this patch is to remove the HTML tags and skip if the value
is then empty.

Test plan:
Place a hold on an item
Go to Home › Circulation › Holds to pull
Open the "libraries" filter
=> Without this patch you see empty entries
=> With this patch the filter contain only the libraries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Nick Clemens 2020-05-28 11:51:26 UTC
Created attachment 105410 [details] [review]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

On the "Holds to pull" view there are filters that are built on the
value of the cells.
Bug 22536 improved the ergonomic by adding a ul list, but the filters
are now broken, the ul and li tags are retrieved and put in the filter
list.

The idea of this patch is to remove the HTML tags and skip if the value
is then empty.

Test plan:
Place a hold on an item
Go to Home › Circulation › Holds to pull
Open the "libraries" filter
=> Without this patch you see empty entries
=> With this patch the filter contain only the libraries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Jonathan Druart 2020-06-15 10:00:41 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Lucas Gass 2020-06-17 23:00:51 UTC
backported to 20.05.x for 20.05.01
Comment 7 Aleisha Amohia 2020-06-22 03:56:30 UTC
backported to 19.11.x for 19.11.07
Comment 8 Victor Grousset/tuxayo 2020-07-03 05:13:43 UTC
Backported to 19.05.x branch for 19.05.13