Merge branch 'master_xieqiyu_fixbug' into 'master'

* Fix bug of batch create story in kanban with upload images.

See merge request easycorp/zentaopms!3231
This commit is contained in:
孙广明
2022-05-05 07:41:08 +00:00
3 changed files with 6 additions and 4 deletions
+1
View File
@@ -179,6 +179,7 @@ class build extends control
{
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
if(!isset($branchTagOption[$build->branch])) $branchTagOption[$build->branch] = $this->branch->getById($build->branch, 0, 'name');
foreach($productGroups as $product) $products[$product->id] = $product->name;
+1
View File
@@ -602,6 +602,7 @@ class story extends control
$this->view->branches = $branches;
/* When the user is product owner or add story in project or not set review, the default is not to review. */
$this->view->needReview = ($this->app->user->account == $product->PO || $executionID > 0 || $this->config->story->needReview == 0) ? 0 : 1;
$this->view->executionID = $executionID;
$this->display();
}
+4 -4
View File
@@ -15,7 +15,7 @@
<div class="main-header">
<h2><?php echo $storyID ? $storyTitle . ' - ' . $this->lang->story->subdivide : $this->lang->story->batchCreate;?></h2>
<div class="pull-right btn-toolbar">
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=story&params=' . helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=$storyID&executionID=&plan=&type=$type")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?>
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=story&params=' . helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=$storyID&executionID=$executionID&plan=&type=$type")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?>
<button type='button' data-toggle='modal' data-target="#importLinesModal" class="btn btn-primary"><?php echo $lang->pasteText;?></button>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=story&section=custom&key=batchCreateFields')?>
<?php include '../../common/view/customfield.html.php';?>
@@ -66,7 +66,7 @@
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->story->keywords;?></th>
<?php
$extendFields = $this->story->getFlowExtendFields();
foreach($extendFields as $extendField)
foreach($extendFields as $extendField)
{
$required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : '';
echo "<th class='c-extend $required'>{$extendField->name}</th>";
@@ -114,9 +114,9 @@
</div>
</td>
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input('keywords[$id]', '', "class='form-control'");?></td>
<?php
<?php
$this->loadModel('flow');
foreach($extendFields as $extendField)
foreach($extendFields as $extendField)
{
$object = new stdclass();
$object->{$extendField->field} = $extendField->default;