Back from vacation, but still a bit jet-lagged.

Overall, on the right track, but a number of small problems. I need to set things up better so that this type of function can be unit tested.

Brett started to get the test suite back working again, but looking at it, it has further to go. It might be a few days.

Also, this should be coordinated with Brett and Phil? We (you and I) have talked about automatically adding chairs to committee-info.txt and this is sending out an email that overlaps with the board summary that the chair sends out. It might be a good idea to get a list of all of the things that should be done and figure out who should be doing them.

More inline.

On 7/25/17 8:58 PM, Craig Russell wrote:
Let's try this again. Having an attachment in the middle of a message removes 
everything that follows it. :-(

On Jul 24, 2017, at 8:47 AM, Craig Russell <[email protected]> wrote:

diff --git a/www/board/agenda/views/actions/todos.json.rb 
b/www/board/agenda/views/actions/todos.json.rb
index 205a67e..c980c2d 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -123,6 +123,22 @@ if @establish and env.password

The line number above doesn't match the latest.  Are you current?

         ASF::Committee.add(pmc.downcase, members)
       end
     end
+    # send out congratulations email
+    ASF::Mail.configure

The above line only needs to be done once per process, but it doesn't hurt to do it multiple times. Perhaps it should be moved to the top of the file?

+    sender = ASF::Person.new(env.user)

The next line should only be done if it is a podling. So something like the following around the mail= and mail.deliver! statement:

poding = ASF::Podling.find(pmc.downcase)
if podling
  ...
end

+    mail = Mail.new do
+      from "#{sender.public_name} <#{sender.id}@apache.org>"
+      to project.dev_mail_list()

The above should be podling.dev_mail_list

+      cc 'Apache Board <[email protected]>'
+      subject "Congratulations to Apache Top Level Project " + project

Replace project with podling.display_name

+      body "Dear " + project + " ,\n\nAt this month's board meeting, " +
+      project + " was approved to become a top level project with " +
+      id + " as project chair. Congratulations and best wishes."

Instead of id, it should be either chair.id or chair.public_name

+      "\n\nWarm regards,\n\n#{sender.public_name}"

Also, it looks like I set a bad example. The body probably should be a template.

+    end
+
+    mail.deliver!
+
   end

   # create 'victims' file for tlpreq tool

- Sam Ruby

Craig L Russell
Secretary, Apache Software Foundation
[email protected] http://db.apache.org/jdo

Reply via email to