Bug 27361

Summary: Guided reports in the catalog module duplicates itype
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: ReportsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2021-01-07 17:00:07 UTC
If you select the Catalog module in step 1 of a guided report you will see 'Koha itemtype' appear twice in step 4. 

To recreate:
-Build a guided report
-In step 1 select 'Catalog' as the module
-In step 3 add at least one column
-In step 4 notice that 'Koha itemtype' displays twice no matter what you've selected in step 3
-Check both the 'Koha itemtype' and continue to build your report.
-On the confirm your report page notice the SQL looks like this:

 SELECT items.itemnumber FROM items LEFT JOIN biblioitems on (items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN biblio on (biblioitems.biblionumber=biblio.biblionumber) WHERE items.itype='BK' AND items.itype='BK' 


No matter what you select as the 2nd itype you will get a duplicate of what you selected in the first:

WHERE items.itype='BK' AND items.itype='BK'
Comment 1 Katrin Fischer 2023-07-01 15:46:52 UTC
Still valid.