Correction bug no timespent if all issues are closed.

Bug fix: when all tickets are closed and cocu task is null, there was no
worklog to add.