Skip to content
Snippets Groups Projects
Commit bcbb47b3 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #3458 from protich/issue/dept-deletion+tasks

Orphaned Tasks on Dept. Deletion
parents 326845c5 42e2c55a
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