That sets the task id yes, but by setting a story for the task, we will not get NPE for task.getStory().getId()