To recreate, hide city_state for the cities table, create some cities and notice that using the "Country" column filter will actually filter on the hidden "State" column (the one on the left) Coming from bug 30063 comment 23 (point 5)
Created attachment 132830 [details] [review] Bug 30406: Add column filters before hiding columns The code that adds column filters works only on visible columns, so we should hide columns after filters are created Test plan: 1. Apply patch 2. Go to Tables settings. Hide city_state for the cities table. 3. Create some cities and go to the cities page 4. Verify that filtering works as expected. 5. Make the city_state column appear. Verify that filtering on this column works too
Created attachment 132921 [details] [review] Bug 30406: Add column filters before hiding columns The code that adds column filters works only on visible columns, so we should hide columns after filters are created Test plan: 1. Apply patch 2. Go to Tables settings. Hide city_state for the cities table. 3. Create some cities and go to the cities page 4. Verify that filtering works as expected. 5. Make the city_state column appear. Verify that filtering on this column works too Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
I never thought it would be so easily fixed ! Well done Julian :)
(In reply to Séverine Queune from comment #3) > I never thought it would be so easily fixed ! > Well done Julian :) Me neither :) Thanks for testing!
Created attachment 132959 [details] [review] Bug 30406: Add column filters before hiding columns The code that adds column filters works only on visible columns, so we should hide columns after filters are created Test plan: 1. Apply patch 2. Go to Tables settings. Hide city_state for the cities table. 3. Create some cities and go to the cities page 4. Verify that filtering works as expected. 5. Make the city_state column appear. Verify that filtering on this column works too Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ha! Good workaround, thanks Julian! We could apply the same fix to includes/columns_settings.inc but I didn't manage to recreate the problem on catalogue/detail.pl (I think it's the only place where column filters are used with KohaTable).
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.05
Pushed to 21.05.x for 21.05.14
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.
*** Bug 32448 has been marked as a duplicate of this bug. ***