aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2011-07-04 19:28:33 +0200
committerPetteri R├Ąty <petsku@petteriraty.eu>2011-07-11 10:09:09 +0300
commit5d1bd8af067a5554ee8f2994691a5109e175fa2b (patch)
tree19d40903b7715b9a872fac5711996de3c7874809 /site/lib/tasks
parentShow community votes properly (diff)
downloadcouncil-webapp-5d1bd8af067a5554ee8f2994691a5109e175fa2b.tar.gz
council-webapp-5d1bd8af067a5554ee8f2994691a5109e175fa2b.tar.bz2
council-webapp-5d1bd8af067a5554ee8f2994691a5109e175fa2b.zip
Pull information on how long meeting took from Gentoo archives
Diffstat (limited to 'site/lib/tasks')
-rw-r--r--site/lib/tasks/update_discussion_times.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/site/lib/tasks/update_discussion_times.rb b/site/lib/tasks/update_discussion_times.rb
new file mode 100644
index 0000000..7d85595
--- /dev/null
+++ b/site/lib/tasks/update_discussion_times.rb
@@ -0,0 +1,10 @@
+desc = 'Update discussion times for ageda items that are not assigned or assigned to current agenda'
+
+namespace :management do
+ task :update_discussion_times => :environment do
+ current_items = Agenda.current.agenda_items
+ unassigned_items = AgendaItem.agenda_is(nil)
+ all_items = current_items + unassigned_items
+ all_items.each { |item| item.update_discussion_time }
+ end
+end