https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260
Martin Renvoize (ashimema) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #575 from Martin Renvoize (ashimema) <[email protected]> --- Thanks Andrew, good catch on the Convert to print crash. Cause: Koha::Notice::Messages->search_limited joins the patron table to restrict the notices to the libraries the staff member can see, and borrowernumber is a column of both tables. The Convert to print action on the patron's Notices tab passed a bare borrowernumber, so for any staff member whose notices are restricted to some libraries (including a user with view_borrower_infos_from_any_libraries when IndependentBranches is enabled) the query was ambiguous. Without a restriction the unused join is dropped, which is why it only showed up for some users. Fix, in a new follow-up patch before the last one (the optional 'confirm printed' patch is still last, so it can be dropped on its own): search_limited now adds the table name to the columns of the notices that are passed without it, so callers can't trip over the join, and the patron tab uses me.borrowernumber explicitly. There are tests for it, including the view_borrower_infos_from_any_libraries with IndependentBranches case. I also made the atomic update that adds the 'printed' status skip when the status exists already, so re-running the database updates on a development database with converted notices no longer errors. The whole series is re-attached, rebased on current main, with the sign-offs carried over. The previous patches are obsolete. Thank you for the notes for the release notes: I have updated the release notes of this bug to describe the whole series as it is now, including gather_print_notices setting 'printed' rather than 'sent', the content of password reset, registration verification and 2FA notices no longer being shown or printable, Convert to print, and the new permission, preference and statuses. Setting to Signed Off for another look at the new follow-ups. -- 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/
