[Koha-bugs] [Bug 5644] dropbox mode doesn't set the correct date

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 2 20:12:52 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5644

--- Comment #17 from Chris Cormack <chris at bigballofwax.co.nz> ---
(In reply to comment #13)
> Just looking at the diff, I'm wondering if this patch only fixes it if the
> library has only been closed for one day, and not for multiple days at a
> time. Nicole's description of her understanding of the feature is that
> "checking the dropbox mode option on the check in screen made the due date
> effectively the last day the library was open". What do you think?

This is why just looking at a diff is an entirely ineffective way to test a
patch.

This bug now is to do with the dropbox not setting the correct date. Anything
to do with fines is on another bug. So please talk about that issue there.
Bug 8338

But if you look at the whole of the code, or better yet run it.
You will see all the patch changes is setting the day_duration to be negative.
It then, (depending on the mode the calendar is in, or if its hours does
different things)

EG

  my $days = abs $add_duration->in_units('days');
            while ($days) {
                $base_date->add_duration($day_dur);
                if ( $self->is_holiday($base_date) ) {
                    next;
                } else {
                    --$days;
                }
            }

If the library is closed, it will keep subtracting (in this case because
$day_dur) is negative.

This is how this had always worked, up until 3.8.0 and so that regression is
now fixed.

Please, looking at diffs is not really a valid test of anything.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list