[Bug 38844] New: Display location filter breaks News
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 Bug ID: 38844 Summary: Display location filter breaks News Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: cbrannon@cdalibrary.org QA Contact: testopia@bugs.koha-community.org When looking at News, if you change the display location filter to anything except all, nothing shows. This filter appears to be broken. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Christopher, were you logged in when looking at the page? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 Jason Robb <jrobb@sekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jrobb@sekls.org --- Comment #2 from Jason Robb <jrobb@sekls.org> --- Can confirm this is happening on our system and main as well. To replicate: 1. Go to Tools > News 2. Add a news item for each of the location types (Staff interface and OPAC, Staff interface, OPAC, Slip) 3. Go back to the News landing page 4. Try using the "Display location" filter in the left column to filter the table of news items - only the "All" and "Slip" choices work correctly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ah! I was totally in the wrong place. Thanks for explaining! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- This seems to be an issue with the data table filter not liking snake case that is used in additional_contents for location for staff_only, opac_only and staff_and_opac. For other HTML customizations that work the location is in camel case like CookieConsentPopup. Not sure if we can do something to have the datatable filter escape the _ or if we should change the the snake case to camel case wherever it's required. Another possible solution would be to have the filter use the option's text instead of its value as is done for the Library column for some reason. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 178804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178804&action=edit Bug 38844: Fix location filter for News html customizations This patch changes the #news_display_location filter to use the option's text instead of it's value. The filter previously did not work when the location field in additional_contents used snake case as in staff_only. Test plan: 1. Go to Tools > News 2. Add a news item for each of the location types (Staff interface and OPAC, Staff interface, OPAC, Slip) 3. Go back to the News landing page 4. Try using the "Display location" filter in the left column to filter the table of news items - only the "All" and "Slip" choices work correctly. 5. Apply patch 6. Confirm the "Display location" filter works for All, Staff interface and OPAC, Staff interface, OPAC, and Slip -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178804|0 |1 is obsolete| | --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 178805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178805&action=edit Bug 38844: Fix location filter for News html customizations This patch changes the #news_display_location filter to use the option's text instead of it's value. The filter previously did not work when the location field in additional_contents used snake case as in staff_only. Test plan: 1. Go to Tools > News 2. Add a news item for each of the location types (Staff interface and OPAC, Staff interface, OPAC, Slip) 3. Go back to the News landing page 4. Try using the "Display location" filter in the left column to filter the table of news items - only the "All" and "Slip" choices work correctly. 5. Apply patch 6. Confirm the "Display location" filter works for All, Staff interface and OPAC, Staff interface, OPAC, and Slip -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38844 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |magnus@libriotech.no --- Comment #7 from Magnus Enger <magnus@libriotech.no> --- Can't get this to work, sorry. - Applied the patch - yarn js:build - restart_all - Tested in a regular window and am incognito window The table shows news for all the different locations. Changing the "Display location" dropdown does not affect the table at all, all items are always displayed. I see this in the console: additional-contents.pl:2057 Uncaught TypeError: table.column is not a function at filterDataTable (additional-contents.pl:2057:27) at HTMLSelectElement.<anonymous> (additional-contents.pl:2133:21) at HTMLSelectElement.dispatch (jquery-3.6.0.min_24.1200015.js:2:43064) at v.handle (jquery-3.6.0.min_24.1200015.js:2:41048) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org