From cbbefc837cb0381efaa62d3b3b85e6d7bf8307bb Mon Sep 17 00:00:00 2001 From: wangyuting Date: Wed, 27 Mar 2024 15:57:18 +0800 Subject: [PATCH] * Fix unit test bug. --- module/bi/model.php | 4 ++++ module/my/test/model/getassignedbyme.php | 1 + module/pivot/model.php | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/bi/model.php b/module/bi/model.php index 013be84821..7a4556d30c 100644 --- a/module/bi/model.php +++ b/module/bi/model.php @@ -29,6 +29,10 @@ class biModel extends model case 'dept': $options = $this->loadModel('dept')->getOptionMenu(0); break; + case 'project.status': + $this->app->loadLang('project'); + $options = $this->lang->project->statusList; + break; } return $options; diff --git a/module/my/test/model/getassignedbyme.php b/module/my/test/model/getassignedbyme.php index 51dd17a51f..0bc2614d7e 100755 --- a/module/my/test/model/getassignedbyme.php +++ b/module/my/test/model/getassignedbyme.php @@ -10,6 +10,7 @@ zdTable('task')->gen('10'); zdTable('story')->gen('10'); zdTable('user')->gen('1'); zdTable('project')->gen('0'); +zdTable('product')->gen('10'); su('admin'); diff --git a/module/pivot/model.php b/module/pivot/model.php index a757ceae0c..76d24b0fbb 100644 --- a/module/pivot/model.php +++ b/module/pivot/model.php @@ -2124,7 +2124,7 @@ class pivotModel extends model */ public function getSysOptions($type, $object = '', $field = '', $source = '', $saveAs = '') { - if(in_array($type, array('user', 'product', 'project', 'execution', 'dept'))) return $this->bi->getScopeOptions($type); + if(in_array($type, array('user', 'product', 'project', 'execution', 'dept', 'project.status'))) return $this->bi->getScopeOptions($type); if(!$field) return array(); $options = array();