Bug 22431 - Holds to pull report is broken in sql strict mode
Summary: Holds to pull report is broken in sql strict mode
Status: RESOLVED DUPLICATE of bug 24488
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 23175 26020 26489 (view as bug list)
Depends on: 13640
Blocks: 17258
  Show dependency treegraph
 
Reported: 2019-02-28 11:35 UTC by Nick Clemens
Modified: 2021-02-09 09:50 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-02-28 11:35:19 UTC
This one seems tricky as we are probably doing some bad things here - we get the reserves, group by biblionumber, then do a mix of taking all values from a field and trying to get the values for the 'first' patron.

I think this one needs to be two queries joined which may impact peformance but should be much more correct
Comment 1 Katrin Fischer 2019-04-04 07:33:10 UTC
Hi Nick, can you add how the bug manifests? What is the wrong behaivour?
Comment 2 Nick Clemens 2019-04-04 11:50:21 UTC
Enable strict mode
Have some holds to pull
Browse to  Circulation -> Holds to pull
Internal Server Error

The report cannot run in strict mode due to using columns not included in GROUP BY
Comment 3 Jonathan Druart 2019-06-19 18:00:44 UTC
I have a "PFFF rewriting pendingreserves.pl" commit on a local branch, if anyone is willing to work on/continue it.
Comment 4 Martin Renvoize 2019-06-21 09:21:23 UTC
*** Bug 23175 has been marked as a duplicate of this bug. ***
Comment 5 Martin Renvoize 2019-06-21 09:22:50 UTC
(In reply to Jonathan Druart from comment #3)
> I have a "PFFF rewriting pendingreserves.pl" commit on a local branch, if
> anyone is willing to work on/continue it.

I'm game for looking at this.
Comment 6 Jonathan Druart 2019-06-22 20:57:29 UTC
(In reply to Martin Renvoize from comment #5)
> (In reply to Jonathan Druart from comment #3)
> > I have a "PFFF rewriting pendingreserves.pl" commit on a local branch, if
> > anyone is willing to work on/continue it.
> 
> I'm game for looking at this.

https://gitlab.com/joubu/Koha/commits/bug_22431
That's super dirty and I am not really sure what I was trying to achieve.
IIRC the problem was the GROUP_CONCAT clause. So creating relevant data, executing the query, then comparing with what would replace the query (using Koha::Holds). That's really a work in progress but... not finished :)
Good luck!
Comment 7 Jonathan Druart 2020-07-23 06:38:38 UTC
*** Bug 26020 has been marked as a duplicate of this bug. ***
Comment 8 Katrin Fischer 2020-09-20 22:13:25 UTC
*** Bug 26489 has been marked as a duplicate of this bug. ***
Comment 9 Owen Leonard 2020-09-20 22:58:32 UTC
If duplicate reports have been made on this bug THREE TIMES I think it's time to change the title!!
Comment 10 Katrin Fischer 2020-09-20 23:07:04 UTC
(In reply to Owen Leonard from comment #9)
> If duplicate reports have been made on this bug THREE TIMES I think it's
> time to change the title!!

You make an excellent point there.
Comment 11 Martin Renvoize 2020-09-21 07:21:03 UTC
Yikes, I offered to take a look then promptly completely forgot about it...

Catching up now.
Comment 12 Jonathan Druart 2020-09-28 10:56:25 UTC
Effort must be done on bug 24488.
Comment 13 Jonathan Druart 2021-02-09 09:50:51 UTC

*** This bug has been marked as a duplicate of bug 24488 ***