[Koha-bugs] [Bug 13914] The holds statistics report returns random data

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 27 13:49:26 CEST 2015


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

--- Comment #4 from Eivin Giske Skaaren <eskaaren at yahoo.no> ---
(In reply to Jonathan Druart from comment #3)
> (In reply to Eivin Giske Skaaren from comment #2)
> 
> > So one way of getting line numbers that are not unique for the same col is
> > if priority is set to >0 for an item in the old_reserves table.
> > 
> > Question: Should priority ever be anything else than 0 for an item in the
> > old_reserves table?
> 
> Yes, I think so.
> At least I have some on local installation.
> I suppose the priority is not updated when a reserve is canceled. So if it
> has a priority > 0, it will be copied as it to the old_reserves.

Since the query evaluates on priority this means that the result will be wrong
if the rows from old_reserves are not to be shown as "1- placed" in the holds
report. 

> Did you have the patience to test/compare the results?
> I didn't :)

Yes I did test it ;)

> But the customer validated the patch, so I supposed he tested it.
> If you are able to give me a simple example to recreate a issue on my side,
> I will have a look and try to provide a fix.

This is my test result that you can modify to your installation:
I have 2 books in the reserves table with priority 1
I have 3 books in the old_reserves table with priority 0

Run the report and it will say:
1- placed: 2
2- processed : 3

Change the priority to 1 for one of the books in the old_reserves table and
rerun the report:
1- placed: 3
2- processed: 2

Perhaps it would be good to refactor out the use of magic numbers so the whole
thing gets more maintainable.

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


More information about the Koha-bugs mailing list