[Bug 10190] Overdue notice triggers based on item type
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10190 --- Comment #950 from Chloé Zermatten <chloe.zermatten@openfifth.co.uk> --- (In reply to Pedro Amorim (ammopt) from comment #949)
Found a few more issues on a follow up review round:
Issue #1: Permission migration drops blanket Tools-flag access
Before applying patches: 1) Grab 1 patron (using Henry for this example): 2) Give Henry the 'catalogue' and 'tools' permissions. 3) Login as Henry, notice you have correct access to Overdue Notice / Status trigger tool - works fine: http://localhost:8081/cgi-bin/koha/tools/tools-home.pl 4) Confirm why. inside ktd: koha-mysql kohadev -e "SELECT * FROM user_permissions WHERE borrowernumber=19 AND code='edit_notice_status_triggers';" 5) Query returns empty. This is because this patron does not have that specific permission, it has the parent 'tools' permission. 6) Apply patches, run updatedatabase. 7) Check what the migration wrote: koha-mysql kohadev -e "SELECT * FROM user_permissions WHERE borrowernumber=19 AND code='manage_circ_triggers';" Expected: a new row. Actual: still empty, nothing carried over, because the migration only ever reads from user_permissions, and there was never a row there to read 8) Login as that patron, notice you can't see the circulation triggers at: http://localhost:8081/cgi-bin/koha/admin/admin-home.pl
Issue #2: itemtype restriction wrongly lifted on return
0) Pick a test opac patron, if using Henry from above remove the permissions 1) http://localhost:8081/cgi-bin/koha/admin/categories.pl, edit the test patron's category, confirm 'Overdue notice required' is set to 'Yes'. 2) Set syspref AutoRemoveOverduesRestrictions to when_no_overdue_causing_debarment. 3) http://localhost:8081/cgi-bin/koha/admin/circulation_triggers.pl, 'Add new trigger'. Leave 'Library' as 'All libraries' and 'Patron category' as 'All categories', set 'Item type' to 'Books'. For 'Letter' pick ODUE, check 'Email' under 'Transport type(s)', set delay to 5 days, for 'Restricts checkouts' select 'Yes', 'Submit'. 4) Check out barcodes 39999000019186 and 39999000007558 to the test patron (confirm both are itemtype 'Books'). Backdate both due dates 6+ days overdue. 5) perl misc/cronjobs/overdue_notices.pl -n — restricts the patron. 6) Check the patron's 'Restrictions' tab: confirm restricted. 7) Return barcode 39999000019186 only, leave 39999000007558 8) Check the patron's 'Restrictions' tab again. Expected: still restricted (39999000007558 is still overdue). Actual: restriction is gone.
Re- Issue #1: yes, and to my knowledge, that is deliberate. With the migration of the UI and related triggers configuration actions from the 'Tools' section to the 'Administration' section, it was decided not to automatically upgrade staff with tools-level permission only. If memory serves this was discussed over hackfest, and it is where we landed: the reasoning was that it was more detrimental to automatically grant higher permission roles to staff than it is to gate the new UI appropriately, and let libraries choose whether to grant the new permission. But I'll happily stand corrected if I'm misremembering any of that! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org