{"action":"created","issue":{"url":"https://api.github.com/repos/mysociety/alaveteli/issues/3641","repository_url":"https://api.github.com/repos/mysociety/alaveteli","labels_url":"https://api.github.com/repos/mysociety/alaveteli/issues/3641/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/issues/3641/comments","events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/3641/events","html_url":"https://github.com/mysociety/alaveteli/pull/3641","id":193845967,"number":3641,"title":"Issues/alaveteli pro 40/dashboard","user":{"login":"crowbot","id":2912,"avatar_url":"https://avatars.githubusercontent.com/u/2912?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbot","html_url":"https://github.com/crowbot","followers_url":"https://api.github.com/users/crowbot/followers","following_url":"https://api.github.com/users/crowbot/following{/other_user}","gists_url":"https://api.github.com/users/crowbot/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbot/subscriptions","organizations_url":"https://api.github.com/users/crowbot/orgs","repos_url":"https://api.github.com/users/crowbot/repos","events_url":"https://api.github.com/users/crowbot/events{/privacy}","received_events_url":"https://api.github.com/users/crowbot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-12-06T18:17:27Z","updated_at":"2016-12-22T10:12:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/3641","html_url":"https://github.com/mysociety/alaveteli/pull/3641","diff_url":"https://github.com/mysociety/alaveteli/pull/3641.diff","patch_url":"https://github.com/mysociety/alaveteli/pull/3641.patch"},"body":"- [x] Where should we be linking the embargoes 'to-do' item to? \r\n- [x] 'Update statuses' should be singular when there's only one request to update.\r\n- [ ] Annotate models\r\n- [ ] Populate and update new fields? \r\n- [x] Filter for 'embargo_expiring' in request list\r\n- [x] Filter for 'overdue', 'very_overdue' in request list\r\n- [ ] Icons for 'overdue' and 'very overdue' in request list\r\n- [ ] Time zones if storing dates? \r\n\r\nI've run into a couple of questions in attempting to implement the 'To-do' list part of this page. \r\n\r\nFirst, where to link to when there are multiple embargoes expiring this week. I've had a chat with @wrightmartin about this and we think the dashbaord request list with either a hidden or explicit 'embargo' filter set. \r\n\r\nSecond, how to implement the 'there are n overdue requests' to-do item. We don't currently store an explicit field for each request that specifies its due date - we calculate this [on-the-fly](https://github.com/mysociety/alaveteli/blob/develop/app/models/info_request.rb#L717) where we need it. We could hack the query here - as the [overdue alert sending code does](https://github.com/mysociety/alaveteli/blob/develop/app/mailers/request_mailer.rb#L272) by getting the user's requests which might be overdue and then calculating if they are, but that seems not ideal. Additionally I suspect the overdue alert sending code of being a bit of a resource hog, so it may not make sense to keep using that approach. \r\n\r\nI _think_ we can save the `initial_request_last_sent_at`,  `date_response_required_by` and `date_very_overdue_after` values for a request to the database, as shown in this PR so far, which would make it simple to define some scopes that would return overdue or very overdue requests. The trickier bit would be to make sure that we update them when the request is resent. I'm thinking maybe we could do this via `log_event`. We then also have to populate the fields for all existing requests which might take some time. So I'm a bit torn between thinking this would be a useful improvement for core and thinking that it's overkill at this point. "},"comment":{"url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments/268766680","html_url":"https://github.com/mysociety/alaveteli/pull/3641#issuecomment-268766680","issue_url":"https://api.github.com/repos/mysociety/alaveteli/issues/3641","id":268766680,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T10:12:16Z","updated_at":"2016-12-22T10:12:16Z","body":"\n[![Coverage Status](https://coveralls.io/builds/9392132/badge)](https://coveralls.io/builds/9392132)\n\nCoverage decreased (-0.2%) to 92.676% when pulling **75e040c5ed7b4869da4b75884cf07af179887a9d on issues/alaveteli-pro-40/dashboard** into **311365185f7513606e172330a3d0d5351c76da24 on alaveteli-pro-develop**.\n"}}
{"actor":{"display_login":"coveralls"}}