* Code for port.

This commit is contained in:
tanghucheng
2022-08-12 17:27:58 +08:00
parent 9e8fddafa6
commit e91597d3e0
2 changed files with 17 additions and 3 deletions
+3 -3
View File
@@ -100,7 +100,7 @@ $config->story->datatable->fieldList['branch']['dataSource'] = array('module' =>
$config->story->datatable->fieldList['module']['title'] = 'module';
$config->story->datatable->fieldList['module']['control'] = 'select';
$config->story->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getAllModulePairs', 'params' => 'story');
$config->story->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&story&0&all');
$config->story->datatable->fieldList['keywords']['title'] = 'keywords';
$config->story->datatable->fieldList['keywords']['fixed'] = 'no';
@@ -112,7 +112,7 @@ $config->story->datatable->fieldList['plan']['fixed'] = 'no';
$config->story->datatable->fieldList['plan']['width'] = '90';
$config->story->datatable->fieldList['plan']['required'] = 'no';
$config->story->datatable->fieldList['plan']['control'] = 'select';
$config->story->datatable->fieldList['plan']['dataSource'] = array('module' => 'story', 'method' => 'getRelatedObjects', 'params' => 'plan&id,title');
$config->story->datatable->fieldList['plan']['dataSource'] = array('module' => 'productplan', 'method' => 'getPairs', 'params' => '$productID');
$config->story->datatable->fieldList['source']['title'] = 'source';
$config->story->datatable->fieldList['source']['fixed'] = 'no';
@@ -169,7 +169,7 @@ $config->story->datatable->fieldList['reviewedBy']['fixed'] = 'no';
$config->story->datatable->fieldList['reviewedBy']['width'] = '80';
$config->story->datatable->fieldList['reviewedBy']['required'] = 'no';
$config->story->datatable->fieldList['reviewedBy']['control'] = 'multiple';
$config->story->datatable->fieldList['reviewedBy']['dataSource'] = array('module' => 'user', 'method' => 'getPairs', 'params' => 'devfirst|noclosed|nodeleted');
$config->story->datatable->fieldList['reviewedBy']['dataSource'] = array('module' => 'story', 'method' => 'getStoriesReviewer', 'params' => '$productID');
$config->story->datatable->fieldList['reviewedDate']['title'] = 'reviewedDate';
$config->story->datatable->fieldList['reviewedDate']['fixed'] = 'no';
+14
View File
@@ -5730,4 +5730,18 @@ class storyModel extends model
return $stories;
}
/**
* Get reviewer pairs for story .
*
* @param int $productID
* @access public
* @return void
*/
public function getStoriesReviewer($productID = 0)
{
$product = $this->loadModel('product')->getByID($productID);
$reviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
return $this->user->getPairs('noclosed|nodeleted', '', 0, $reviewers);
}
}