[Koha-bugs] [Bug 8253] Fine doubling

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 23 12:18:17 CEST 2012


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

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #15 from Julian Maurice <julian.maurice at biblibre.com> ---
This does not work for me. Instead of having the 2 duplicates kept, they are
now both removed by updatedatabase.pl.

I think this comes from here:

    my $datetime = "$date 23:59";
    my $new_description = $old_description;
    $new_description =~ s/$date/$datetime/g;
    $dbh->do("UPDATE accountlines SET description = ? WHERE description = ?",
undef, $new_description, $old_description);

In the above code, all descriptions are updated to have the new date format
with 23:59
And then:

    my $query = "
        SELECT * FROM accountlines
        WHERE ( accounttype =  'FU' OR accounttype =  'F' )
        AND description like '%23:59%'
        ORDER BY borrowernumber, itemnumber, accountno, description, timestamp
DESC
    ";

You select all lines with a description that contains '23:59'. So both lines of
my example are returned.
Finally for each line, other lines that have a different timestamp are deleted.
So both lines are deleted.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list