Skip to content

Commit

Permalink
Temporary fix for retrospectives
Browse files Browse the repository at this point in the history
  • Loading branch information
shereefb committed Apr 29, 2011
1 parent c72cc09 commit ed937f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/retro.rb
Expand Up @@ -84,6 +84,7 @@ def close
announce_close
self.status_id = STATUS_COMPLETE
self.save
self.distribute_credits
end

def calculate_ratings
Expand Down
13 changes: 13 additions & 0 deletions lib/tasks/custom.rake
Expand Up @@ -221,5 +221,18 @@ namespace :custom do
end
end

#moving from features to tags
task :run_once_fix_retros => :environment do
Retro.all.each do |r|
if r.status_id == 3 && r.total_points > 0
dist = CreditDistribution.find_by_retro_id(r.id)
unless dist
puts("retro #{r.id} for #{r.project.name}")
r.update_attribute(:status_id, 2)
r.distribute_credits
end
end
end
end

end

0 comments on commit ed937f9

Please sign in to comment.