Katello/katello — pull request #589 by bbuckingham (2012-09-05 19:30:12+00:00)
Title: 843529 - cleanup task_statuses and job_tasks on system deletion

This request addresses the following general issue:
- systemA exists
- systemA is a member of a system group
- an action is performed on the system group
- performing this action creates a job along with a set of tasks
(1 for each system in the group), joined together by job_tasks
- systemA is deleted

- when user attempts to access a System Group Event History item
that involved systemA, they get an error... the issue is that
the DB was not cleaned up properly when the system was deleted...
the system is gone, but the task_statuses and job_tasks records
remain...

With this change, the entries in the task_statuses and job_tasks
will now be deleted when the system is deleted. In addition, in
the off chance that record wasn't cleaned in the DB, the UI view
was updated to handle the error cleanly.