Avoid automatic actions that change the color to fire subsequent events

This commit is contained in:
Frederic Guillot
2016-01-17 14:56:31 -05:00
parent 1259e911e4
commit e94c4cab7f
10 changed files with 34 additions and 20 deletions

View File

@@ -177,11 +177,14 @@ class TaskPosition extends Base
);
if ($task['swimlane_id'] != $new_swimlane_id) {
$this->container['dispatcher']->dispatch(Task::EVENT_MOVE_SWIMLANE, new TaskEvent($event_data));
$this->logger->debug('Event fired: '.Task::EVENT_MOVE_SWIMLANE);
$this->dispatcher->dispatch(Task::EVENT_MOVE_SWIMLANE, new TaskEvent($event_data));
} elseif ($task['column_id'] != $new_column_id) {
$this->container['dispatcher']->dispatch(Task::EVENT_MOVE_COLUMN, new TaskEvent($event_data));
$this->logger->debug('Event fired: '.Task::EVENT_MOVE_COLUMN);
$this->dispatcher->dispatch(Task::EVENT_MOVE_COLUMN, new TaskEvent($event_data));
} elseif ($task['position'] != $new_position) {
$this->container['dispatcher']->dispatch(Task::EVENT_MOVE_POSITION, new TaskEvent($event_data));
$this->logger->debug('Event fired: '.Task::EVENT_MOVE_POSITION);
$this->dispatcher->dispatch(Task::EVENT_MOVE_POSITION, new TaskEvent($event_data));
}
}
}