This is an automated email from the ASF dual-hosted git repository.
sebb 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 0fa3291 Add chair to roster if empty
0fa3291 is described below
commit 0fa3291083592ae78c3bf6ba8662865a57d52da7
Author: Sebb <[email protected]>
AuthorDate: Fri Jan 11 23:23:26 2019 +0000
Add chair to roster if empty
non-PMC committees may only have chair listed
---
www/roster/models/nonpmc.rb | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/www/roster/models/nonpmc.rb b/www/roster/models/nonpmc.rb
index 105e055..464d903 100644
--- a/www/roster/models/nonpmc.rb
+++ b/www/roster/models/nonpmc.rb
@@ -50,6 +50,15 @@ class NonPMC
end
roster = cttee.roster.dup
+ # if the roster is empty, then add the chair(s)
+ if roster.empty?
+ cttee.chairs.each do |ch|
+ roster[ch[:id]] = {name: ch[:name], date: 'uknown'} # it is used to
flag CI data so must be true in Javascript
+ end
+ end
+ cttee_members = roster.keys # get the potentially updated list
+
+ # now add the status info
roster.each {|key, info| info[:role] = 'Committee member'}
members.each do |person|
@@ -143,7 +152,7 @@ class NonPMC
site: cttee.site,
established: cttee.established,
ldap: members.map(&:id),
- members: cttee.roster.keys,
+ members: cttee_members,
committers: committers.map(&:id),
roster: roster,
mail: Hash[lists.sort],