{"action":"created","issue":{"url":"https://api.github.com/repos/mantisbt/mantisbt/issues/650","repository_url":"https://api.github.com/repos/mantisbt/mantisbt","labels_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/650/labels{/name}","comments_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/650/comments","events_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/650/events","html_url":"https://github.com/mantisbt/mantisbt/pull/650","id":107046969,"number":650,"title":"0006939 count only visible notes","user":{"login":"cproensa","id":14123811,"avatar_url":"https://avatars.githubusercontent.com/u/14123811?v=3","gravatar_id":"","url":"https://api.github.com/users/cproensa","html_url":"https://github.com/cproensa","followers_url":"https://api.github.com/users/cproensa/followers","following_url":"https://api.github.com/users/cproensa/following{/other_user}","gists_url":"https://api.github.com/users/cproensa/gists{/gist_id}","starred_url":"https://api.github.com/users/cproensa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cproensa/subscriptions","organizations_url":"https://api.github.com/users/cproensa/orgs","repos_url":"https://api.github.com/users/cproensa/repos","events_url":"https://api.github.com/users/cproensa/events{/privacy}","received_events_url":"https://api.github.com/users/cproensa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-17T18:40:45Z","updated_at":"2016-04-24T10:00:34Z","closed_at":"2016-04-24T10:00:34Z","pull_request":{"url":"https://api.github.com/repos/mantisbt/mantisbt/pulls/650","html_url":"https://github.com/mantisbt/mantisbt/pull/650","diff_url":"https://github.com/mantisbt/mantisbt/pull/650.diff","patch_url":"https://github.com/mantisbt/mantisbt/pull/650.patch"},"body":"This is another take on #0006939: Number of Private notes visible for reporters\r\nIt was also discussed in PR: https://github.com/mantisbt/mantisbt/pull/43\r\nThis PR accounts for each project, (since view bug page may list bugs from different projects, each with different access levels to private notes)\r\nInstead of using count, max in sql query, there's need to traverse actual bugnote list, but it still done in only one query, and trying to get minimum api_calls in the loop.\r\n\r\n* This modification has revealed bug #0020121 which should be fixed to improve performance on bug cache.\r\n\r\n* This modification consolidates sql query which was duplicated (differently) in two apis, creating a new function to be called from both places.\r\n\r\n* I have expanded statistics with new values:\r\nlast_modified_bugnote\r\nlast_submitted_bugnote\r\nwhich can prove useful to future features (eg: #0020122)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mantisbt/mantisbt/issues/comments/213924278","html_url":"https://github.com/mantisbt/mantisbt/pull/650#issuecomment-213924278","issue_url":"https://api.github.com/repos/mantisbt/mantisbt/issues/650","id":213924278,"user":{"login":"cproensa","id":14123811,"avatar_url":"https://avatars.githubusercontent.com/u/14123811?v=3","gravatar_id":"","url":"https://api.github.com/users/cproensa","html_url":"https://github.com/cproensa","followers_url":"https://api.github.com/users/cproensa/followers","following_url":"https://api.github.com/users/cproensa/following{/other_user}","gists_url":"https://api.github.com/users/cproensa/gists{/gist_id}","starred_url":"https://api.github.com/users/cproensa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cproensa/subscriptions","organizations_url":"https://api.github.com/users/cproensa/orgs","repos_url":"https://api.github.com/users/cproensa/repos","events_url":"https://api.github.com/users/cproensa/events{/privacy}","received_events_url":"https://api.github.com/users/cproensa/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T10:00:34Z","updated_at":"2016-04-24T10:00:34Z","body":"close, to refactor when a proper standard for long SQL clauses is implemented"}}