Improve SQL migrations when old default swimlanes have the same name as a normal swimlanes
This commit is contained in:
@@ -9,6 +9,10 @@ New features:
|
|||||||
* Add configurable list of predefined subjects when sending a task or a a comment by email
|
* Add configurable list of predefined subjects when sending a task or a a comment by email
|
||||||
* Add command line argument to filter overdue notification for a given project
|
* Add command line argument to filter overdue notification for a given project
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
|
||||||
|
* Improve SQL migrations when old default swimlanes have the same name as a normal swimlanes
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
* Add missing subtask permissions for project viewer role
|
* Add missing subtask permissions for project viewer role
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ function migrate_default_swimlane(PDO $pdo)
|
|||||||
$project['default_swimlane'] = 'Default swimlane';
|
$project['default_swimlane'] = 'Default swimlane';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rq = $pdo->prepare('SELECT 1 FROM swimlanes WHERE name=? AND project_id=?');
|
||||||
|
$rq->execute(array($project['default_swimlane'], $project['id']));
|
||||||
|
|
||||||
|
if ($rq->fetchColumn()) {
|
||||||
|
$project['default_swimlane'] = $project['default_swimlane'].' (Default swimlane)';
|
||||||
|
}
|
||||||
|
|
||||||
// Create new default swimlane
|
// Create new default swimlane
|
||||||
$rq = $pdo->prepare('INSERT INTO swimlanes (project_id, name, is_active, position) VALUES (?, ?, ?, ?)');
|
$rq = $pdo->prepare('INSERT INTO swimlanes (project_id, name, is_active, position) VALUES (?, ?, ?, ?)');
|
||||||
$rq->execute(array(
|
$rq->execute(array(
|
||||||
|
|||||||
Reference in New Issue
Block a user