[Bug 10154] New: Add Call number in the filter of most circulated items
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Bug ID: 10154 Summary: Add Call number in the filter of most circulated items Classification: Unclassified Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: gmcharlt@gmail.com Reporter: anthony.laquerre@ccsr.qc.ca Request for enhancement We would like to add call number in the page "Most-circulated items". /cgi-bin/koha/reports/cat_issues_top.pl The goal is to get a list of callnumber that circulated the most ( Ex : "800" for litterature and something similar for LC). We could mayby take the prefix of the call number and be able to filter/order document with it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Viktor Sarge <viktor.sarge@regionhalland.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |viktor.sarge@regionhalland. | |se --- Comment #1 from Viktor Sarge <viktor.sarge@regionhalland.se> --- We would have good use of drop downs with full call number, shelving location and collection code. (regular text fields might of course be an alternative when a drop down might be overly long) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |eivin@sysmystic.com CC| |eivin@sysmystic.com Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #2 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Created attachment 44102 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44102&action=edit Added functionality for ccode and shelving location -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #3 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Created attachment 44135 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44135&action=edit Bug 10154 Add Call number in the filter of most circulated items This patch adds call number, collection code and shelving location to the filter. To test: It is of course a prerequisite to have items in the DB with the correct MARC fields and that they have been checked out etc. to get a valid result when testing. 1. Apply patch to koha synced to master. 2. Go to /cgi-bin/koha/reports/cat_issues_top.pl 3. Select filters, the new ones are Call number, Collection code and Shelving location 4. Hit submit. Expected result: The filters chosen will be printed under "Filtered on". A table with the result is shown. For manual verification here is some SQL to run: SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM, ccode as CCODE, location as LOC FROM `old_issues` LEFT JOIN items USING(itemnumber) LEFT JOIN biblio USING(biblionumber) LEFT JOIN biblioitems USING(biblionumber) LEFT JOIN borrowers USING(borrowernumber) WHERE 1 AND biblioitems.itemtype like 'BK' AND itemcallnumber like '005.2/762' AND ccode like 'NFIC' AND location like 'CART' AND borrowers.categorycode like 'PT' group by biblio.biblionumber order by RANK DESC; Put in your valid values in the WHERE clause for the values in the single quotes ''. Sponsored-by: Halland county library -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |frederic@tamil.fr -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44102|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44135|0 |1 is obsolete| | --- Comment #4 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Created attachment 44879 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44879&action=edit Bug 10154 Add Call number in the filter of most circulated items This patch adds call number, collection code and shelving location to the filter. To test: It is of course a prerequisite to have items in the DB with the correct MARC fields and that they have been checked out etc. to get a valid result when testing. 1. Apply patch to koha synced to master. 2. Go to /cgi-bin/koha/reports/cat_issues_top.pl 3. Select filters, the new ones are Call number, Collection code and Shelving location 4. Hit submit. Expected result: The filters chosen will be printed under "Filtered on". A table with the result is shown. For manual verification here is some SQL to run: SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM, ccode as CCODE, location as LOC FROM `old_issues` LEFT JOIN items USING(itemnumber) LEFT JOIN biblio USING(biblionumber) LEFT JOIN biblioitems USING(biblionumber) LEFT JOIN borrowers USING(borrowernumber) WHERE 1 AND biblioitems.itemtype like 'BK' AND itemcallnumber like '005.2/762' AND ccode like 'NFIC' AND location like 'CART' AND borrowers.categorycode like 'PT' group by biblio.biblionumber order by RANK DESC; Put in your valid values in the WHERE clause for the values in the single quotes ''. Sponsored-by: Halland county library Fixed patch did not apply. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Eivin Giske Skaaren <eivin@sysmystic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44879|0 |1 is obsolete| | --- Comment #5 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Created attachment 44880 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44880&action=edit Bug 10154 Add Call number in the filter of most circulated items This patch adds call number, collection code and shelving location to the filter. To test: It is of course a prerequisite to have items in the DB with the correct MARC fields and that they have been checked out etc. to get a valid result when testing. 1. Apply patch to koha synced to master. 2. Go to /cgi-bin/koha/reports/cat_issues_top.pl 3. Select filters, the new ones are Call number, Collection code and Shelving location 4. Hit submit. Expected result: The filters chosen will be printed under "Filtered on". A table with the result is shown. For manual verification here is some SQL to run: SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM, ccode as CCODE, location as LOC FROM `old_issues` LEFT JOIN items USING(itemnumber) LEFT JOIN biblio USING(biblionumber) LEFT JOIN biblioitems USING(biblionumber) LEFT JOIN borrowers USING(borrowernumber) WHERE 1 AND biblioitems.itemtype like 'BK' AND itemcallnumber like '005.2/762' AND ccode like 'NFIC' AND location like 'CART' AND borrowers.categorycode like 'PT' group by biblio.biblionumber order by RANK DESC; Put in your valid values in the WHERE clause for the values in the single quotes ''. Sponsored-by: Halland county library Fixed patch did not apply. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44880|0 |1 is obsolete| | --- Comment #6 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 44882 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44882&action=edit Bug 10154 Add Call number in the filter of most circulated items This patch adds call number, collection code and shelving location to the filter. To test: It is of course a prerequisite to have items in the DB with the correct MARC fields and that they have been checked out etc. to get a valid result when testing. 1. Apply patch to koha synced to master. 2. Go to /cgi-bin/koha/reports/cat_issues_top.pl 3. Select filters, the new ones are Call number, Collection code and Shelving location 4. Hit submit. Expected result: The filters chosen will be printed under "Filtered on". A table with the result is shown. For manual verification here is some SQL to run: SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM, ccode as CCODE, location as LOC FROM `old_issues` LEFT JOIN items USING(itemnumber) LEFT JOIN biblio USING(biblionumber) LEFT JOIN biblioitems USING(biblionumber) LEFT JOIN borrowers USING(borrowernumber) WHERE 1 AND biblioitems.itemtype like 'BK' AND itemcallnumber like '005.2/762' AND ccode like 'NFIC' AND location like 'CART' AND borrowers.categorycode like 'PT' group by biblio.biblionumber order by RANK DESC; Put in your valid values in the WHERE clause for the values in the single quotes ''. Sponsored-by: Halland county library Signed-off-by: Frédéric Demians <f.demians@tamil.fr> It works as described. Valid results, tested in various combinations. Follows the coding (awful) style of the original script, without introducing any regression. It would have been great to have callnumber interval, but anyway... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #7 from Eivin Giske Skaaren <eivin@sysmystic.com> --- Thanks for the signoff Frédéric. Let me tell you that I am no fan of the style with magic numbers etc either but the alternative would be a complete rewrite of this script I think :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #8 from Frédéric Demians <frederic@tamil.fr> ---
Let me tell you that I am no fan of the style with magic numbers etc either but the alternative would be a complete rewrite of this script I think :)
IMO, your choice not to refactor the script is a good choice. It helps avoiding regression yet increasing this report usefulness. Thks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add Call number in the |Add collection, location, |filter of most circulated |and callnumber as filters |items |to report for most | |circulated items CC| |katrin.fischer@bsz-bw.de Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add collection, location, |Add collection, location, |and callnumber as filters |and callnumber filters to |to report for most |report for most circulated |circulated items |items --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We should fix these reports sometime... but I am ok with 'not right now' :) I will attach a patch with some tiny follow-ups to the terminology used, can you please take a look? Also a question, why these commented out lines? + # These limits does not currently exist, maybe later? + # $colfilter[0] = @$filters[6] if ($column =~ /ccode/ ) ; + # $colfilter[0] = @$filters[7] if ($column =~ /location/ ) ; + $colfilter[0] = @$filters[8] if ($column =~ /category/ ) ; + # This commented out row (sort2) was not removed when adding new filters for ccode, shelving location and call number -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 45246 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45246&action=edit Bug 10154: QA follow-up - Spelling and terminology - Changing capitalization: Any Patron category > Any patron category - Changing Collection code > Collection -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #11 from Eivin Giske Skaaren <eivin@sysmystic.com> --- (In reply to Katrin Fischer from comment #9)
We should fix these reports sometime... but I am ok with 'not right now' :)
I will attach a patch with some tiny follow-ups to the terminology used, can you please take a look?
Also a question, why these commented out lines? + # These limits does not currently exist, maybe later? + # $colfilter[0] = @$filters[6] if ($column =~ /ccode/ ) ; + # $colfilter[0] = @$filters[7] if ($column =~ /location/ ) ; + $colfilter[0] = @$filters[8] if ($column =~ /category/ ) ; + # This commented out row (sort2) was not removed when adding new filters for ccode, shelving location and call number
I will take a look at the QA follow up tonight. For the commented out lines there were 2 considerations: 1. One already commented out line that seemed out of place but I did not remove it. 2. Fill in gaps just to make the magic numbers less confusing. It is easy to overlook a missing row etc in this type of code. I can remove the commented out code if that is preferred. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #12 from Eivin Giske Skaaren <eivin@sysmystic.com> --- (In reply to Katrin Fischer from comment #10)
Created attachment 45246 [details] [review] Bug 10154: QA follow-up - Spelling and terminology
- Changing capitalization: Any Patron category > Any patron category - Changing Collection code > Collection
Sure we can change this. Before I reupload could you please let me know about what is preferred regarding the commented out lines. (Also since this is very minor changes perhaps you will just apply them when looking at this instead of me reuploading?) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I understand now why the lines have been added, I am ok with keeping them. If you want and agree, you can sign off my QA follow-up patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45246|0 |1 is obsolete| | --- Comment #14 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 45376 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45376&action=edit [SIGNED-OFF] Bug 10154: QA follow-up - Spelling and terminology - Changing capitalization: Any Patron category > Any patron category - Changing Collection code > Collection Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44882|0 |1 is obsolete| | Attachment #45376|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 45377 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45377&action=edit [PASSED QA] Bug 10154 Add Call number in the filter of most circulated items This patch adds call number, collection code and shelving location to the filter. To test: It is of course a prerequisite to have items in the DB with the correct MARC fields and that they have been checked out etc. to get a valid result when testing. 1. Apply patch to koha synced to master. 2. Go to /cgi-bin/koha/reports/cat_issues_top.pl 3. Select filters, the new ones are Call number, Collection code and Shelving location 4. Hit submit. Expected result: The filters chosen will be printed under "Filtered on". A table with the result is shown. For manual verification here is some SQL to run: SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM, ccode as CCODE, location as LOC FROM `old_issues` LEFT JOIN items USING(itemnumber) LEFT JOIN biblio USING(biblionumber) LEFT JOIN biblioitems USING(biblionumber) LEFT JOIN borrowers USING(borrowernumber) WHERE 1 AND biblioitems.itemtype like 'BK' AND itemcallnumber like '005.2/762' AND ccode like 'NFIC' AND location like 'CART' AND borrowers.categorycode like 'PT' group by biblio.biblionumber order by RANK DESC; Put in your valid values in the WHERE clause for the values in the single quotes ''. Sponsored-by: Halland county library Signed-off-by: Frédéric Demians <f.demians@tamil.fr> It works as described. Valid results, tested in various combinations. Follows the coding (awful) style of the original script, without introducing any regression. It would have been great to have callnumber interval, but anyway... Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 45378 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45378&action=edit Bug 10154: QA follow-up - Spelling and terminology - Changing capitalization: Any Patron category > Any patron category - Changing Collection code > Collection Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10154 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master, thanks Eivin and Katrin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org