{"action":"created","issue":{"url":"https://api.github.com/repos/Islandora/islandora_usage_stats/issues/57","repository_url":"https://api.github.com/repos/Islandora/islandora_usage_stats","labels_url":"https://api.github.com/repos/Islandora/islandora_usage_stats/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/Islandora/islandora_usage_stats/issues/57/comments","events_url":"https://api.github.com/repos/Islandora/islandora_usage_stats/issues/57/events","html_url":"https://github.com/Islandora/islandora_usage_stats/pull/57","id":302338074,"number":57,"title":"Address 7.x-ISLANDORA-2170.","user":{"login":"mjordan","id":403918,"avatar_url":"https://avatars1.githubusercontent.com/u/403918?v=4","gravatar_id":"","url":"https://api.github.com/users/mjordan","html_url":"https://github.com/mjordan","followers_url":"https://api.github.com/users/mjordan/followers","following_url":"https://api.github.com/users/mjordan/following{/other_user}","gists_url":"https://api.github.com/users/mjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjordan/subscriptions","organizations_url":"https://api.github.com/users/mjordan/orgs","repos_url":"https://api.github.com/users/mjordan/repos","events_url":"https://api.github.com/users/mjordan/events{/privacy}","received_events_url":"https://api.github.com/users/mjordan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-05T15:15:14Z","updated_at":"2018-03-05T20:25:24Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Islandora/islandora_usage_stats/pulls/57","html_url":"https://github.com/Islandora/islandora_usage_stats/pull/57","diff_url":"https://github.com/Islandora/islandora_usage_stats/pull/57.diff","patch_url":"https://github.com/Islandora/islandora_usage_stats/pull/57.patch"},"body":"**JIRA Ticket**: (https://jira.duraspace.org/browse/ISLANDORA-2170)\r\n\r\n# What does this Pull Request do?\r\n\r\nDefines a hook to notify modules that the given access event was persisted.\r\n\r\n# What's new?\r\n\r\nFires the new hook immediately after the functions that persist the object view, collection view, content model view, and datastream view are fired. Passes into the hook the relevant data to allow for useful logic within hook implementations.\r\n\r\n# How should this be tested?\r\n\r\n1. At `admin/islandora/tools/islandora_usage_stats`, make sure \"Omit IPs\" is emtpy and \"Cooldown time\" is 0.\r\n1. Install and enable https://github.com/mjordan/islandora_2170_test, which implements the new hook. This module adds a `dsm()` that shows the values available for object, collection, and content model access events, and prints the raw SQL that you can use to verify that the relevant access log tables maintained by Islandora Usage Stats are being populated. For datastream access, it doesn't fire `dsm()`, it fires `dd()`.\r\n1. After you have enabled the test module, visit a non-collection object page. You should see three messages, one for each of object, collection, and content model access events.\r\n1. To test datastream downloads, attempt to download the object's TN datastream at `http://localhost:8000/islandora/object/{mypid}/datastream/TN/download`. The results will be in `/tmp/drupal_debug.txt`.\r\n1. In all four cases (object, collection, content model, and datastream), the provided SQL rendered by the new hook will show the access attempts\r\n\r\n\r\n# Additional Notes:\r\n\r\n* Does this change require documentation to be updated? No, it includes an .api.php file for developers.\r\n* Does this change add any new dependencies? No.\r\n* Does this change require any other modifications to be made to the repository (ie. Regeneration activity, etc.)? NO.\r\n* Could this change impact execution of existing code? No.\r\n\r\n# Interested parties\r\n@bryjbrown, @Islandora/7-x-1-x-committers\r\n"},"comment":{"url":"https://api.github.com/repos/Islandora/islandora_usage_stats/issues/comments/370552927","html_url":"https://github.com/Islandora/islandora_usage_stats/pull/57#issuecomment-370552927","issue_url":"https://api.github.com/repos/Islandora/islandora_usage_stats/issues/57","id":370552927,"user":{"login":"mjordan","id":403918,"avatar_url":"https://avatars1.githubusercontent.com/u/403918?v=4","gravatar_id":"","url":"https://api.github.com/users/mjordan","html_url":"https://github.com/mjordan","followers_url":"https://api.github.com/users/mjordan/followers","following_url":"https://api.github.com/users/mjordan/following{/other_user}","gists_url":"https://api.github.com/users/mjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjordan/subscriptions","organizations_url":"https://api.github.com/users/mjordan/orgs","repos_url":"https://api.github.com/users/mjordan/repos","events_url":"https://api.github.com/users/mjordan/events{/privacy}","received_events_url":"https://api.github.com/users/mjordan/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T20:25:24Z","updated_at":"2018-03-05T20:25:24Z","author_association":"NONE","body":"@bryjbrown super, thanks!"}}
{"actor":{"display_login":"mjordan"}}