You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/10/17 16:41:40 UTC
[whimsy] branch master updated: Parse date once
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 27612bc Parse date once
27612bc is described below
commit 27612bc6059c1aa3af91357e7469ee28aa68df10
Author: Sebb <se...@apache.org>
AuthorDate: Sat Oct 17 17:41:31 2020 +0100
Parse date once
---
www/board/agenda/views/actions/todos.json.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index 666acb2..e9e796e 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -6,6 +6,7 @@ TLPREQ = ASF::SVN['tlpreq-input']
date = params[:date].gsub('-', '_')
raise ArgumentError, "Invalid date #{date}" unless date =~ /\A\d+_\d+_\d+\z/
+date_established = Date.parse(date.gsub('_', '-'))
agenda = "board_agenda_#{date}.txt"
@@ -76,7 +77,7 @@ if (@change || @establish || @terminate) and env.password
map {|item| item['title']}
rejected = minutes[:rejected] || []
contents = ASF::Committee.update_next_month(contents,
- Date.parse(date.gsub('_', '-')), missing, rejected, todos)
+ date_established, missing, rejected, todos)
end
# update chairs from establish, change, and terminate resolutions
@@ -88,14 +89,13 @@ if (@change || @establish || @terminate) and env.password
end
# add people from establish resolutions
- established = Date.parse(date.gsub('_', '-'))
Array(@establish).each do |resolution|
item = parsed_agenda.find do |it|
it['title'] == resolution['title']
end
contents = ASF::Committee.establish(contents, resolution['display_name'],
- established, item['people'])
+ date_established, item['people'])
end
contents