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.
Created attachment 22530 [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. Regards To+
Created attachment 22941 [details] [review] [SIGNED-OFF] 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>
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>
Pushed to master and 3.14.x. Thanks, Tomás!
This patch has been pushed to 3.12.x, will be in 3.12.8.