Skip to content

Commit

Permalink
coomunicate issue creation to member
Browse files Browse the repository at this point in the history
  • Loading branch information
Vino-S committed Jul 3, 2024
1 parent d5b6efd commit 48d0582
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ def freecen_vld_invalid_pob_report(email_subject, email_body, report, report_nam
mail(:to => email_addresses, :cc => cc_addresses, :subject => email_subject, :body => email_body)
end

def communicate_github_issue_creation(feedback)
@feedback = feedback
@user = UseridDetail.where(userid: feedback.user_id).first
@user_email = @user.email_address
mail(to: @user_email, :subject => 'Notification of github issue creation')
end

def notification_of_technical_registration(user)
@appname = appname
@user = user
Expand Down
1 change: 1 addition & 0 deletions app/models/feedback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def github_issue
logger.info("#{appname}:GITHUB response: #{response}")
logger.info(response.inspect)
self.update_attributes(:github_issue_url => response[:html_url],:github_comment_url => response[:comments_url], :github_number => response[:number])
UserMailer.communicate_github_issue_creation(self).deliver_now
else
logger.error("#{appname}:Tried to create an issue, but Github integration is not enabled!")
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<p>Dear <%= @user.userid%></p>
<p>You had submitted some feedback to <%= @appname %> reference
<a href="<%=Rails.application.config.website%>/feedbacks/<%=@feedback.id%>"><%= @feedback.identifier %></a>
to us with the title <b><%= @feedback.title%></b> at <%= @feedback.feedback_time.strftime("%H:%M on %F") unless @feedback.feedback_time.nil?%></p>
<p>This email is to notify you that we have created an github issue and you can monitor the progess here: <%= link_to "link to github issue", @feedback.github_issue_url %></p>

0 comments on commit 48d0582

Please sign in to comment.