[Bug 22420] New: Tag cloud feature broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Bug ID: 22420 Summary: Tag cloud feature broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Steps to reproduce: - Have the OPAC tags feature enabled - Add a couple tags to different records, make sure some of them are used more than once - Go to 'Tag cloud' in the OPAC => FAIL: the repeated tags are displayed the same size of the other ones, and repeated many times (one per use). This was caused by bug 14385. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14385 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14385 [Bug 14385] Extend OpacHiddenItems to allow specifying exempt borrower categories -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm sure it was caused by bug 14385 because it overwrites $results with something they calculate, and commmenting out the overwriting line fixes the problem. 324 } 325 #$results = \@filtered_results; 326 stratify_tags(10, $results); # work out the differents sizes for things -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|oleonard@myacpl.org |mtompset@hotmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21846 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=22420 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 85748 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85748&action=edit Bug 22420: Remove duplicated tags Caused by commit e1b5fa657de843a177fb4bf57947a1376152d021 Bug 14385: Squash of a lot of patches rebased Test plan: - Have the OPAC tags feature enabled - Add a couple tags to different records, make sure some of them are used more than once - Go to 'Tag cloud' in the OPAC => the repeated tags must not be repeated many times. [- Enjoy the lack of tests.] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|mtompset@hotmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #2)
Created attachment 85748 [details] [review] Bug 22420: Remove duplicated tags
Caused by commit e1b5fa657de843a177fb4bf57947a1376152d021 Bug 14385: Squash of a lot of patches rebased
Test plan: - Have the OPAC tags feature enabled - Add a couple tags to different records, make sure some of them are used more than once - Go to 'Tag cloud' in the OPAC => the repeated tags must not be repeated many times.
[- Enjoy the lack of tests.]
This doesn't solve the problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 85755 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85755&action=edit [ALTERNATIVE] Bug 22420: Remove wrong calaculation on approved tags Before the patch from bug 14385, the passed structure (that is returned by get_approval_rows() looks like: \ [ [0] { approved 1, approved_by 51, approved_by_name undef, date_approved "2019-02-26 15:36:42", term "another", weight_total 3 }, [1] { ... After the introduced 'filtering', we loose the information about the term weight!: \ [ [0] { approved 1, author "Heylin, Clinton.", biblionumber 1, borrowernumber 51, date_created "2019-02-26 15:36:37", language undef, subtitle [], tag_id 1, term "word", time_created_display "15:36:37", title "E Street shuffle :", visible 1, XSLTBloc " <<<BUNCH OF GENERATED HTML HERE>>> ... The code even calls GetMarcBiblio. This needs to be reverted as it is plain wrong. If it was worth removing *some* biblios from the weight_total value, then this calculation should be done somewhere else, without fetching the MARC data again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What you are suggesting is temporary and must be fixed, right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #5)
What you are suggesting is temporary and must be fixed, right?
After looking at this and having feedback on koha-devel I can say the 'feature' of hiding tags for hidden bibliographic records (due to OpacHiddenItems modulo OpacHiddenExceptions) is broken altogether. i.e. The calculation is wrong anyway and the loop doesn't generate a suitable data structure either. I prefer my approach to solve the immediate issue (no tags are hidden anyway, just wrongly displayed), and file a separate bug for the leakage bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22766 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sending to NSO with your patch then ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85748|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=22420 Claudio <costalc@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |costalc@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |tomascohen@gmail.com |ommunity.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 22766 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_19_05_candidate Severity|normal |major --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Upping severity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Needs Signoff |Signed Off --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Moving this to signed off as per this comment: bug 22766 comment 5 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85755|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 89163 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89163&action=edit Bug 22420: Remove wrong calculation on approved tags Before the patch from bug 14385, the passed structure (that is returned by get_approval_rows() looks like: \ [ [0] { approved 1, approved_by 51, approved_by_name undef, date_approved "2019-02-26 15:36:42", term "another", weight_total 3 }, [1] { ... After the introduced 'filtering', we loose the information about the term weight!: \ [ [0] { approved 1, author "Heylin, Clinton.", biblionumber 1, borrowernumber 51, date_created "2019-02-26 15:36:37", language undef, subtitle [], tag_id 1, term "word", time_created_display "15:36:37", title "E Street shuffle :", visible 1, XSLTBloc " <<<BUNCH OF GENERATED HTML HERE>>> ... The code even calls GetMarcBiblio. This needs to be reverted as it is plain wrong. If it was worth removing *some* biblios from the weight_total value, then this calculation should be done somewhere else, without fetching the MARC data again. Signed-off-by: Claudio <costalc@gmail.com> 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=22420 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Fixes a major regression. I agree if filtering is needed, we should resolve that separately. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.05.00, 18.11.06 released in| | Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependencies, wont backport to 18.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22985 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22420 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org