diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-04 20:14:26 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-04 20:14:26 -0700 |
commit | 954bed954f6c81cbcdb217966dcc9e008e7dd149 (patch) | |
tree | 3a3b54ed309a151476f2a0e77bbf35baaa078765 /scripts | |
parent | 749136361e6eedbc868778db17bdc67aa0f3b677 (diff) |
Task move position refactoring
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-random-tasks.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/create-random-tasks.php b/scripts/create-random-tasks.php new file mode 100755 index 00000000..4d665178 --- /dev/null +++ b/scripts/create-random-tasks.php @@ -0,0 +1,26 @@ +#!/usr/bin/env php +<?php + +require __DIR__.'/../app/common.php'; + +use Model\Task; + +$task_per_column = 250; +$taskModel = new Task($registry); + +foreach (array(1, 2, 3, 4) as $column_id) { + + for ($i = 1; $i <= $task_per_column; $i++) { + + $task = array( + 'title' => 'Task #'.$i.'-'.$column_id, + 'project_id' => 1, + 'column_id' => $column_id, + 'owner_id' => rand(0, 1), + 'color_id' => rand(0, 1) === 0 ? 'green' : 'purple', + 'score' => rand(0, 21), + ); + + $taskModel->create($task); + } +} |