This commit is contained in:
Catouse
2017-05-02 15:25:01 +08:00
4 changed files with 26 additions and 5 deletions
+4 -1
View File
@@ -226,7 +226,10 @@ class baseHelper
$extModelClass = 'ext' . $modelClass;
$extTmpModelClass = 'tmpExt' . $modelClass;
$modelLines = "<?php\n";
$modelLines .= "helper::import('$mainModelFile');\n";
$modelLines .= "global \$app;\n";
$modelLines .= "helper::cd(\$app->getBasePath());\n";
$modelLines .= "helper::import('" . str_replace($app->getBasePath(), '.' . DS, $mainModelFile) . "');\n";
$modelLines .= "helper::cd();\n";
$modelLines .= "class $extTmpModelClass extends $modelClass \n{\n";
/* Cycle all the extension files. */
+19 -1
View File
@@ -71,7 +71,7 @@ EOT;
<td><?php echo html::radio('needReview', $lang->custom->reviewList, $needReview);?></td>
<td></td>
</tr>
<tr>
<tr <?php if($needReview and $module == 'testcase') echo "class='hidden'"?>>
<th><?php echo $lang->custom->forceReview;?></th>
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
<td class='w-180px'><?php printf($lang->custom->notice->forceReview, $lang->$module->common);?></td>
@@ -162,4 +162,22 @@ EOT;
</div>
</form>
</div>
<?php if($module == 'testcase' and $field == 'review'):?>
<script>
$(function()
{
$("input[name='needReview']").change(function()
{
if($(this).val() == 0)
{
$('#forceReview').closest('tr').removeClass('hidden');
}
else
{
$('#forceReview').closest('tr').addClass('hidden');
}
})
})
</script>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
+1
View File
@@ -1308,6 +1308,7 @@ class storyModel extends model
*/
public function getProductStoryPairs($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0)
{
if($branch) $branch = "0,$branch";//Fix bug 1059.
$stories = $this->dao->select('t1.id, t1.title, t1.module, t1.pri, t1.estimate, t2.name AS product')
->from(TABLE_STORY)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->where('1=1')
+2 -3
View File
@@ -1352,12 +1352,11 @@ class testcaseModel extends model
* Check whether force review
*
* @access public
* @return void
* @return bool
*/
public function forceReview()
{
if(!$this->config->testcase->needReview) return false;
if(empty($this->config->testcase->forceReview)) return true;
if($this->config->testcase->needReview) return true;
if(strpos(",{$this->config->testcase->forceReview},", ",{$this->app->user->account},") !== false) return true;
return false;
}