This commit is contained in:
hufangzhou
2024-05-29 09:50:05 +08:00
committed by caoyanyi
parent ed69231369
commit a2371bf82f
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ $config->story->form->batchCreate['keywords'] = array('ditto' => false, 'type'
$config->story->form->batchCreate['mailto'] = array('ditto' => false, 'type' => 'array', 'control' => 'select', 'required' => false, 'width' => '200px', 'default' => array(''), 'multiple' => true, 'options' => 'users', 'filter' => 'join');
$config->story->form->batchEdit = array();
$config->story->form->batchEdit['branch'] = array('type' => 'int', 'width' => '200px', 'control' => 'picker', 'required' => false, 'default' => 0, 'options' => array());
$config->story->form->batchEdit['branch'] = array('type' => 'string', 'width' => '200px', 'control' => 'picker', 'required' => false, 'default' => '', 'options' => array());
$config->story->form->batchEdit['module'] = array('type' => 'int', 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'default' => 0, 'options' => array());
$config->story->form->batchEdit['plan'] = array('type' => 'int', 'width' => '200px', 'control' => 'picker', 'required' => false, 'default' => 0, 'options' => array());
$config->story->form->batchEdit['title'] = array('type' => 'string', 'width' => '240px', 'control' => array('control' => 'colorInput', 'inputClass' => 'filter-none'), 'required' => true, 'filter' => 'trim', 'base' => true);
+2
View File
@@ -366,6 +366,8 @@ class story extends control
$this->storyZen->setFormOptionsForBatchEdit($productID, $executionID, $stories);
foreach($stories as $story) $story->branch = 'branch' . $story->branch;
$this->view->title = $this->lang->story->batchEdit;
$this->view->productID = $productID;
$this->view->branch = $branch;
+3 -2
View File
@@ -842,7 +842,7 @@ class storyZen extends story
{
$options = $this->getFormOptionsForSingleProduct($storyProduct->id, $executionID, $storyProduct);
if($options['branchProduct'] && !$branchProduct) $branchProduct = true;
if($options['branchProduct']) $branchTagOption[$storyProduct->id] = array(BRANCH_MAIN => $this->lang->branch->main) + $options['branchTagOption'][$storyProduct->id];
if($options['branchProduct']) $branchTagOption[$storyProduct->id] = $options['branchTagOption'][$storyProduct->id];
$modules += $options['modules'];
$plans += $options['plans'];
if(empty($plans[$storyProduct->id])) $plans[$storyProduct->id][0] = $plans[$storyProduct->id];
@@ -908,7 +908,7 @@ class storyZen extends story
if($branchProduct)
{
$branches = $this->branch->getList($productID, $executionID, 'all');
foreach($branches as $branchInfo) $branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
foreach($branches as $branchInfo) $branchTagOption['branch' . $branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
$branches = array_keys($branches);
}
@@ -1505,6 +1505,7 @@ class storyZen extends story
$story->lastEditedBy = $this->app->user->account;
$story->lastEditedDate = $now;
$story->stage = empty($story->stage) ? $oldStory->stage : $story->stage;
$story->branch = !isset($story->branch) ? $oldStory->branch : str_replace('branch', '', $story->branch);
if($oldStory->assignedTo != $story->assignedTo) $story->assignedDate = $now;
if($oldStory->parent < 0) $story->plan = '';