diff --git a/module/story/control.php b/module/story/control.php index d096b709f3..4c0e05cf2c 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -1118,9 +1118,14 @@ class story extends control if(empty($activeStories)) return $this->sendError($this->lang->story->noStoryToTask, $this->session->storyList . "#app={$this->app->tab}"); + $execution = $this->execution->fetchByID($executionID); + if($execution->multiple) $manageLink = common::hasPriv('execution', 'manageMembers') ? $this->createLink('execution', 'manageMembers', "execution={$execution->id}") : ''; + if(!$execution->multiple) $manageLink = common::hasPriv('project', 'manageMembers') ? $this->createLink('project', 'manageMembers', "projectID={$execution->project}") : ''; + $this->view->title = $this->lang->story->batchToTask; $this->view->executionID = $executionID; $this->view->projectID = $projectID; + $this->view->manageLink = $manageLink; $this->view->syncFields = empty($_POST['fields']) ? array() : $_POST['fields']; $this->view->hourPointValue = empty($_POST['hourPointValue']) ? 0 : $_POST['hourPointValue']; $this->view->taskType = empty($_POST['type']) ? '' : $_POST['type']; diff --git a/module/story/ui/batchtotask.html.php b/module/story/ui/batchtotask.html.php index e499e62b8c..005df6fc64 100644 --- a/module/story/ui/batchtotask.html.php +++ b/module/story/ui/batchtotask.html.php @@ -23,11 +23,11 @@ jsVar('copyStoryTitleTip', $lang->task->copyStoryTitle); $fields = array(); $fields['id'] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', 'width' => '32px'); -$fields['module'] = array_merge(array('name' => 'module', 'label' => $lang->task->module, 'width' => '200px', 'ditto' => true, 'defaultDitto' => 'off', 'items' => $modules, 'control' => 'picker'), $config->task->form->batchcreate['module']); -$fields['story'] = array_merge(array('name' => 'story', 'label' => $lang->task->story, 'width' => '250px', 'ditto' => true, 'defaultDitto' => 'off', 'items' => $storyPairs, 'control' => 'picker'), $config->task->form->batchcreate['story']); -$fields['name'] = array_merge(array('name' => 'name', 'label' => $lang->task->name, 'width' => '250px', 'ditto' => false, 'defaultDitto' => 'off', 'filter' => 'trim', 'control' => 'text'), $config->task->form->batchcreate['name']); -$fields['type'] = array_merge(array('name' => 'type', 'label' => $lang->typeAB, 'width' => '140px', 'ditto' => true, 'defaultDitto' => 'off', 'items' => $lang->task->typeList, 'control' => 'picker'), $config->task->form->batchcreate['type']); -$fields['assignedTo'] = array_merge(array('name' => 'assignedTo', 'label' => $lang->task->assignedTo, 'width' => '120px', 'ditto' => false, 'defaultDitto' => 'off', 'items' => $members, 'control' => 'picker'), $config->task->form->batchcreate['assignedTo']); +$fields['module'] = array_merge(array('name' => 'module', 'label' => $lang->task->module, 'width' => '200px', 'ditto' => true, 'defaultDitto' => 'off', 'items' => $modules, 'control' => 'picker'), $config->task->form->batchcreate['module']); +$fields['story'] = array_merge(array('name' => 'story', 'label' => $lang->task->story, 'width' => '250px', 'ditto' => true, 'defaultDitto' => 'off', 'items' => $storyPairs, 'control' => 'picker'), $config->task->form->batchcreate['story']); +$fields['name'] = array_merge(array('name' => 'name', 'label' => $lang->task->name, 'width' => '250px', 'ditto' => false, 'defaultDitto' => 'off', 'filter' => 'trim', 'control' => 'text'), $config->task->form->batchcreate['name']); +$fields['type'] = array_merge(array('name' => 'type', 'label' => $lang->typeAB, 'width' => '140px', 'ditto' => true, 'defaultDitto' => 'off', 'items' => $lang->task->typeList, 'control' => 'picker'), $config->task->form->batchcreate['type']); +$fields['assignedTo'] = array_merge(array('name' => 'assignedTo', 'label' => $lang->task->assignedTo, 'width' => '128px', 'ditto' => false, 'defaultDitto' => 'off', 'items' => $members, 'control' => array('control' => 'taskAssignedTo', 'manageLink' => ($manageLink ? $manageLink : ''))), $config->task->form->batchcreate['assignedTo']); $fields['estimate'] = array_merge(array('name' => 'estimate', 'label' => $lang->task->estimateAB, 'width' => '120px', 'ditto' => true, 'defaultDitto' => 'off', 'filter' => 'trim', 'control' => 'text'), $config->task->form->batchcreate['estimate']); $fields['estStarted'] = array_merge(array('name' => 'estStarted', 'label' => $lang->task->estStarted, 'width' => '120px', 'ditto' => true, 'defaultDitto' => 'on', 'filter' => 'trim', 'control' => 'date'), $config->task->form->batchcreate['estStarted']); $fields['deadline'] = array_merge(array('name' => 'deadline', 'label' => $lang->task->deadline, 'width' => '120px', 'ditto' => true, 'defaultDitto' => 'on', 'filter' => 'trim', 'control' => 'date'), $config->task->form->batchcreate['deadline']);