rundfunk-mitbestimmen icon indicating copy to clipboard operation
rundfunk-mitbestimmen copied to clipboard

[WIP]849 send notification when broadcast is created

Open faithngetich opened this issue 6 years ago • 3 comments

Description

Fixes #849

Motivation and Context

It would be nice to send an email/slack notification informing that a new broadcast has been created.

How Has This Been Tested?

You will need to login to the site and create a broadcast, an easy way of doing so is as follows:

  • Go to this link and search for a broadcast that does not exist.
  • You'll be redirected to a page where you can create a broadcast. When you fill in the details and hit the create button you will be able to trigger the email.
  • Open mailer should send you to a link with the email details.
  • If you're not redirected, relax you can still view the emails on this link. This will show you all the emails that you have attempted sending.

Screenshots (if appropriate):

When you have successfully created a broadcast screen shot 2018-10-25 at 19 26 00 Just before you save the broadcast screen shot 2018-10-25 at 19 25 42

Checklist:

  • [x] My code follows the code style of this project.
  • [x] I have updated the documentation accordingly.
  • [x] I have added tests to cover my changes.

faithngetich avatar Oct 25 '18 16:10 faithngetich

@faithngetich I updated your PR quite a bit and I hope I paved the way for you with some tests. I replaced letter_opener with mailhog which is the cleaner alternative, as it does not require a change to our rails code. Also, I configured sidekiq to process our mailers.

roschaefer avatar Oct 27 '18 18:10 roschaefer

Hello @roschaefer, what can I do to help finish this PR?

ciremoussadia avatar May 21 '19 13:05 ciremoussadia

@ciremoussadia sorry for responding so late. I kept the Github notification "unread" to motivate me to dig into this PR but I failed.

So, to answer your question: The build server tells me that push has succeeded but pr has not. This could mean that branch master was updated and has not been merged into this PR.

  1. git checkout 849_send_notification_when_broadcast_is_created
  2. git fetch
  3. git merge origin/master
  4. git push origin -u 849_send_notification_when_broadcast_is_created

Will update this PR. The expected outcome is that both pr and push fail. The build server tells me that there are rubocop errors (easy) and some rspec failures. You could fix the rubocops with bundle exec rubocop -a. As a next step you would need to fix the rspec tests. I think once this is done we could merge the PR.

roschaefer avatar Jun 03 '19 10:06 roschaefer