diff --git a/module/task/config.php b/module/task/config.php index 44278bb619..55feaf539e 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -187,9 +187,9 @@ $config->task->actionList['assignTo']['url'] = helper::createLink('task' $config->task->actionList['assignTo']['data-toggle'] = 'modal'; $config->task->actionList['createBranch']['icon'] = 'treemap'; -$config->task->actionList['createBranch']['hint'] = $lang->task->createBranch; -$config->task->actionList['createBranch']['text'] = $lang->task->createBranch; -$config->task->actionList['createBranch']['url'] = helper::createLink('repo', 'createBranch', 'taskID={id}&execution={execution}'); +$config->task->actionList['createBranch']['hint'] = $lang->task->codeBranch; +$config->task->actionList['createBranch']['text'] = $lang->task->codeBranch; +$config->task->actionList['createBranch']['url'] = helper::createLink('repo', 'createBranch', 'objectID={id}&objectType=task'); $config->task->actionList['createBranch']['data-toggle'] = 'modal'; $config->task->actions = new stdclass(); diff --git a/module/task/control.php b/module/task/control.php index fa25f8f16c..553ca26ca6 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -375,7 +375,6 @@ class task extends control $task->storyTitle = !empty($story) ? $story->title : ''; } - $task->linkedBranch = $this->task->getLinkedBranch($taskID); if($task->team) $this->lang->task->assign = $this->lang->task->transfer; /* Execute workflow hooks if edition is not open. */ diff --git a/module/task/ui/view.html.php b/module/task/ui/view.html.php index 67f8817e9c..06da81438b 100644 --- a/module/task/ui/view.html.php +++ b/module/task/ui/view.html.php @@ -37,8 +37,8 @@ foreach($actions as $key => $action) { if(isset($action['url']) && strpos($action['url'], 'createBranch') !== false) { - $hasRepo = common::hasPriv('repo', 'createBranch') && empty($task->linkedBranch) && $this->loadModel('repo')->getRepoPairs('execution', $task->execution, false); - if(empty($hasRepo) || !common::hasPriv('repo', 'createBranch') || !empty($task->linkedBranch) || !common::canModify('execution', $execution)) unset($actions[$key]); + $hasRepo = common::hasPriv('repo', 'createBranch') && $this->loadModel('repo')->getRepoPairs('execution', $task->execution, false); + if(empty($hasRepo) || !common::hasPriv('repo', 'createBranch') || !common::canModify('execution', $execution)) unset($actions[$key]); } if(isset($action['url']) && strpos($action['url'], 'view') !== false && $task->parent == 0) unset($actions[$key]); if(isset($actions[$key]['url']))