{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/23056","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23056/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23056/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23056/events","html_url":"https://github.com/joomla/joomla-cms/issues/23056","id":379920696,"node_id":"MDU6SXNzdWUzNzk5MjA2OTY=","number":23056,"title":"Add tag description extract to administrator tags view","user":{"login":"rogercreagh","id":44980188,"node_id":"MDQ6VXNlcjQ0OTgwMTg4","avatar_url":"https://avatars3.githubusercontent.com/u/44980188?v=4","gravatar_id":"","url":"https://api.github.com/users/rogercreagh","html_url":"https://github.com/rogercreagh","followers_url":"https://api.github.com/users/rogercreagh/followers","following_url":"https://api.github.com/users/rogercreagh/following{/other_user}","gists_url":"https://api.github.com/users/rogercreagh/gists{/gist_id}","starred_url":"https://api.github.com/users/rogercreagh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogercreagh/subscriptions","organizations_url":"https://api.github.com/users/rogercreagh/orgs","repos_url":"https://api.github.com/users/rogercreagh/repos","events_url":"https://api.github.com/users/rogercreagh/events{/privacy}","received_events_url":"https://api.github.com/users/rogercreagh/received_events","type":"User","site_admin":false},"labels":[{"id":138443932,"node_id":"MDU6TGFiZWwxMzg0NDM5MzI=","url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-12T19:31:02Z","updated_at":"2018-11-12T21:20:00Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce the issue\r\nFeature request\r\nIt is good to have at least the first few dozen characters of the tag descriptions shown in the admin tags list so you can see which tags are missing one or might need updating.\r\nYou can't quite achieve this with a template override of /administrator/components/com_tags/views/tags/tmpl/default.php because the description is not included in the model.\r\nThus a simple addition is needed to /administrator/components/com_tags/models/tags.php\r\nin ```protected function getListQuery()``` somewhere around line 140 amend \r\n```$query->select(\r\n\t$this->getState(\r\n\t\t'list.select',\r\n\t\t'a.id, a.title, a.alias, a.note, a.published, a.access' .\r\n\t\t\t', a.checked_out, a.checked_out_time, a.created_user_id' .\r\n\t\t\t', a.path, a.parent_id, a.level, a.lft, a.rgt' .\r\n\t\t\t', a.language, a.description'\r\n\t)\r\n```\r\nadding ```, a.description``` to the select\r\n\r\n### Expected result\r\nA template override can add a column for description using ```$item->description;``` and implement any length limitation and display stuff required.\r\n\r\n### Actual result\r\nIt throws errors (quite correctly) if you try to access ```$item->description;```\r\n\r\n\r\n### System information (as much as possible)\r\nj 3.9\r\nmacosx10.13.6 serving through MAMP\r\nchrome browser\r\n\r\n\r\n### Additional comments\r\nActually if doing this you might as well implement the column in the view default.php\r\nPersonally I either restrict the length displayed to 100 chars and strip tags, or if I have a very long description I will break it into two parts with an ```<hr>``` (would be better as a [readmore] but by default the readmore button is only available in article editing) and only display the text up to the ```<hr>``` in list views (front and back ends) and use the full description when displaying the tag on its own.\r\nThus in /administrator/components/com_tags/views/tags/tmpl/default.php I have inserted a ```<th>...</th>``` in the relevant place and use \r\n```\r\n<td class=\"hidden-phone\"><span class=\"small\">\r\n\t<?php $text = $item->description;\r\n          $brkpos = strpos($text,'<hr />');\r\n          if ($brkpos) {\r\n              $text = substr($text,0, $brkpos);\r\n              echo strip_tags($text).' [more]';\r\n          } else {\r\n              echo JHtml::_('string.truncate', strip_tags($text), 100); //100 is my choice - could be a param\r\n          }\r\n      ?>\r\n</span></td>\r\n```\r\nto display the description preview.\r\nIn the front end I don't strip the tags, but that's another story.\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/438032336","html_url":"https://github.com/joomla/joomla-cms/issues/23056#issuecomment-438032336","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/23056","id":438032336,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODAzMjMzNg==","user":{"login":"rogercreagh","id":44980188,"node_id":"MDQ6VXNlcjQ0OTgwMTg4","avatar_url":"https://avatars3.githubusercontent.com/u/44980188?v=4","gravatar_id":"","url":"https://api.github.com/users/rogercreagh","html_url":"https://github.com/rogercreagh","followers_url":"https://api.github.com/users/rogercreagh/followers","following_url":"https://api.github.com/users/rogercreagh/following{/other_user}","gists_url":"https://api.github.com/users/rogercreagh/gists{/gist_id}","starred_url":"https://api.github.com/users/rogercreagh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogercreagh/subscriptions","organizations_url":"https://api.github.com/users/rogercreagh/orgs","repos_url":"https://api.github.com/users/rogercreagh/repos","events_url":"https://api.github.com/users/rogercreagh/events{/privacy}","received_events_url":"https://api.github.com/users/rogercreagh/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T21:20:00Z","updated_at":"2018-11-12T21:20:00Z","author_association":"NONE","body":"I agree, all that is _needed_ in the core is  to add description to the query. Template overrides work fine for the view.\r\n\r\nBeing new to github I have no idea at all how this works or how to \"submit a pull request\". Been a lone wolf for too long, so will leave the suggestion for someone who knows how to do it. I'd be most grateful if someone could pick it up.\r\nThank you\r\nRogerCO"}}
{"actor":{"display_login":"rogercreagh"}}