Signed-off-by: Benjamin LAN-SUN-LUK <benjamin.lan-sun-luk(a)supinfo.com>
---
app/controllers/sprint_controller.rb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/app/controllers/sprint_controller.rb b/app/controllers/sprint_controller.rb
index 772efc4..8cf6897 100644
--- a/app/controllers/sprint_controller.rb
+++ b/app/controllers/sprint_controller.rb
@@ -181,13 +181,15 @@ class SprintController < ApplicationController
def validate_estimates
if request.post?
if params['user_story_id']
+ must_redirect = false
params['user_story_id'].each do |id|
estimate = params["estimate_for_#{id}"]
unless estimate && (estimate.to_f > 0.0)
flash[:message] = 'All backlog items must have a valid estimate.'
- redirect_to :action => :populate
+ must_redirect = true
end
end
+ redirect_to :action => :populate if must_redirect
end
end
end
--
1.6.0.2
Show replies by date