Bug 11163 - Wrong itemtype usage count when deleting an itemtype
Summary: Wrong itemtype usage count when deleting an itemtype
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 21:36 UTC by Tomás Cohen Arazi
Modified: 2015-06-04 23:23 UTC (History)
1 user (show)

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


Attachments
Bug 11163: Wrong itemtype usage count when deleting an itemtype (870 bytes, patch)
2013-10-29 21:41 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11163: Wrong itemtype usage count when deleting an itemtype (1.24 KB, patch)
2013-11-14 16:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11163: Wrong itemtype usage count when deleting an itemtype (1.25 KB, patch)
2013-11-15 09:23 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 Tomás Cohen Arazi 2013-10-29 21:36:35 UTC
No matter how much biblios or items use an itemtype the count is always 1.

Steps to reproduce:
- Create an itemtype.
- Create some biblios setting the created itemtype at biblio level.
- Create some items setting the created itemtype on them.
- Try to delete the itemtype in Home > Administration > Item types, the count is 1 and doesn't match the expected result.
Comment 1 Tomás Cohen Arazi 2013-10-29 21:41:09 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-11-14 16:41:58 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-11-15 09:23:49 UTC
Created attachment 22954 [details] [review]
Bug 11163: Wrong itemtype usage count when deleting an itemtype

Wrong usage of UNION instead of UNION ALL prevented the count to match
the expected value.

Steps to reproduce:
- Create an itemtype.
- Create some biblios setting the created itemtype at biblio level.
- Create some items setting the created itemtype on them.
- Try to delete the itemtype in Home > Administration > Item types, the
count is 1 and doesn't match the expected result.

Regards
To+

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 4 Galen Charlton 2013-11-15 15:36:10 UTC
Pushed to master and 3.14.x.  Thanks, Tomás!
Comment 5 Tomás Cohen Arazi 2013-12-08 15:06:42 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.