* Change the params that call the getPlans method.

This commit is contained in:
tianshujie
2023-09-04 15:00:32 +08:00
parent a103480ab6
commit 240ca63c58
6 changed files with 8 additions and 8 deletions
@@ -9,7 +9,7 @@ class product extends control
$this->loadModel('user');
$projectProducts = $this->loadModel('product')->getProducts($projectID);
$productPlans = $this->execution->getPlans($projectProducts);
$productPlans = $this->execution->getPlans(array_keys($projectProducts));
$this->products = array();
foreach($projectProducts as $productID => $product) $this->products[$productID] = $product->name;
+1 -1
View File
@@ -796,7 +796,7 @@ class execution extends control
$storyBugs = $this->loadModel('bug')->getStoryBugCounts($storyIdList, $executionID);
$storyCases = $this->loadModel('testcase')->getStoryCaseCounts($storyIdList);
$plans = $this->execution->getPlans($products, 'skipParent|withMainPlan|unexpired|noclosed|sortedByDate', $executionID);
$plans = $this->execution->getPlans(array_keys($products), 'skipParent|withMainPlan|unexpired|noclosed|sortedByDate', $executionID);
$allPlans = array();
if(!empty($plans))
{
+1 -1
View File
@@ -4957,7 +4957,7 @@ class executionModel extends model
* Get plan data from the ID list of the product.
*
* @param array $productID
* @param string $param withMainPlan|skipParent|unexpired|noclosed
* @param string $param withMainPlan|skipParent|unexpired|noclosed|sortedByDate
* @param int $executionID
* @return array
*/
+3 -3
View File
@@ -49,7 +49,7 @@ class executionZen extends execution
foreach($products as $product) $productNames[$product->id] = $product->name;
/* Get execution linked plans. */
$plans = $this->execution->getPlans($products, 'skipParent', $executionID);
$plans = $this->execution->getPlans(array_keys($products), 'skipParent', $executionID);
$allPlans = array();
if(!empty($plans))
{
@@ -149,7 +149,7 @@ class executionZen extends execution
if($products) $productID = key($products);
foreach($products as $product) $productNames[$product->id] = $product->name;
$plans = $this->execution->getPlans($products);
$plans = $this->execution->getPlans(array_keys($products));
$allPlans = array();
if(!empty($plans))
{
@@ -210,7 +210,7 @@ class executionZen extends execution
$this->view->userList = $userList;
$this->view->products = $products;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
$this->view->planGroups = $this->execution->getPlans($products);
$this->view->planGroups = $this->execution->getPlans(array_keys($products));
$this->view->actions = $this->loadModel('action')->getList('execution', $executionID);
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', 'all', $executionID);
$this->view->teamMembers = $this->execution->getTeamMembers($executionID);
+1 -1
View File
@@ -931,7 +931,7 @@ class productZen extends product
*/
protected function getProductPlans(array $projectProducts, int $projectID, string $storyType, bool $isProjectStory): array
{
if($isProjectStory && $storyType == 'story') return $this->loadModel('execution')->getPlans($projectProducts, 'skipParent,unexpired,noclosed', $projectID);
if($isProjectStory && $storyType == 'story') return $this->loadModel('execution')->getPlans(array_keys($projectProducts), 'skipParent,unexpired,noclosed', $projectID);
return array();
}
+1 -1
View File
@@ -594,7 +594,7 @@ class project extends control
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
$this->view->statData = $this->project->getStatData($projectID);
$this->view->workhour = $this->project->getWorkhour($projectID);
$this->view->planGroup = $this->loadModel('execution')->getPlans($products);
$this->view->planGroup = $this->loadModel('execution')->getPlans(array_keys($products));
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
$this->view->programList = $this->loadModel('program')->getPairsByList($project->path);