mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 08:46:11 +01:00
fix #1196. You can now transition from pending to project_hidden
One side effect though: althoug dependencies are still in place, the gui cannot differentiate between pending and hidden todos. The views currently do not show dependencies anymore in hidden projects. Postponing a fix for 2.2 Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
parent
5a168beef9
commit
a332f8f557
1 changed files with 2 additions and 1 deletions
|
|
@ -80,11 +80,12 @@ class Todo < ActiveRecord::Base
|
|||
end
|
||||
|
||||
aasm_event :hide do
|
||||
transitions :to => :project_hidden, :from => [:active, :deferred]
|
||||
transitions :to => :project_hidden, :from => [:active, :deferred, :pending]
|
||||
end
|
||||
|
||||
aasm_event :unhide do
|
||||
transitions :to => :deferred, :from => [:project_hidden], :guard => Proc.new{|t| !t.show_from.blank? }
|
||||
transitions :to => :pending, :from => [:project_hidden], :guard => :uncompleted_predecessors?
|
||||
transitions :to => :active, :from => [:project_hidden]
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue