https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260
--- Comment #525 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 209457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209457&action=edit Bug 33260: (QA follow-up) Repair the tests and notice classes after rebase Bring the patchset up to date with main and fix what QA found: * Koha::Notice::Messages->search_limited no longer modifies the passed conditions, ANDs its library restriction with any condition on the patron's library instead of replacing it, keeps a join passed by the caller, and returns nothing when the logged in patron cannot be found instead of everything. POD documents the behaviour, including that notices without a patron are only returned when there is no restriction. * Koha::Notice::Message->scoped_style produced broken CSS: the scope was inserted in the middle of declarations as soon as there was more than one rule, and rules inside @media and similar at-rules were lost. Replace the regular expressions by a small CSS scoper that handles comments, selector lists (split on their top level commas only) and nested @media, @supports, @document, @layer and @container rules, maps html, body and :root to the notice container, and does not warn when no styles are defined for the transport type. The same scoper is available for the styles of a notice template with Koha::Notice::Message->scoped_template_style. * Add the missing 'use' lines, and POD for _type and object_class. * Tests: search_limited now needs the library groups to hide patron information (Bug 20133), cover the other restriction cases and no longer leaks its transaction; add scoped_style and scoped_template_style tests; correct the test plans of Message.t and Letters.t. * Remove the 'notice_mgmt' branch from printslip.tt (nothing sets it any more since printing moved to members/print_notice.pl) and the unused link_to 'notices' in patron_autocomplete. * Make the permission atomicupdate executable, end patrons.pref and userpermissions.sql with a newline. To test: 1. Run the unit tests inside KTD: ktd --shell --run 'prove t/db_dependent/Koha/Notice/Message.t t/db_dependent/Letters.t t/Koha/Auth/Permissions.t' 2. Run the QA script and confirm there are no failures 3. Sign off Co-Authored-By: Claude Sonnet 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
