{"action":"created","issue":{"url":"https://api.github.com/repos/magfest/ubersystem/issues/1896","repository_url":"https://api.github.com/repos/magfest/ubersystem","labels_url":"https://api.github.com/repos/magfest/ubersystem/issues/1896/labels{/name}","comments_url":"https://api.github.com/repos/magfest/ubersystem/issues/1896/comments","events_url":"https://api.github.com/repos/magfest/ubersystem/issues/1896/events","html_url":"https://github.com/magfest/ubersystem/pull/1896","id":164568287,"number":1896,"title":"BIG: add automated email workflow improvements / overhaul email subsystem","user":{"login":"binary1230","id":5413064,"avatar_url":"https://avatars.githubusercontent.com/u/5413064?v=3","gravatar_id":"","url":"https://api.github.com/users/binary1230","html_url":"https://github.com/binary1230","followers_url":"https://api.github.com/users/binary1230/followers","following_url":"https://api.github.com/users/binary1230/following{/other_user}","gists_url":"https://api.github.com/users/binary1230/gists{/gist_id}","starred_url":"https://api.github.com/users/binary1230/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary1230/subscriptions","organizations_url":"https://api.github.com/users/binary1230/orgs","repos_url":"https://api.github.com/users/binary1230/repos","events_url":"https://api.github.com/users/binary1230/events{/privacy}","received_events_url":"https://api.github.com/users/binary1230/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-07-08T16:32:20Z","updated_at":"2016-11-29T02:12:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/magfest/ubersystem/pulls/1896","html_url":"https://github.com/magfest/ubersystem/pull/1896","diff_url":"https://github.com/magfest/ubersystem/pull/1896.diff","patch_url":"https://github.com/magfest/ubersystem/pull/1896.patch"},"body":"add automated email workflow improvements:\r\n- add construct of date_filter, which allows the UI to display date conditions. doing this in the lambda filter, like we were before, functionally does the same thing, however, if we separate it out, it means the UI can inspect and show the date conditions.\r\n- on each email sending daemon run, count the number of emails that would have been sent if they were marked approved\r\n\r\noverhaul pending emails page to:\r\n- show all email categories (not just ones that need approving)\r\n- show # of sent and queued emails\r\n- show whether an approval was automatic or manual\r\n\r\nmassively refactor the underlying email subsystem to be easier to read and write a lot of tests for it\r\n\r\nmerge with:\r\n* https://github.com/magfest/magprime/pull/169\r\n* https://github.com/magfest/mivs/pull/77\r\n* https://github.com/magfest/hotel/pull/66\r\n* https://github.com/magfest/bands/pull/59\r\n* https://github.com/magfest/panels/pull/55\r\n* https://github.com/magfest/sideboard/pull/48\r\n* https://github.com/magfest/simple-rams-deploy/pull/24\r\n* https://github.com/magfest/attendee_tournaments/pull/4\r\n\r\nPR notes:\r\n- [x] merge alongside a bunch of other PRs for the other plugins, which I am not creating right now to avoid pull request explosion.  the other PRs just use the date_filter construct and aren't doing anything complex.  when we're ready, I'll create that stuff.\r\n- [x] get signoff from @kitsuta and @EliAndrewC \r\n- [x] write unit tests for decent amount of code coverage (in progress)\r\n- [x] write unit tests for date-based methods\r\n- [x] write unit tests for when() methods in AutomatedEmail\r\n- [x] write (functional) tests for automated daemon runs that mock() up send_email() function\r\n- [X] probably only merge this after the centralized logging PRs so that we can detect any errors easily\r\n- [x] MIVS plugin convert automated_emails.py `when` filter\r\n- [x] magprime plugin convert automated_emails.py to use  `when` filter\r\n- [x] re-review this to make sure everything from #2063 is now in here correctly (seems to be)\r\n- [ ] run final test with a copy of the production DB to make sure this thing doesn't go haywire"},"comment":{"url":"https://api.github.com/repos/magfest/ubersystem/issues/comments/263456199","html_url":"https://github.com/magfest/ubersystem/pull/1896#issuecomment-263456199","issue_url":"https://api.github.com/repos/magfest/ubersystem/issues/1896","id":263456199,"user":{"login":"EliAndrewC","id":651592,"avatar_url":"https://avatars.githubusercontent.com/u/651592?v=3","gravatar_id":"","url":"https://api.github.com/users/EliAndrewC","html_url":"https://github.com/EliAndrewC","followers_url":"https://api.github.com/users/EliAndrewC/followers","following_url":"https://api.github.com/users/EliAndrewC/following{/other_user}","gists_url":"https://api.github.com/users/EliAndrewC/gists{/gist_id}","starred_url":"https://api.github.com/users/EliAndrewC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EliAndrewC/subscriptions","organizations_url":"https://api.github.com/users/EliAndrewC/orgs","repos_url":"https://api.github.com/users/EliAndrewC/repos","events_url":"https://api.github.com/users/EliAndrewC/events{/privacy}","received_events_url":"https://api.github.com/users/EliAndrewC/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T02:12:40Z","updated_at":"2016-11-29T02:12:40Z","body":"> Once that's done, this is ready to go for real.\r\n\r\nHuzzah!"}}
{"actor":{"display_login":"EliAndrewC"}}