From 61c488e538c3247580ef2b60277888b5bdc759fc Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 31 Oct 2023 13:29:24 +0800 Subject: [PATCH] + Add table sort for testtask::cases. --- module/testtask/control.php | 1 + module/testtask/ui/cases.html.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/module/testtask/control.php b/module/testtask/control.php index b2111877fa..74754c193c 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -374,6 +374,7 @@ class testtask extends control $queryID = ($browseType == 'bysearch' or $browseType == 'bysuite') ? $param : 0; $moduleID = ($browseType == 'bymodule') ? $param : ($browseType == 'bysearch' ? 0 : ($this->cookie->taskCaseModule ?: 0)); $sort = common::appendOrder($orderBy, 't2.id'); + $sort = str_replace('case_', 'id_', $sort); /* 从数据库中查询一个测试单下关联的测试用例。*/ /* Query the cases associated with a testtask from the database. */ diff --git a/module/testtask/ui/cases.html.php b/module/testtask/ui/cases.html.php index ae4a2ef217..0dc4bb42de 100644 --- a/module/testtask/ui/cases.html.php +++ b/module/testtask/ui/cases.html.php @@ -154,6 +154,8 @@ dtable set::userMap($users), set::cols($cols), set::data($runs), + set::orderBy($orderBy), + set::sortLink(createLink('testtask', 'cases', "taskID={$task->id}&browseType={$browseType}¶m={$param}&order={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")), set::checkable($canBatchAction), set::fixedLeftWidth('44%'), set::footToolbar($footToolbar),