On Tue, Nov 25, 2008 at 6:52 PM, LAN-SUN-LUK Benjamin
<Benjamin.LAN-SUN-LUK(a)supinfo.com> wrote:
Very short patch for this defect.
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..299b43a 100644
--- a/app/models/backlog_item.rb
+++ b/app/models/backlog_item.rb
@@ -33,7 +33,7 @@ class BacklogItem < ActiveRecord::Base
belongs_to :owner, :class_name => 'User', :foreign_key =>
'owner_id'
belongs_to :backup, :class_name => 'User', :foreign_key =>
'backup_id'
- has_many :tasks
+ has_many :tasks, :dependent => :destroy
has_many :remaining_hours_estimates
STATE_PENDING = 0
NAK.
We shouldn't be deleting the tasks, since that's discarding work
actually performed by developers. Instead, if there are tasks against
the item we should disable the the delete option and have the delete
action raise an exception if it's called against an item with 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