BZ-1042520 - BZ-1033541: if there is no data to show close the task details panel
- adding missing event class
BZ-1042520 - BZ-1033541: adding additional checks to guarantee correct behaviour