protected function populateEntityFromEvent($eventData, $entity)
    {
        if (empty($eventData)) {
            return $entity;
        }

        if (isset($eventData['extra'])) {
            $eventData = array_merge($eventData, $eventData['extra']);
        }

        foreach ($eventData as $name => $value) {
            if ($name === 'priorityName') {
                $name = 'priority';
            }
            if (method_exists($entity, 'set' . ucfirst($name))) {
                $entity->{'set' . ucfirst($name)}($value);
            }
        }
        return $entity;
    }