Remove new issue notifications for now
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Dec 2017 16:19:58 +0000 (16:19 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 13 Dec 2017 16:29:46 +0000 (16:29 +0000)
This can be re-implemented later.

app/controllers/reports_controller.rb
app/models/notifier.rb
app/views/notifier/new_issue_notification.html.erb [deleted file]
config/locales/en.yml

index 781c3af66b87021405710388ec7c92f8a2d6a4f8..b5740d146bf9557e390465026d8615b79a425445 100644 (file)
@@ -18,7 +18,6 @@ class ReportsController < ApplicationController
     if @report.save
       @report.issue.save
       # FIXME: reopen issue if necessary
-      # FIXME: new issue notification (or via model observer)
       redirect_to root_path, :notice => t("issues.create.successful_report")
     else
       redirect_to new_report_path(:reportable_type => @report.issue.reportable_type, :reportable_id => @report.issue.reportable_id), :notice => t("issues.create.provide_details")
index 54eb9b41852c71622f772a7fb4894558db31172e..8f9e3e2954814e45151632c0ba88ca0db8fa6dfd 100644 (file)
@@ -189,17 +189,6 @@ class Notifier < ActionMailer::Base
     end
   end
 
-  def new_issue_notification(issue_id, recipient)
-    with_recipient_locale recipient do
-      @url = url_for(:host => SERVER_URL,
-                     :controller => "issues",
-                     :action => "show",
-                     :id => issue_id)
-      subject = I18n.t("notifier.new_issue_notification.subject")
-      mail :to => recipient.email, :subject => subject
-    end
-  end
-
   private
 
   def set_shared_template_vars
diff --git a/app/views/notifier/new_issue_notification.html.erb b/app/views/notifier/new_issue_notification.html.erb
deleted file mode 100644 (file)
index b38dca4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<p><%= t("notifier.new_issue_notification.greeting") %></p>
-
-<p><%= t("notifier.new_issue_notification.new_issue") %></p>
-
-<p><%= link_to t("notifier.new_issue_notification.url"), @url %></p>
\ No newline at end of file
index 7c127ffc7b273b9fa287c42acf7ca93748af2f66..f52cc4e6962937f88f4e0251f45ed7c8f6c54b9a 100644 (file)
@@ -1388,11 +1388,6 @@ en:
         partial_changeset_without_comment: "without comment"
       details: "More details about the changeset can be found at %{url}."
       unsubscribe: 'To unsubscribe from updates to this changeset, visit %{url} and click "Unsubscribe".'
-    new_issue_notification:
-      subject: "[OpenStreetMap] New Issue"
-      greeting: "Hi,"
-      new_issue: "A new issue has been created"
-      url: You can view the issue here
   message:
     inbox:
       title: "Inbox"