You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/10/19 16:05:18 UTC

[whimsy] branch master updated: sort PMC lists and use original casing in name from resolution

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 87e94a4  sort PMC lists and use original casing in name from resolution
87e94a4 is described below

commit 87e94a4a2b85db1e76387b7d44011b2a52244990
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Oct 19 12:04:31 2017 -0400

    sort PMC lists and use original casing in name from resolution
---
 lib/whimsy/asf/committee.rb                    | 7 ++++---
 www/board/agenda/views/actions/todos.json.rb   | 9 +++++----
 www/board/agenda/views/pages/adjournment.js.rb | 1 +
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 15eacaf..a612f68 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -225,12 +225,13 @@ module ASF
       sections.delete_if {|section| section.downcase.start_with? pmc.downcase}
 
       # build new section
-      section  = ["#{pmc}  (est. #{date.strftime('%m/%Y')})"]
-      people.sort.each do |id, person|
+      people = people.map do |id, person|
         name = "#{person[:name].ljust(26)} <#{...@apache.org>"
-        section << "    #{(name).ljust(59)} [#{date.strftime('%Y-%m-%d')}]"
+        "    #{(name).ljust(59)} [#{date.strftime('%Y-%m-%d')}]"
       end
 
+      section  = ["#{pmc}  (est. #{date.strftime('%m/%Y')})"] + people.sort
+
       # add new section
       sections << section.join("\n") + "\n\n\n"
 
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index 3e0e9da..d943d6a 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -77,12 +77,13 @@ if (@change || @establish || @terminate) and env.password
       rejected = minutes[:rejected] || []
       contents = ASF::Committee.update_next_month(contents, 
         Date.parse(date.gsub('_', '-')), missing, rejected,
-        Array(@establish).map {|resolution| resolution['name']})
+        Array(@establish).map {|resolution| resolution['display_name']})
     end
 
     # update chairs from establish, change, and terminate resolutions
-    chairs = todos.
-      map {|resolution| [resolution['name'], resolution['chair']]}.to_h
+    chairs = todos.map do |resolution| 
+      [resolution['display_name'], resolution['chair']]
+    end.to_h
     contents = ASF::Committee.update_chairs(contents, chairs, @terminate)
 
     # add people from establish resolutions
@@ -92,7 +93,7 @@ if (@change || @establish || @terminate) and env.password
         item['title'] == resolution['title']
       end
 
-      contents = ASF::Committee.establish(contents, resolution['name'], 
+      contents = ASF::Committee.establish(contents, resolution['display_name'], 
         established, item['people'])
     end
 
diff --git a/www/board/agenda/views/pages/adjournment.js.rb b/www/board/agenda/views/pages/adjournment.js.rb
index a97c5ac..ffce842 100644
--- a/www/board/agenda/views/pages/adjournment.js.rb
+++ b/www/board/agenda/views/pages/adjournment.js.rb
@@ -181,6 +181,7 @@ class PMCActions < Vue
             resolution = {
               action: todo_type,
               name: todo.name,
+              display_name: item.title.sub(/^#{todo_type} /i, ''),
               title: item.title,
               minutes: minutes,
               checked: (minutes != 'tabled')

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].