Summary: | tag cloud diff depends on where you click | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Tools | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | In Discussion --- | QA Contact: | Bugs List <koha-bugs> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, jonathan.druart, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
my tags tab
tag cloud Bug 6178: Display tags from other users in all cases. [Signed-off] Bug 6178: Display tags from other users in all cases. |
Created attachment 3908 [details]
tag cloud
cgi-bin/koha/opac-tags.pl
Comment on attachment 3907 [details]
my tags tab
cgi-bin/koha/opac-tags.pl?mine=1
Right, so the bug is that it says all tags when it should say my tags? Did it do this prior to template toolkit? No the bug is that all tags aren't showing. My tags is the list of tags, the tag cloud should be the 'tag cloud' - which includes all tags. I don't remember what it said in the past, I just noticed this while training an thought I'd note it. When you click the "my tags" link the tags page is passed parameter, "mine=1." The page is supposed to display only the logged in user's tags. This is the query which is going on in the background: SELECT tags_approval.term AS term, tags_approval.approved AS approved, tags_approval.date_approved AS date_approved, tags_approval.approved_by AS approved_by, tags_approval.weight_total AS weight_total, CONCAT(borrowers.surname, ', ', borrowers.firstname) AS approved_by_name FROM tags_approval LEFT JOIN borrowers ON tags_approval.approved_by = borrowers.borrowernumber WHERE approved = 1 and borrowernumber = [logged in borrower] The problems with this is that it will always return no results: borrowernumber doesn't exist in the tags_approval table. It can only be found in the tags_all table. Proposed new SQL: SELECT tags_approval.term AS term, tags_approval.approved AS approved, tags_approval.date_approved AS date_approved, tags_approval.approved_by AS approved_by, tags_approval.weight_total AS weight_total, tags_all.borrowernumber AS tag_submitter CONCAT(borrowers.surname, ', ', borrowers.firstname) AS approved_by_name FROM tags_approval LEFT JOIN borrowers ON tags_approval.approved_by = borrowers.borrowernumber LEFT JOIN tags_all ON tags_all.term = tags_approval.term WHERE approved = 1 and tags_all.borrowernumber = [logged in borrower] I've tried to decipher Tags.pm but I'm failing. I think in order for this to work best we should just always show all tags, including the logged-in user if there is one. I can't see how to gracefully handle the presence or absence of a borrowernumber in get_approval_rows(). If we add tags_all.borrowernumber to the set of returned data we should be able to style the user's tags differently from other tags as suggested in Attachment 2637 [details] of Bug 2899 (of which this bug report is probably a duplicate when it comes down to it). Assuming we can visually distinguish the user's tags from others I think that obviates the need to have a way to show only the user's tags. Can someone else take a crack at this? I too think it should always show all tags - from all users. It's a tag cloud that's the purpose. And the logged in user can see his tags just by looking under 'my tags' *** Bug 2899 has been marked as a duplicate of this bug. *** This bug still exists in master as of 3.12 beta1 Created attachment 37213 [details] [review] Bug 6178: Display tags from other users in all cases. At the OPAC, if you click on the "your tags" link, only you tags are displayed in the tag cloud. There is no sense to do that, the user's tags are displayed in the table below. Test plan: Confirm that you see all tags in the tag cloud, even if you click on the "your tags" link. Created attachment 37221 [details] [review] [Signed-off] Bug 6178: Display tags from other users in all cases. At the OPAC, if you click on the "your tags" link, only you tags are displayed in the tag cloud. There is no sense to do that, the user's tags are displayed in the table below. Test plan: Confirm that you see all tags in the tag cloud, even if you click on the "your tags" link. Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Hm, I am sorry, but I see no difference in behaviour before and after the patch. I have 2 tags: der and das. One belongs to my user, the other to another user. Both always show for me :( I also got some anapproved tags. My list of records shows all my tags - unapproved or not. The cloud only the 2 approved tags from my different users. The other thing: I'd expect that if I set "Tags to show from other users" to 0 or empty, that a) the foreign tag goes away b) that my selection sticks, but the pull down returns to 100 immediately Could you take another look please? (In reply to Katrin Fischer from comment #13) > Hm, I am sorry, but I see no difference in behaviour before and after the > patch. I have 2 tags: der and das. One belongs to my user, the other to > another user. > Both always show for me :( You have to click on the 'your tags' link (not 'Tag cloud'). The link is opac-tags.pl?mine=1 (note the param mine set to 1). Without this patch, the views are different, with it, they are similar. Please try again. I tried both links - from the top navigation and the user account. Will try again. Jonathan, I tried again, but I still spot no difference before and after. >You have to click on the 'your tags' link (not 'Tag cloud'). The link is >opac-tags.pl?mine=1 (note the param mine set to 1). Parameter does never appear for me in the URL, both links show as: http://localhost/cgi-bin/koha/opac-tags.pl More so, there are some problems: There seems to be no way to make the tags of other users disappear from the tag cloud, but the display looks like it should be working - for example setting the 'tags from other users' to 0. But when I save nothing happens and it reloads to show 100. Katrin, I think we are not understanding each others. This patch only affect the tag cloud, not the table. The mine parameter is *removed* by this patch. The idea is to display the same tag cloud, whatever you have clicked on "your tags" or "tag cloud" links. I can confirm it works for me. Please try again. The problem you reported is just a wording issue: the limit just allows to restrict the number of tags displayed (no matter who has created them). Hi Jonathan, I think the table and the other display appeared the same for me. The 'mine' pull down still showed... and I think I disagree with the idea :( I think it should be possible to show me a tag cloud with only my tags. (In reply to Katrin Fischer from comment #18) > Hi Jonathan, I think the table and the other display appeared the same for > me. The 'mine' pull down still showed... and I think I disagree with the > idea :( > I think it should be possible to show me a tag cloud with only my tags. With C4::Tags as it is for now, it's impossible to introduce big changes. IMO the tag cloud should display all tags, especially because the page says "all tags". What is the 'mine' pull down? Setting in discussion. Nicole and Owen, what's your opinion on this one? I think we are misunderstanding each other somewhere - I will try do make some screenshots soon. - also others taking a look is a good idea :) Anybody around? I just re-tested the patch. In my opinion, it does what is expected. How I tested: - Make sure that you have plenty of tags from different users - Make sure you have a test user with just one tag (makes testing easier). Make sure this tag is approved in the staff client. - Log out - Go to OPAC ->Tag cloud Result (without and with patch): All Tags are visible as cloud. - Click link "Log in to see your own saved tags" or log in from home page and go to Tag cloud (in the top navigation) Result: Without and with patch: Page displays the tag cloud and the list of test user's tags - Click on link 'your tags' in the navigation at the left Result: - Without patch: Page cloud is not displayed (you have to hit OK near 'Tags to show...' to display it), the list of test user's tag is displayed. - With patch: Page displays tag cloud and the list of test user's tags (it looks the same as if you click on 'Tag cloud' from the top navigation. Opinion: I prefer the behaviour with patch (same behaviour from the link 'Tag cloud' at the top navigation as from the link at the left navigation ('your tags'). It feels more constant. However, I would propose to change the wording of "Tags to show from other users :" To "Tags to show: ", because logged in user's tags are always included in the tag cloud. BTW: Idea for an enhancement: Add css class to user's own tags e.g. to give them a separate color in the cloud? |
Created attachment 3907 [details] my tags tab When you click on 'my tags' in the opac you see a tag cloud under 'all tags' that is just your tags. If you click on 'tag cloud' you see the real cloud tags.