Bug 7830 - return policy error in hold policy by item type after upgrade
Summary: return policy error in hold policy by item type after upgrade
Status: RESOLVED DUPLICATE of bug 14422
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Kyle M Hall
QA Contact:
URL:
Keywords:
Depends on: 7144
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-26 14:57 UTC by Nicole C. Engard
Modified: 2015-07-14 11:26 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
error message (55.53 KB, image/png)
2012-03-26 14:57 UTC, Nicole C. Engard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-03-26 14:57:33 UTC
Created attachment 8633 [details]
error message

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.
Comment 1 Albert Oller 2012-08-07 13:35:06 UTC
Seen on upgrade to 3.08.01.002.  returnbranch in branch_item_rules is being set to NULL - no other columns are affected.
Comment 2 MJ Ray (software.coop) 2013-01-16 12:33:13 UTC
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?
Comment 3 Katrin Fischer 2015-06-06 22:26:30 UTC
Still valid - I have seen this in some of our installations, but it does not seem to have any bad side effects afaict.
Comment 4 Jonathan Druart 2015-07-14 11:26:43 UTC
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 ***