summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Model/TaskFinder.php1
-rw-r--r--app/Schema/Mysql.php4
-rw-r--r--app/Schema/Postgres.php4
-rw-r--r--tests/units/TaskFilterTest.php14
4 files changed, 19 insertions, 4 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index 15274707..3e76041c 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -127,6 +127,7 @@ class TaskFinder extends Base
Category::TABLE.'.name AS category_name',
Category::TABLE.'.description AS category_description',
Board::TABLE.'.title AS column_name',
+ Board::TABLE.'.position AS column_position',
Swimlane::TABLE.'.name AS swimlane_name',
Project::TABLE.'.default_swimlane',
Project::TABLE.'.name AS project_name'
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index af7c3c87..b1ac0ab9 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -15,8 +15,8 @@ function version_85($pdo)
function version_84($pdo)
{
- $pdo->exec("ALTER TABLE projects ADD COLUMN start_date CHAR(10) DEFAULT ''");
- $pdo->exec("ALTER TABLE projects ADD COLUMN end_date CHAR(10) DEFAULT ''");
+ $pdo->exec("ALTER TABLE projects ADD COLUMN start_date VARCHAR(10) DEFAULT ''");
+ $pdo->exec("ALTER TABLE projects ADD COLUMN end_date VARCHAR(10) DEFAULT ''");
}
function version_83($pdo)
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index 03f71de0..9477b416 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -15,8 +15,8 @@ function version_65($pdo)
function version_64($pdo)
{
- $pdo->exec("ALTER TABLE projects ADD COLUMN start_date CHAR(10) DEFAULT ''");
- $pdo->exec("ALTER TABLE projects ADD COLUMN end_date CHAR(10) DEFAULT ''");
+ $pdo->exec("ALTER TABLE projects ADD COLUMN start_date VARCHAR(10) DEFAULT ''");
+ $pdo->exec("ALTER TABLE projects ADD COLUMN end_date VARCHAR(10) DEFAULT ''");
}
function version_63($pdo)
diff --git a/tests/units/TaskFilterTest.php b/tests/units/TaskFilterTest.php
index 80d5ee4c..1ae1e5b8 100644
--- a/tests/units/TaskFilterTest.php
+++ b/tests/units/TaskFilterTest.php
@@ -14,6 +14,20 @@ use Model\Swimlane;
class TaskFilterTest extends Base
{
+ public function testGetGanttbar()
+ {
+ $dp = new DateParser($this->container);
+ $p = new Project($this->container);
+ $tc = new TaskCreation($this->container);
+ $tf = new TaskFilter($this->container);
+
+ $this->assertEquals(1, $p->create(array('name' => 'test')));
+ $this->assertNotFalse($tc->create(array('project_id' => 1, 'title' => 'task1')));
+
+ $this->assertNotEmpty($tf->search('status:open')->toGanttBars());
+ $this->assertNotEmpty($p->getGanttBars(array(1)));
+ }
+
public function testIcalEventsWithCreatorAndDueDate()
{
$dp = new DateParser($this->container);