Improving performance during task position change (3 times faster than before)

This commit is contained in:
Frederic Guillot
2015-12-23 15:39:37 +01:00
parent 8ff2032ea3
commit 4003b122d0
5 changed files with 82 additions and 128 deletions

View File

@@ -106,7 +106,7 @@ class TaskPositionTest extends Base
$this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1, 'column_id' => 1)));
$this->assertEquals(2, $tc->create(array('title' => 'Task #2', 'project_id' => 1, 'column_id' => 1)));
// We move the task 2 to the column 3
// We move the task 1 to the column 3
$this->assertTrue($tp->movePosition(1, 1, 3, 1));
// Check tasks position
@@ -235,7 +235,7 @@ class TaskPositionTest extends Base
$this->assertEquals(3, $tc->create(array('title' => 'Task #3', 'project_id' => 1, 'column_id' => 1)));
$this->assertEquals(4, $tc->create(array('title' => 'Task #4', 'project_id' => 1, 'column_id' => 1)));
// Move the last task to the bottom
// Move the first task to the bottom
$this->assertTrue($tp->movePosition(1, 1, 1, 4));
// Check tasks position