Skip to content
Snippets Groups Projects
Commit 42e2c55a authored by Peter Rotich's avatar Peter Rotich
Browse files

Orphaned Tasks on Dept. Deletion

Move orphaned tasks on department deletion to the default department
parent 901e5eae
No related branches found
No related tags found
No related merge requests found
......@@ -388,6 +388,11 @@ implements TemplateVariable {
->filter(array('dept_id' => $id))
->update(array('dept_id' => $cfg->getDefaultDeptId()));
// Move tasks
Task::objects()
->filter(array('dept_id' => $id))
->update(array('dept_id' => $cfg->getDefaultDeptId()));
//Move Dept members: This should never happen..since delete should be issued only to empty Depts...but check it anyways
Staff::objects()
->filter(array('dept_id' => $id))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment