[Bug 11357] New: biblio.size value not correctly displayed in list emails sent from OPAC and intranet
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Bug ID: 11357 Summary: biblio.size value not correctly displayed in list emails sent from OPAC and intranet Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org The size column in biblio is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable. It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places: [% END %] [% IF BIBLIO_RESULT.size %] , [% BIBLIO_RESULT.size %] [% END %] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11248 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Consider looking at bug 10466. As far as I can tell, TT will give you the size of the hash rather than the value only if the size value is undefined. If it is defined, it will give you the size value. However, since the size column is often null in the database, you'll often get the size of the hash rather than a blank value. Here's a relevant section from 10466: "This bug has been identified in the opac-search.pl, search.pl and addbooks.pl pages before...". The patch with the bug also touches C4/VirtualShelves/Page.pm. I'm not sure what the best course of action is. If the database had a blank value rather than a null value, it would probably prevent this problem. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m Assignee|oleonard@myacpl.org |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10466 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6374 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 --- Comment #2 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Has said in Bug 10466 and Bug 6374 the "size" is a virtual method of TT. When biblio.size is not defined, [% BIBLIO_RESULT.size %] will return the number of keys : http://template-toolkit.org/docs/manual/VMethods.html#section_Hash_Virtual_M... There I think a better way of correcting than setting size in perl : using item virtual method in TT : http://template-toolkit.org/docs/manual/VMethods.html#section_item I found this solution here : http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-contai... This may append for other cases, like keys with space, hyphen, other colmns named like virtual method. (I've been on this several months). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 --- Comment #3 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 29017 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29017&action=edit Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable. It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places: [% END %] [% IF BIBLIO_RESULT.size %] , [% BIBLIO_RESULT.size %] [% END %] This patch corrects by using item() TT method. See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-contai.... Test plan : In each display : => Without this patch you see biblioitems.pages and then a number => With this patch you only see biblioitems.pages - Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined Same for OPAC and intranet : - Add it to the cart - Open the cart - Check the "Title" column - Click on "More Details" - Check the "Details" row - Send the basket via email and check the result - Add to a list - Send the list via email and check the result -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Fantastic, Fridolin! I don't have time today, but I'll look at this one next week if it is still untested. It would be worth reverting bug 10466 as it's a bit of a hack to get around the problem which your patch seems to solve very nicely! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 --- Comment #5 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to David Cook from comment #4)
Fantastic, Fridolin! I'm happy to hear it.
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.14 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29017|0 |1 is obsolete| | --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 29322 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29322&action=edit [SIGNED-OFF] Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable. It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places: [% END %] [% IF BIBLIO_RESULT.size %] , [% BIBLIO_RESULT.size %] [% END %] This patch corrects by using item() TT method. See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-contai.... Test plan : In each display : => Without this patch you see biblioitems.pages and then a number => With this patch you only see biblioitems.pages - Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined Same for OPAC and intranet : - Add it to the cart - Open the cart - Check the "Title" column - Click on "More Details" - Check the "Details" row - Send the basket via email and check the result - Add to a list - Send the list via email and check the result Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works well!! Tested on staff & opac, cart & list. No koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 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=11357 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29322|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 29346 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29346&action=edit [PASSED QA] Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable. It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places: [% END %] [% IF BIBLIO_RESULT.size %] , [% BIBLIO_RESULT.size %] [% END %] This patch corrects by using item() TT method. See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-contai.... Test plan : In each display : => Without this patch you see biblioitems.pages and then a number => With this patch you only see biblioitems.pages - Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined Same for OPAC and intranet : - Add it to the cart - Open the cart - Check the "Title" column - Click on "More Details" - Check the "Details" row - Send the basket via email and check the result - Add to a list - Send the list via email and check the result Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works well!! Tested on staff & opac, cart & list. No koha-qa errors Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes QA script and tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Patch includes changes to the prog theme, but I think a small bug fix should be ok -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |chris@bigballofwax.co.nz --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Small fix, pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13268 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com Keywords| |rel_3_16_candidate --- Comment #10 from Mason James <mtj@kohaaloha.com> --- Possible selection for 3.16.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11357 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable Keywords|rel_3_16_candidate | --- Comment #11 from Mason James <mtj@kohaaloha.com> --- Pushed to 3.16.x, will be in 3.16.10 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org