Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving'
Summary: Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-07 14:03 UTC by Kyle M Hall
Modified: 2016-12-05 21:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving' (2.10 KB, patch)
2016-03-07 14:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving' (2.24 KB, patch)
2016-03-14 12:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving' (2.29 KB, patch)
2016-03-15 00:33 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving' (2.36 KB, patch)
2016-03-16 12:11 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2016-03-07 14:03:17 UTC
Currently, the hold ratios script only counts on order items where the record item is created at the time the order is placed, and not if the item is created when the item is received.
Comment 1 Kyle M Hall 2016-03-07 14:07:26 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2016-03-11 01:17:56 UTC
Not a big thing, but perhaps LEFT JOIN should also be conditional on AcqCreateItem
Comment 3 Kyle M Hall 2016-03-14 12:19:22 UTC
(In reply to Srdjan Jankovic from comment #2)
> Not a big thing, but perhaps LEFT JOIN should also be conditional on
> AcqCreateItem

As the two columns for the join are indexed, I had figured there would be little to no decrease in performance. On the other hand, it can't hurt!
Comment 4 Kyle M Hall 2016-03-14 12:19:54 UTC Comment hidden (obsolete)
Comment 5 Srdjan Jankovic 2016-03-15 00:33:06 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2016-03-15 10:48:50 UTC
Thanks Srdjan!
Comment 7 Jonathan Druart 2016-03-16 12:11:38 UTC
Created attachment 49219 [details] [review]
Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving'

Currently, the hold ratios script only counts on order items where the
record item is created at the time the order is placed, and not if the
item is created when the item is received.

Test Plan:
1) Set AcqCreateItem to recieving
2) Run the hold ratios report with "include ordered" checked
3) From aquisitions, order some additional items for the record
4) Re-run the hold ratios report, not there is no change in the ratio
   for that record
5) Apply this patch
6) Re-run the hold ratios reporat again, the ratio should now have
   changed

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall 2016-03-16 12:54:40 UTC
Thanks Jonathan!
Comment 9 Brendan Gallagher 2016-03-21 22:55:39 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 10 Julian Maurice 2016-03-23 07:57:25 UTC
Patch pushed to 3.22.x, will be in 3.22.5
Comment 11 Frédéric Demians 2016-03-23 12:52:09 UTC
Pushed to 3.20.x, will be in 3.20.10