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 f20b78fe Add withdrawal request age
f20b78fe is described below
commit f20b78fe1bad18082612829f86b3be17149649cb
Author: Sebb <[email protected]>
AuthorDate: Thu Sep 12 21:36:01 2024 +0100
Add withdrawal request age
---
www/roster/models/committer.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index 78b2ceb3..93ad2907 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -188,9 +188,11 @@ class Committer
end
if auth[:secretary]
- path, name = ASF::WithdrawalRequestFiles.findpath(person.id, env)
+ path, _name, _timestamp, epoch =
ASF::WithdrawalRequestFiles.findpath(person.id, env, true)
if path
response[:forms][:withdrawal_request] = path
+ # Calculate the age in days
+ response[:withdrawal_request_age] = (((Time.now.to_i -
epoch).to_f/SECS_TO_DAYS)).round(1).to_s
end
end
else