If a patron anonymizes their checkins, the checkin slip cannot retrieve any info to print the checkin slip. We should not show the button in this scenario
Created attachment 161592 [details] [review] Bug 35924: Hide the print checkins button on the patron screens for patron's who always anonymize If a patron anonymizes their checkins, the checkin slip cannot retrieve any info to print the checkin slip. We should not show the button in this scenario Test Plan: 1) Set a patron's privacy to "Never" 2) Note the "Print checkin slip" option in the Print button on the patrons toolbar displays 3) Apply this patch 4) Reload the page 5) Note the option is now missing 6) Set the patron's privacy to "Forever" or "Default" 7) Reload the page 8) Note the print checkins option is back!
Created attachment 161593 [details] [review] Bug 35924: Hide the print checkins button on the checkin screen for patron's who always anonymize Test Plan: 1) Set a patron's privacy to "Never" 2) Check out a few items to a patron 3) Check in one item 4) Note the "Print checkin slip" diplays 3) Apply this patch 4) Check in an item 5) Note the option is now missing 6) Set the patron's privacy to "Forever" or "Default" 7) Check in an item 8) Note the print checkins option is back!
Created attachment 161734 [details] [review] Bug 35924: Hide the print checkins button on the patron screens for patron's who always anonymize If a patron anonymizes their checkins, the checkin slip cannot retrieve any info to print the checkin slip. We should not show the button in this scenario Test Plan: 1) Set a patron's privacy to "Never" 2) Note the "Print checkin slip" option in the Print button on the patrons toolbar displays 3) Apply this patch 4) Reload the page 5) Note the option is now missing 6) Set the patron's privacy to "Forever" or "Default" 7) Reload the page 8) Note the print checkins option is back! Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Created attachment 161735 [details] [review] Bug 35924: Hide the print checkins button on the checkin screen for patron's who always anonymize Test Plan: 1) Set a patron's privacy to "Never" 2) Check out a few items to a patron 3) Check in one item 4) Note the "Print checkin slip" diplays 3) Apply this patch 4) Check in an item 5) Note the option is now missing 6) Set the patron's privacy to "Forever" or "Default" 7) Check in an item 8) Note the print checkins option is back! Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
> If a patron anonymizes their checkins, the checkin slip cannot retrieve any info to print the checkin slip. Does that makes sense? Isn't that a bug instead? It's just for arbitrary technical reasons that the slip can't get the info. This info is still there on checkin, but it's immediately deleted. And the slip is an optional checkin step that is on a separate request. > We should not show the button in this scenario But if nobody really complains and can do or fund work to complexify slip handling then it's ok to at least be consistent in the current simpler slip implementation that isn't compatible with patron privacy = never Because that's an undisputable bug and the above is more between a bug and two features that have not their fullest scope possible and don't work together. So ok I get it now ^^ --- Is it possible to avoid the two times there is a magic number in the patch? (patron.privacy < 2) I'm not sure if it's simple from a template to access something like a constant that would be defined in Koha/Patron.pm or Koha/Schema/Result/Borrower.pm or somewhere relevant. Any ideas? Magic numbers often require to go digging their meaning and the place is often not obvious. borrowers.privacy DB comment doesn't list the values :( If nothing simple then at least a TT comment just next the [% IF [...] %] tag. I can add it in a follow-up. Just hopping for better ideas that can reasonably be done in this ticket.
Created attachment 162696 [details] [review] Bug 35924: Hide the print checkins button on the patron screens for patron's who always anonymize If a patron anonymizes their checkins, the checkin slip cannot retrieve any info to print the checkin slip. We should not show the button in this scenario Test Plan: 1) Set a patron's privacy to "Never" 2) Note the "Print checkin slip" option in the Print button on the patrons toolbar displays 3) Apply this patch 4) Reload the page 5) Note the option is now missing 6) Set the patron's privacy to "Forever" or "Default" 7) Reload the page 8) Note the print checkins option is back! Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 162697 [details] [review] Bug 35924: Hide the print checkins button on the checkin screen for patron's who always anonymize Test Plan: 1) Set a patron's privacy to "Never" 2) Check out a few items to a patron 3) Check in one item 4) Note the "Print checkin slip" diplays 3) Apply this patch 4) Check in an item 5) Note the option is now missing 6) Set the patron's privacy to "Forever" or "Default" 7) Check in an item 8) Note the print checkins option is back! Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 162698 [details] [review] Bug 35924: (QA follow-up): Comment magic number (patron.privacy < 2)
Works, makes sense, QA script happy, code looks good, passing QA :)
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.04
Doesn't apply cleanly to 23.05.x. No backport.