https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260
--- Comment #573 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 209712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209712&action=edit Bug 33260: (QA follow-up) Fix ambiguous column when searching limited notices Converting a notice to print from the patron's Notices tab died with 'Column borrowernumber in WHERE is ambiguous' for a staff member whose notices are restricted to some libraries (for example with IndependentBranches, also with view_borrower_infos_from_any_libraries): search_limited joins the patron to restrict the notices to the libraries, and borrowernumber is a column of both tables. It only worked without a restriction because the unused join is then dropped. * search_limited now adds the name of the table to the columns of the notices that are passed without it, so callers cannot trip over the join. * The conversion on the patron's Notices tab says me.borrowernumber, which is clearer anyway. To test: 1. Apply the patches, enable NoticesManagement and IndependentBranches 2. Queue a sent email notice for a patron of your library 3. As a staff member with only the view_generated_notices and edit_borrowers permissions, go to the patron's Notices tab and click 'Convert to print' on the notice => The notice is converted. Before, the page died with the error above 4. prove t/db_dependent/Koha/Notice/Message.t 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/
