Bug 13332 - Items disappear from staff detail page when there is an on-site checkout
Summary: Items disappear from staff detail page when there is an on-site checkout
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 21:39 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

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


Attachments
Bug 13332: Fix conflict between 5304 and 10850 (2.85 KB, patch)
2014-11-25 14:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13332: Fix conflict between 5304 and 10860 (2.85 KB, patch)
2014-11-25 14:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13332: Fix conflict between 5304 and 10860 (2.98 KB, patch)
2014-11-25 21:41 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[PASSED QA] Bug 13332: Fix conflict between 5304 and 10860 (3.12 KB, patch)
2014-11-26 06:51 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-11-24 21:39:21 UTC
To test:

- Turn on OnSiteCheckouts
- Check out any item using on-site checkout mode
- Go to the detail page of the record, verify, that all items have disappeared
- Check the item back in
- Go to the detail page again - the items are back

This seems to be a side effect of bug 5304, when I revert it, the display is ok:
http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=421761e2743ab260092a5234b7b8b1c33c64107f

The logs show some errors:
[Mon Nov 24 22:25:48.527426 2014] [cgi:error] [pid 24936] [client 127.0.0.1:41712] AH01215: [Mon Nov 24 22:25:48 2014] detail.pl: DBD::mysql::st execute failed: Not unique table/alias: 'issues' at /home/katrin/kohaclone/C4/Items.pm line 1332., referer: http://localhost:8080/cgi-bin/koha/circ/circulation.pl
[Mon Nov 24 22:25:48.527536 2014] [cgi:error] [pid 24936] [client 127.0.0.1:41712] AH01215: [Mon Nov 24 22:25:48 2014] detail.pl: DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at /home/katrin/kohaclone/C4/Items.pm line 1339., referer: http://localhost:8080/cgi-bin/koha/circ/circulation.pl
Comment 1 Jonathan Druart 2014-11-25 14:07:27 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-11-25 14:08:19 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2014-11-25 21:41:22 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-11-26 06:51:14 UTC
Created attachment 33941 [details] [review]
[PASSED QA] Bug 13332: Fix conflict between 5304 and 10860

These 2 bugs are in conflict.
The first one always join the issue table, the second one join on this
table too if the OnSiteCheckouts pref is enable.
So DBI raises an error if the pref is enabled (2 joins on the same
table).

This patch removes the conditional join.

Test plan:
Go on a detail record page with items and verify that items are list and
that the error no more appears in the log file.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Reproduced the problem, the patch fixes it, no noticeable regression found.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, items are visible again.
Passes tests and QA script.
Comment 5 Tomás Cohen Arazi 2014-11-26 14:36:54 UTC
Patch pushed to master.

Thanks Jonathan!