aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'site/lib/tasks/update_discussion_times.rake')
-rw-r--r--site/lib/tasks/update_discussion_times.rake9
1 files changed, 9 insertions, 0 deletions
diff --git a/site/lib/tasks/update_discussion_times.rake b/site/lib/tasks/update_discussion_times.rake
new file mode 100644
index 0000000..885df24
--- /dev/null
+++ b/site/lib/tasks/update_discussion_times.rake
@@ -0,0 +1,9 @@
+namespace :management do
+ desc 'Update discussion times for agenda items that are not assigned or assigned to current agenda'
+ 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