Add settings to disable subtask timer and another to not include closed tasks into CFD
This commit is contained in:
@@ -42,7 +42,7 @@ class Config extends Base
|
|||||||
|
|
||||||
switch ($redirect) {
|
switch ($redirect) {
|
||||||
case 'project':
|
case 'project':
|
||||||
$values += array('subtask_restriction' => 0);
|
$values += array('subtask_restriction' => 0, 'subtask_time_tracking' => 0, 'cfd_include_closed_tasks' => 0);
|
||||||
break;
|
break;
|
||||||
case 'integrations':
|
case 'integrations':
|
||||||
$values += array('integration_slack_webhook' => 0, 'integration_hipchat' => 0, 'integration_gravatar' => 0, 'integration_jabber' => 0);
|
$values += array('integration_slack_webhook' => 0, 'integration_hipchat' => 0, 'integration_gravatar' => 0, 'integration_jabber' => 0);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -982,7 +982,7 @@ return array(
|
|||||||
'Help on Google authentication' => 'Aide sur l\'authentification Google',
|
'Help on Google authentication' => 'Aide sur l\'authentification Google',
|
||||||
'Github Authentication' => 'Authentification Github',
|
'Github Authentication' => 'Authentification Github',
|
||||||
'Help on Github authentication' => 'Aide sur l\'authentification Github',
|
'Help on Github authentication' => 'Aide sur l\'authentification Github',
|
||||||
'Channel/Group/User (Optional)' => 'Cannal/Groupe/Utilisateur (Optionnel)',
|
'Channel/Group/User (Optional)' => 'Canal/Groupe/Utilisateur (Optionnel)',
|
||||||
'Lead time: ' => 'Lead time : ',
|
'Lead time: ' => 'Lead time : ',
|
||||||
'Cycle time: ' => 'Temps de cycle : ',
|
'Cycle time: ' => 'Temps de cycle : ',
|
||||||
'Time spent into each column' => 'Temps passé dans chaque colonne',
|
'Time spent into each column' => 'Temps passé dans chaque colonne',
|
||||||
@@ -1005,4 +1005,12 @@ return array(
|
|||||||
'Expand sidebar' => 'Déplier la barre latérale',
|
'Expand sidebar' => 'Déplier la barre latérale',
|
||||||
'This feature does not work with all browsers.' => 'Cette fonctionnalité n\'est pas compatible avec tous les navigateurs',
|
'This feature does not work with all browsers.' => 'Cette fonctionnalité n\'est pas compatible avec tous les navigateurs',
|
||||||
'There is no destination project available.' => 'Il n\'y a pas de projet de destination disponible.',
|
'There is no destination project available.' => 'Il n\'y a pas de projet de destination disponible.',
|
||||||
|
'Trigger automatically subtask time tracking' => 'Déclencher automatiquement le suivi du temps pour les sous-tâches',
|
||||||
|
'Include closed tasks in the cumulative flow diagram' => 'Inclure les tâches fermées dans le diagramme de flux cumulé',
|
||||||
|
'Current swimlane: %s' => 'Swimlane actuelle : %s',
|
||||||
|
'Current column: %s' => 'Colonne actuelle : %s',
|
||||||
|
'Current category: %s' => 'Catégorie actuelle : %s',
|
||||||
|
'no category' => 'aucune catégorie',
|
||||||
|
'Current assignee: %s' => 'Assigné actuel : %s',
|
||||||
|
'not assigned' => 'non assigné',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1003,4 +1003,12 @@ return array(
|
|||||||
// 'Expand sidebar' => '',
|
// 'Expand sidebar' => '',
|
||||||
// 'This feature does not work with all browsers.' => '',
|
// 'This feature does not work with all browsers.' => '',
|
||||||
// 'There is no destination project available.' => '',
|
// 'There is no destination project available.' => '',
|
||||||
|
// 'Trigger automatically subtask time tracking' => '',
|
||||||
|
// 'Include closed tasks in the cumulative flow diagram' => '',
|
||||||
|
// 'Current swimlane: %s' => '',
|
||||||
|
// 'Current column: %s' => '',
|
||||||
|
// 'Current category: %s' => '',
|
||||||
|
// 'no category' => '',
|
||||||
|
// 'Current assignee: %s' => '',
|
||||||
|
// 'not assigned' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class ProjectDailyColumnStats extends Base
|
|||||||
{
|
{
|
||||||
return $this->db->transaction(function($db) use ($project_id, $date) {
|
return $this->db->transaction(function($db) use ($project_id, $date) {
|
||||||
|
|
||||||
|
$status = $this->config->get('cfd_include_closed_tasks') == 1 ? array(Task::STATUS_OPEN, Task::STATUS_CLOSED) : array(Task::STATUS_OPEN);
|
||||||
|
|
||||||
$column_ids = $db->table(Board::TABLE)->eq('project_id', $project_id)->findAllByColumn('id');
|
$column_ids = $db->table(Board::TABLE)->eq('project_id', $project_id)->findAllByColumn('id');
|
||||||
|
|
||||||
foreach ($column_ids as $column_id) {
|
foreach ($column_ids as $column_id) {
|
||||||
@@ -59,6 +61,7 @@ class ProjectDailyColumnStats extends Base
|
|||||||
'total' => $db->table(Task::TABLE)
|
'total' => $db->table(Task::TABLE)
|
||||||
->eq('project_id', $project_id)
|
->eq('project_id', $project_id)
|
||||||
->eq('column_id', $column_id)
|
->eq('column_id', $column_id)
|
||||||
|
->in('is_active', $status)
|
||||||
->count()
|
->count()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,13 @@ use PDO;
|
|||||||
use Core\Security;
|
use Core\Security;
|
||||||
use Model\Link;
|
use Model\Link;
|
||||||
|
|
||||||
const VERSION = 80;
|
const VERSION = 81;
|
||||||
|
|
||||||
|
function version_81($pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec("INSERT INTO settings VALUES ('subtask_time_tracking', '1')");
|
||||||
|
$pdo->exec("INSERT INTO settings VALUES ('cfd_include_closed_tasks', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
function version_80($pdo)
|
function version_80($pdo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,13 @@ use PDO;
|
|||||||
use Core\Security;
|
use Core\Security;
|
||||||
use Model\Link;
|
use Model\Link;
|
||||||
|
|
||||||
const VERSION = 60;
|
const VERSION = 61;
|
||||||
|
|
||||||
|
function version_61($pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec("INSERT INTO settings VALUES ('subtask_time_tracking', '1')");
|
||||||
|
$pdo->exec("INSERT INTO settings VALUES ('cfd_include_closed_tasks', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
function version_60($pdo)
|
function version_60($pdo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,13 @@ use Core\Security;
|
|||||||
use PDO;
|
use PDO;
|
||||||
use Model\Link;
|
use Model\Link;
|
||||||
|
|
||||||
const VERSION = 76;
|
const VERSION = 77;
|
||||||
|
|
||||||
|
function version_77($pdo)
|
||||||
|
{
|
||||||
|
$pdo->exec("INSERT INTO settings VALUES ('subtask_time_tracking', '1')");
|
||||||
|
$pdo->exec("INSERT INTO settings VALUES ('cfd_include_closed_tasks', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
function version_76($pdo)
|
function version_76($pdo)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class SubtaskTimeTrackingSubscriber extends \Core\Base implements EventSubscribe
|
|||||||
|
|
||||||
public function logStartEnd(SubtaskEvent $event)
|
public function logStartEnd(SubtaskEvent $event)
|
||||||
{
|
{
|
||||||
if (isset($event['status'])) {
|
if (isset($event['status']) && $this->config->get('subtask_time_tracking') == 1) {
|
||||||
|
|
||||||
$subtask = $this->subtask->getById($event['id']);
|
$subtask = $this->subtask->getById($event['id']);
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
<p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p>
|
<p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p>
|
||||||
|
|
||||||
<?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
|
<?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
|
||||||
|
<?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?>
|
||||||
|
<?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user