To recreate: 1 - In a new KTD, check the values for a category: SELECT * FROM categories WHERE categorycode ='B'\G 2 - By default these three columns are null: noissuescharge: NULL noissueschargeguarantees: NULL noissueschargeguarantorswithguarantees: NULL 3 - If they are not, set them so: UPDATE categories SET noissuescharge=NULL, noissueschargeguarantees=NULL, noissueschargeguarantorswithguarantees=NULL; 4 - Open the category in staff interface: More->Administration->Patron categories->Edit 5 - Note the three inputs are set to 0 Checkout charge limit Guarantees checkout charge limit Guarantors with guarantees checkout charge limit 6 - Save the entry without making changes 7 - Check the DB as in Step 1 8 - Note all values are 0 9 - Edit and black the inputs and save 10 - Check the DB 11 - Note all value are now undef We should not have to edit the form to prevent changes
Created attachment 190308 [details] [review] Bug 41405: Treat blank value as unset
Maybe this is actually invalid? The code that checks these in Koha::Patron::is_patron_inside_charge_limit uses: 3512 my $no_issues_charge = $patron_category->noissuescharge || C4::Context->preference('noissuescharge'); 3513 my $no_issues_charge_guarantees = 3514 $patron_category->noissueschargeguarantees || C4::Context->preference('NoIssuesChargeGuarantees'); 3515 my $no_issues_charge_guarantors_with_guarantees = $patron_category->noissueschargeguarantorswithguarantees 3516 || C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees'); 3517 So if they are 0 they don't matter? I don't think it is supposed to work this way though - based on 41404 and the way NoIssuesCharge seems to work a 'blank' is "There is no limit" and Zero should be "Any fines should block issues"