{"action":"created","issue":{"url":"https://api.github.com/repos/okfn/opendatacensus/issues/582","labels_url":"https://api.github.com/repos/okfn/opendatacensus/issues/582/labels{/name}","comments_url":"https://api.github.com/repos/okfn/opendatacensus/issues/582/comments","events_url":"https://api.github.com/repos/okfn/opendatacensus/issues/582/events","html_url":"https://github.com/okfn/opendatacensus/issues/582","id":96631550,"number":582,"title":"Allow a reviewer to ask a submitter a question","user":{"login":"pwalsh","id":791678,"avatar_url":"https://avatars.githubusercontent.com/u/791678?v=3","gravatar_id":"","url":"https://api.github.com/users/pwalsh","html_url":"https://github.com/pwalsh","followers_url":"https://api.github.com/users/pwalsh/followers","following_url":"https://api.github.com/users/pwalsh/following{/other_user}","gists_url":"https://api.github.com/users/pwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/pwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwalsh/subscriptions","organizations_url":"https://api.github.com/users/pwalsh/orgs","repos_url":"https://api.github.com/users/pwalsh/repos","events_url":"https://api.github.com/users/pwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/pwalsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/okfn/opendatacensus/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/okfn/opendatacensus/labels/ok:global","name":"ok:global","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-22T18:15:50Z","updated_at":"2015-07-31T05:07:35Z","closed_at":"2015-07-31T05:07:35Z","body":"# User story\r\n\r\nAS A reviewer I want to email the submitter of the data SO I can ask them question and have a reliable review.\r\n\r\n# Implementation\r\n\r\nWe'll use [Mandrill](https://www.mandrill.com/) as a transactional email backend. \r\n\r\nUsers should never see another user's email, so messages will be send from the system to the recipient, but the recipient has to come back to a page on the app in order to respond. \r\n\r\nAll messages are therefore persisted in the database so that they can be displayed on the submission page, along with the form for submission.\r\n\r\nMessages are only visible to the submitter and reviewer. They are not visible to any other user.\r\n\r\n# Mocks\r\n\r\n## Communication page\r\n\r\n<img src=\"https://docs.google.com/drawings/d/1FFtJe5xyIw8zN4slkNGeyAt3OkXDXd23opIUVynL5vI/pub?w=960&amp;h=720\">\r\n\r\n## Integration on the Submission page\r\n\r\n<img src=\"https://docs.google.com/drawings/d/1NnFRD8M7u3LSaNII0hNBVjuXIUg70YvIRZ3Sb3TkweY/pub?w=960&amp;h=720\">\r\n\r\n# Tasks\r\n\r\n* [ ] Configure a Mandrill account\r\n* [ ] Setup config vars and associated env vars for the Mandrill credentials\r\n* [ ] Add a new \"communication page\" (see mock)\r\n  * [ ] route: `submission/:id/communication` \r\n  * [ ] Accessible only to authed users\r\n  * [ ] Accessible only to reviewers, if no existing messages exist\r\n  * [ ] Accessible only to reviewers and the submitter, if messages exist\r\n* [ ] On the submission page (`review.html`), in the section where there are notes for the reviewer, and a place for the reviewer to comment + publish or reject the submission, add another link:\r\n  * [ ] \"Ask the submitter a question\"\r\n  * [ ] Visible only to reviewers \r\n  * [ ] Links to communication page\r\n  * [ ] If the submitter is anonymous, then the above link cannot be displayed, because it is impossible to email the submitter.\r\n* [ ] Have a new handler for the communication page for messages. POST to the same page, and respond back with appropriate flashed messages (\"You message has been sent to X\" or \"Something when wrong when we tried to send your message {ERROR_MSG}\")\r\n* [ ] Have a new model \"EntryEnquiry\" with the following fields\r\n  * id (uuid)\r\n  * message\r\n  * submitter (FK to submitting user)\r\n  * reviewer (FK to reviewing user)\r\n  * The default timestamp fields, as per the rest of the app\r\n* [ ] Sending a message does the following\r\n  * [ ] Save the message in DB\r\n  * [ ] Send the message as email via Mandrill, the message will have a link back to the communication page"},"comment":{"url":"https://api.github.com/repos/okfn/opendatacensus/issues/comments/126567783","html_url":"https://github.com/okfn/opendatacensus/issues/582#issuecomment-126567783","issue_url":"https://api.github.com/repos/okfn/opendatacensus/issues/582","id":126567783,"user":{"login":"pwalsh","id":791678,"avatar_url":"https://avatars.githubusercontent.com/u/791678?v=3","gravatar_id":"","url":"https://api.github.com/users/pwalsh","html_url":"https://github.com/pwalsh","followers_url":"https://api.github.com/users/pwalsh/followers","following_url":"https://api.github.com/users/pwalsh/following{/other_user}","gists_url":"https://api.github.com/users/pwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/pwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwalsh/subscriptions","organizations_url":"https://api.github.com/users/pwalsh/orgs","repos_url":"https://api.github.com/users/pwalsh/repos","events_url":"https://api.github.com/users/pwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/pwalsh/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T05:07:35Z","updated_at":"2015-07-31T05:07:35Z","body":"The implementation will really on comments, the changes in #608 and #581"}}