On Tue, Nov 25, 2008 at 7:29 PM, LAN-SUN-LUK Benjamin
<Benjamin.LAN-SUN-LUK(a)supinfo.com> wrote:
Ok. Now, if the item have some tasks, icon are not show and the
controller
raise.
Signed-off-by: Benjamin LAN-SUN-LUK <benjamin.lan-sun-luk(a)supinfo.com>
---
app/models/backlog_item.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/app/models/backlog_item.rb b/app/models/backlog_item.rb
index 4fd4501..d962fda 100644
--- a/app/models/backlog_item.rb
+++ b/app/models/backlog_item.rb
@@ -152,7 +152,7 @@ class BacklogItem < ActiveRecord::Base
# Returns whether the user can drop this backlog item.
def can_drop?(user)
- (state == STATE_ASSIGNED) && owner?(user) && sprint.active?
+ (state == STATE_ASSIGNED) && owner?(user) && sprint.active?
&&
self.tasks.empty?
end
# Returns whether the user can complete this backlog item.
Also add in the the ItemsController to raise an exception if an
attempt is made to delete a BacklogItem that contains tasks.
--
Darryl L. Pierce <mcpierce(a)gmail.com>
Visit the Infobahn Offramp: <
http://mcpierce.multiply.com>
"Bury me next to my wife. Nothing too fancy..." - Ulysses S. Grant