Merge branch 'master_xieqiyu_79668' into 'master'

Master xieqiyu 79668

See merge request easycorp/zentaopms!6544
This commit is contained in:
孙广明
2022-12-14 06:14:49 +00:00
7 changed files with 43 additions and 16 deletions
+4 -1
View File
@@ -2,6 +2,9 @@
#affectedProjects .table + h6 {border-top: 1px solid #ddd;}
.nav-tabs>li>a {height: 36px;}
.table-form>tbody>tr>th {width: 100px !important;}
.colorpicker {right: 7px; top: 7px; opacity: 1;}
.colorpicker {right: -1px; top: 7px; opacity: 1;}
#twinsList td, #twinsTitle td {padding-left: 65px;}
#twinsTitle td {font-weight: 700;}
.title-group.required:after {display: none;}
.title-group.required > .required:after {display: block; right: 32px; top: 5px;}
+2 -1
View File
@@ -525,4 +525,5 @@ $lang->story->deleteBranch = 'Delete %s';
$lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
$lang->story->relievedTwinsRelation = 'Relieved twins relationship';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
$lang->story->changeRelievedTwinsTips = 'After the twins relationship is terminated, the twin stories are no longer synchronized.';
+2 -1
View File
@@ -525,4 +525,5 @@ $lang->story->deleteBranch = 'Delete %s';
$lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
$lang->story->relievedTwinsRelation = 'Relieved twins relationship';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
$lang->story->changeRelievedTwinsTips = 'After the twins relationship is terminated, the twin stories are no longer synchronized.';
+2 -1
View File
@@ -525,4 +525,5 @@ $lang->story->deleteBranch = 'Delete %s';
$lang->story->notice->branch = 'Each branch will establish a requirement. The requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
$lang->story->relievedTwinsRelation = 'Relieved twins relationship';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
$lang->story->relievedTwinsRelationTips = 'After the twins relationship is terminated, it cannot be restored and the shutdown of the requirement is no longer synchronized.';
$lang->story->changeRelievedTwinsTips = 'After the twins relationship is terminated, the twin stories are no longer synchronized.';
+2 -1
View File
@@ -525,4 +525,5 @@ $lang->story->deleteBranch = '删除%s';
$lang->story->notice->branch = '每个分支会建立一个需求,需求间互为孪生关系。孪生需求间除产品、分支、模块、计划、阶段字段外均保持同步,后期您可以手动解除孪生关系。';
$lang->story->relievedTwinsRelation = '解除孪生关系';
$lang->story->relievedTwinsRelationTips = '孪生关系解除后无法恢复,需求的关闭将不再同步。';
$lang->story->relievedTwinsRelationTips = '孪生关系解除后无法恢复,需求的关闭将不再同步。';
$lang->story->changeRelievedTwinsTips = '孪生关系解除后无法恢复,孪生需求间内容不再同步。';
+14 -4
View File
@@ -778,7 +778,7 @@ class storyModel extends model
->get();
$story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->change['id'], $this->post->uid);
$this->dao->update(TABLE_STORY)->data($story, 'spec,verify,deleteFiles')
$this->dao->update(TABLE_STORY)->data($story, 'spec,verify,deleteFiles,relievedTwins')
->autoCheck()
->batchCheck($this->config->story->change->requiredFields, 'notempty')
->checkFlow()
@@ -804,7 +804,7 @@ class storyModel extends model
$this->dao->insert(TABLE_STORYSPEC)->data($data)->exec();
/* Sync twins. */
if(!empty($oldStory->twins))
if(!isset($story->relievedTwins) and !empty($oldStory->twins))
{
foreach(explode(',', trim($oldStory->twins, ',')) as $twinID)
{
@@ -843,7 +843,7 @@ class storyModel extends model
$this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
/* Sync twins. */
if(!empty($oldStory->twins))
if(!isset($story->relievedTwins) and !empty($oldStory->twins))
{
foreach(explode(',', trim($oldStory->twins, ',')) as $twinID)
{
@@ -861,7 +861,17 @@ class storyModel extends model
}
$changes = common::createChanges($oldStory, $story);
if(!empty($oldStory->twins)) $this->syncTwins($oldStory->id, $oldStory->twins, $changes, 'Changed');
if(isset($story->relievedTwins))
{
$this->dbh->exec("UPDATE " . TABLE_STORY . " SET twins = REPLACE(twins, ',$storyID,', ',') WHERE `product` = $oldStory->product");
$this->dao->update(TABLE_STORY)->set('twins')->eq('')->where('id')->eq($storyID)->orWhere('twins')->eq(',')->exec();
}
elseif(!empty($oldStory->twins))
{
$this->syncTwins($oldStory->id, $oldStory->twins, $changes, 'Changed');
}
return $changes;
}
}
+17 -7
View File
@@ -44,14 +44,24 @@
<tr>
<th><?php echo $lang->story->title;?></th>
<td>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->story->colorTag; ?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $story->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".story-title" data-provide="colorpicker">
<?php $titleGroup = empty($story->twins) ? '' : 'title-group';?>
<div class='input-group <?php echo $titleGroup?>'>
<div class="input-control has-icon-right">
<?php echo html::input('title', $story->title, 'class="form-control story-title"');?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" title="<?php echo $lang->task->colorTag ?>"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->story->colorTag; ?><i class="icon icon-close"></i></li>
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="<?php echo $story->color ?>" data-icon="color" data-wrapper="input-control-icon-right" data-update-color=".story-title" data-provide="colorpicker">
</div>
</div>
<?php if(!empty($story->twins)):?>
<div class="input-group-addon">
<?php echo html::checkbox('relievedTwins', $lang->story->relievedTwinsRelation, '', "id='relievedTwins' title='{$lang->story->changeRelievedTwinsTips}'");?>
</div>
<?php endif;?>
</div>
<?php echo html::input('title', $story->title, 'class="form-control story-title"');?>
</td>
</tr>
<tr>