* Finish task #44366.

This commit is contained in:
liyuchun
2021-11-17 10:44:15 +08:00
parent a5767ccc13
commit ee073e0530
7 changed files with 38 additions and 3 deletions
+1
View File
@@ -5,6 +5,7 @@ $config->story->batchCreate = 10;
$config->story->affectedFixedNum = 7;
$config->story->needReview = 1;
$config->story->removeFields = 'objectTypeList,productList,executionList,execution';
$config->story->feedbackSource = array('customer', 'user', 'market', 'service', 'operation', 'support', 'forum');
$config->story->batchClose = new stdclass();
$config->story->batchClose->columns = 10;
+13
View File
@@ -24,6 +24,19 @@ $(function()
var value = $select.val();
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
});
$('#source').on('change', function()
{
var source = $(this).val();
if($.inArray(source, feedbackSource) != -1)
{
$('#feedbackBox').removeClass('hidden');
}
else
{
$('#feedbackBox').addClass('hidden');
}
});
});
function refreshPlan()
+13
View File
@@ -19,4 +19,17 @@ $(function()
reviewers = $('#reviewer').val();
}
})
$('#source').on('change', function()
{
var source = $(this).val();
if($.inArray(source, feedbackSource) != -1)
{
$('.feedbackBox').removeClass('hidden');
}
else
{
$('.feedbackBox').addClass('hidden');
}
});
})
+4
View File
@@ -207,6 +207,8 @@ class storyModel extends model
->setIF($this->post->needNotReview, 'status', 'active')
->setIF($this->post->plan > 0, 'stage', 'planned')
->setIF($this->post->estimate, 'estimate', (float)$this->post->estimate)
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'feedbackBy', '')
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'notifyEmail', '')
->setIF($executionID > 0, 'stage', 'projected')
->setIF($bugID > 0, 'fromBug', $bugID)
->join('mailto', ',')
@@ -748,6 +750,8 @@ class storyModel extends model
->setIF($this->post->closedReason != false and $oldStory->closedDate == '', 'closedDate', $now)
->setIF($this->post->closedBy != false or $this->post->closedReason != false, 'status', 'closed')
->setIF($this->post->closedReason != false and $this->post->closedBy == false, 'closedBy', $this->app->user->account)
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'feedbackBy', '')
->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'notifyEmail', '')
->setIF(!empty($_POST['plan'][0]) and $oldStory->stage == 'wait', 'stage', 'planned')
->stripTags($this->config->story->editor->edit['id'], $this->config->allowedTags)
->join('reviewedBy', ',')
+2 -1
View File
@@ -17,6 +17,7 @@
</style>
<?php js::set('holders', $lang->story->placeholder); ?>
<?php js::set('blockID', $blockID); ?>
<?php js::set('feedbackSource', $config->story->feedbackSource); ?>
<?php if(common::checkNotCN()):?>
<style> .sourceTd > .input-group > .input-group > .input-group-addon:first-child{padding: 5px 18px} </style>
<?php endif;?>
@@ -131,7 +132,7 @@
</td>
<?php endif;?>
<?php else:?>
<td colspan="2">
<td colspan="2" id='feedbackBox' class='hidden'>
<div class="input-group">
<div class="input-group">
<div class="input-group-addon" style="min-width: 77px;"><?php echo $lang->story->feedbackBy;?></div>
+3 -2
View File
@@ -19,6 +19,7 @@
<?php js::set('storyModule', $lang->story->module);?>
<?php js::set('reviewers', explode(',', $reviewers));?>
<?php js::set('reviewerNotEmpty', $lang->story->notice->reviewerNotEmpty);?>
<?php js::set('feedbackSource', $config->story->feedbackSource); ?>
<div class='main-content' id='mainContent'>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<div class='main-header'>
@@ -182,11 +183,11 @@
<th><?php echo $lang->story->estimate;?></th>
<td><?php echo $story->parent >= 0 ? html::input('estimate', $story->estimate, "class='form-control'") : $story->estimate;?></td>
</tr>
<tr>
<tr class='feedbackBox <?php echo strpos(',customre,support,', $story->source) !== false ? '' : 'hidden';?>'>
<th><?php echo $lang->story->feedbackBy;?></th>
<td><?php echo html::input('feedbackBy', $story->feedbackBy, "class='form-control'");?></td>
</tr>
<tr>
<tr class='feedbackBox <?php echo strpos(',customre,support,', $story->source) !== false ? '' : 'hidden';?>'>
<th><?php echo $lang->story->notifyEmail;?></th>
<td><?php echo html::input('notifyEmail', $story->notifyEmail, "class='form-control'");?></td>
</tr>
+2
View File
@@ -348,6 +348,7 @@
<th><?php echo $lang->story->estimate;?></th>
<td title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
</tr>
<?php if(in_array($story->source, $config->story->feedbackSource)):?>
<tr>
<th><?php echo $lang->story->feedbackBy;?></th>
<td><?php echo $story->feedbackBy;?></td>
@@ -356,6 +357,7 @@
<th><?php echo $lang->story->notifyEmail;?></th>
<td><?php echo $story->notifyEmail;?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->keywords;?></th>
<td><?php echo $story->keywords;?></td>