To recreate: 1 - have a patron, put a manual restriction on their account 2 - create a CSV for patron import that matches your patron 3 - add the debarred and debarredcomment columns to your CSV, but don't put any values into them for your test patron 4 - import your file, matching your patron, and overwriting the existing patron with the new data 5 - reload your patron's record 6 - confirm your patron is allowed to check out but that the Restrictions tab still lists the restriction created in step 1 The patron import nulls out borrowers.debarred and borrowers.debarredcomment but does not update the borrower_debarments table. This leaves the patron with a zombie debarment that doesn't get enforced. I'm not entirely sure what the right answer here is. Either we should not allow patron imports to delete debarments at all or we should make sure it does the deletion properly and completely. For comparison, if one uses batch patron modification to clear the debarred and debarredcomment fields, Koha deletes ALL debarments on that account.
I think we should not allow to undebar with the patron import or have a more solid way to indicate it than leaving columns empty. Like indicating the restriction codes that you want to lift. There can be multiple restrictions added for very different reasons, not only one, I think that's the main issue. So I think empty columns should just be ignored on import.