Fix bug with getting nonexistent task

 * Also add deleting trigger

Closes-bug: #1326278

Change-Id: Iae4085664f37f1a72e3e1f01f38b04d825cf11bf
Merge "Fix bug with getting nonexistent task"