Created attachment 8633 [details]
After upgrading to master (as of this morning) I see the attached on my circ and fine rules. Shouldn't this have a default value set on upgrade so that there isn't an error?
I think this comes from the Floating Collections dev - but I'm not sure. Adding a 'depends on' for that bug report.
Seen on upgrade to 3.08.01.002. returnbranch in branch_item_rules is being set to NULL - no other columns are affected.
Just seen this on a 3.10 but might have been introduced when that catalogue upgraded to 3.8 - I think they used holds very rarely.
The patch to bug #7144 set default NULL but the code doesn't seem to handle a NULL value for that column and it's not mentioned in the perldoc C4/Circulation.pm.
Also, there appears to be a typo in the patch http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7533&action=diff on bug #7144 - prefernce where it should be preference.
Also, the patch seemed to add to installer/data/mysql/atomicupdate but not updatedatabase.pl too, which might be a problem but doesn't seem to be harming my catalogue.
Is the best fix for a database update branch_item_rules set returnbranch= (C4::Context->preference('HomeOrHoldingBranchReturn') || 'homebranch') where returnbranch is NULL, or to handle NULL better in C4/Circulation, or to handle it in callers of C4::Circulation?
Still valid - I have seen this in some of our installations, but it does not seem to have any bad side effects afaict.
The bug certainly comes from the typo, it has been fixed by bug 14422, please reopen if I am wrong.
*** This bug has been marked as a duplicate of bug 14422 ***