[Bug 27632] New: Add a more easily javascript accessible biblionumber to each record in OPAC results
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Bug ID: 27632 Summary: Add a more easily javascript accessible biblionumber to each record in OPAC results Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It would be handy to have an easily accessible biblionumber for each record in the OPAC results. I think .bibliocol would be an appropriate place -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 116343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116343&action=edit Bug 27632: add data-biblionumber attr to OPAC results To test: -Apply patch and do an OPAC search that returns several results -Inscept and look for the class bibiocol -Make sure it contains a data-biblionumber attr with a value that matches the biblionumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- My test plan: 0) Use koha-testing-docker 1) Apply patch 2) Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 3) Open browser console 4) Run the following: $(".bibliocol").each( function(){ console.log($(this).attr('data-biblionumber')) }); 5) Observe output of "29", "114", and "134". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116343|0 |1 is obsolete| | --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Created attachment 116347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116347&action=edit Bug 27632: add data-biblionumber attr to OPAC results To test: -Apply patch and do an OPAC search that returns several results -Inscept and look for the class bibiocol -Make sure it contains a data-biblionumber attr with a value that matches the biblionumber Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116347|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 116448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116448&action=edit Bug 27632: add data-biblionumber attr to OPAC results To test: -Apply patch and do an OPAC search that returns several results -Inscept and look for the class bibiocol -Make sure it contains a data-biblionumber attr with a value that matches the biblionumber Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Lucas, please don't forget to add few lines to explain the patch. """" Bug 27632: [Commit title] [Commit message] # This is missing Test plan: the steps """ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I don't this it's a good idea to have it on the TD, IMO it must be on the TR. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #6)
I don't this it's a good idea to have it on the TD, IMO it must be on the TR.
I can redo this patch with data-attribute in the TR but I am curious, why is that better? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It's the whole TR that is about the biblionumber, not only this specific TD. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 116518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116518&action=edit Bug 27632: add class to results TR and data-biblionumber This patch adds a data-biblionumber to each table row on the results page. To make it easier to target it also adds the class 'bibliorow'. To test: -Apply patch and do an OPAC search that returns several results -Inscept and look for the class bibiorow -Make sure it contains a data-biblionumber attr with a value that matches the biblionumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116448|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #116518|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 116521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116521&action=edit Bug 27632: add class to results TR and data-biblionumber This patch adds a data-biblionumber to each table row on the results page. To make it easier to target it also adds the class 'bibliorow'. To test: -Apply patch and do an OPAC search that returns several results -Inscept and look for the class bibiorow -Make sure it contains a data-biblionumber attr with a value that matches the biblionumber Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Summary|Add a more easily |Add a more easily |javascript accessible |Javascript accessible |biblionumber to each record |biblionumber to each record |in OPAC results |in OPAC results --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Risking it - straight back to PQA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sorry to be picky here but, can you detail the use case? I don't think we need the "bibliorow" class. My feeling is that we are missing an id on the table. What you want seems to be: $("#id_table").find('tr').each(function(){ var biblionumber = $(this).data('biblionumber'); }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #12)
Sorry to be picky here but, can you detail the use case?
I don't think we need the "bibliorow" class. My feeling is that we are missing an id on the table.
What you want seems to be: $("#id_table").find('tr').each(function(){ var biblionumber = $(this).data('biblionumber'); });
Maybe we don't need this at all. You currently can: $('#results tbody tr').each(function(){ var biblionumber = $(this).find('input[name="biblionumber"]').val() ) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |INVALID -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27632 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org