Fix bug where editing the project of a todo from project view would not remove the todo from that project

This commit is contained in:
Reinier Balt 2011-03-09 12:13:49 +01:00
parent 8e0b1e4c2d
commit 90d3211a4d
2 changed files with 6 additions and 5 deletions

View file

@ -898,9 +898,10 @@ class TodosController < ApplicationController
@remaining_hidden_count = current_user.todos.hidden.with_tag(tag).count
}
from.project {
@remaining_deferred_or_pending_count = current_user.projects.find(@todo.project_id).todos.deferred_or_blocked.count
@remaining_in_context = current_user.projects.find(@todo.project_id).todos.active.count
@target_context_count = current_user.projects.find(@todo.project_id).todos.active.count
project_id = @project_changed ? @original_item_project_id : @todo.project_id
@remaining_deferred_or_pending_count = current_user.projects.find(project_id).todos.deferred_or_blocked.count
@remaining_in_context = current_user.projects.find(project_id).todos.active.count
@target_context_count = current_user.projects.find(project_id).todos.active.count
}
from.calendar {
@target_context_count = @new_due_id.blank? ? 0 : count_old_due_empty(@new_due_id)