From 89f9f14515c798263850f6617f0b423a50224724 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Thu, 16 Oct 2025 11:44:41 +0800 Subject: [PATCH 1/3] * [bug#62443,done,0.3h,0h] Fix search dept users erorr. --- module/dept/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/dept/model.php b/module/dept/model.php index 7d39627ec8..167a719e2f 100644 --- a/module/dept/model.php +++ b/module/dept/model.php @@ -366,7 +366,7 @@ class deptModel extends model return $this->dao->select("$keyField, realname")->from(TABLE_USER) ->where('1=1') - ->beginIF(strpos($params, 'queryAll') === false)->andWhere('deleted')->eq(0)->fi() + ->beginIF(strpos($params, 'queryAll') === false && empty($this->config->user->showDeleted))->andWhere('deleted')->eq(0)->fi() ->beginIF(strpos($params, 'all') === false)->andWhere('type')->eq($type)->fi() ->beginIF($childDepts)->andWhere('dept')->in($childDepts)->fi() ->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi() From 109417ffc2e8b6b35e88a2086de5dad584eb1f3c Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 17 Oct 2025 09:00:00 +0800 Subject: [PATCH 2/3] * [bug#66065,done,0.5h,0h] Fix code error. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index dfe782207c..12c76ec69c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1582,7 +1582,7 @@ class storyModel extends model $isChanged = !empty($oldStory->changedBy) ? true : false; if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft'; - $actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst(zget($this->post, 'closedReason', '')) . (zget($this->post, 'duplicateStory', '') ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus"); + $actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst(zget($_POST, 'closedReason', '')) . (!empty($_POST['duplicateStory']) ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus"); $this->action->logHistory($actionID, $changes); } From 217bcfb0a2ab8c1328e1837f4f9d741035eaea65 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 17 Oct 2025 09:01:23 +0800 Subject: [PATCH 3/3] * Optimize getdeptuserpairs unit test script. --- module/dept/test/model/getdeptuserpairs.php | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/module/dept/test/model/getdeptuserpairs.php b/module/dept/test/model/getdeptuserpairs.php index 4f760b8ffd..453ca2fee1 100755 --- a/module/dept/test/model/getdeptuserpairs.php +++ b/module/dept/test/model/getdeptuserpairs.php @@ -4,25 +4,25 @@ include dirname(__FILE__, 5) . '/test/lib/init.php'; include dirname(__FILE__, 2) . '/lib/dept.unittest.class.php'; su('admin'); -zenData('dept')->gen(30); +zenData('dept')->gen(30); zenData('user')->loadYaml('user')->gen(200); /** title=测试 deptModel->getDeptUserPairs(); +timeout=0 cid=1 -pid=1 -查询所有内部用户 >> 用户49 -查询所有外部用户 >> 测试1 -根据部门查询用户 >> 用户10 -键值为account查询 >> 用户40 -键值为out查询 >> 用户10 -type为out查询 >> 用户10 -查询所有内部用户统计 >> 100 -查询所有外部用户统计 >> 100 -根据部门查询用户统计 >> 10 -查询全部用户统计 >> 200 +- 查询所有内部用户属性50 @用户49 +- 查询所有外部用户属性101 @测试1 +- 根据部门查询用户属性11 @用户10 +- 键值为account查询属性user40 @用户40 +- 键值为out查询属性user10 @用户10 +- type为out查询属性user10 @用户10 +- 查询所有内部用户统计 @100 +- 查询所有外部用户统计 @100 +- 根据部门查询用户统计 @10 +- 查询全部用户统计 @200 */