It only seems to make sense to set a closing hour if an opening hour has been set, otherwise it would be open 24 hs :-D A method needs to be added to Koha::Library: * set_hours( $dow, $opening, $closing ) * The method needs to throw an exception if one of them is not passed * If none is passed then it means the library would not be open, and then all hours for the * The code for setting the hours in branches.pl should be removed and this method used instead * The method MUST BE COVERED BY TESTS NOTE: I don't personally like the chosen column name 'day'. I would use either 'dow' or 'day_of_week'. And it should be clear which one is the first in the comments.
Whilst I agree about the column name and the requirement to set both openening and closing.. I'm not so sure about the meaning of no opening/closing.. that could just mean it's a 24h library and open the whole day rather than having an opening/closing time right?
We're back into naming consistency territory here.. in repeatable_holidays it's: > `weekday` smallint(6) DEFAULT NULL COMMENT 'day of the week (0=Sunday, 1=Monday, etc) this closing is repeated on'
What about 24h libraries.. in those cases you'll want to open one day and close another so you wouldn't necessarily want to be forced to put both opening and closing times in at the same input.