From 990cd0d32c8c57f5aa2cf8c14556be1ce2437283 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 26 Oct 2023 08:56:19 +0800 Subject: [PATCH] * Fix bug of custom cols in testcase. --- module/datatable/control.php | 1 + module/datatable/model.php | 1 + 2 files changed, 2 insertions(+) diff --git a/module/datatable/control.php b/module/datatable/control.php index 37e4eca6c8..edc76e61eb 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -90,6 +90,7 @@ class datatable extends control foreach($postFields as $index => $field) { $id = $field->id; + if($module == 'testcase' && $id == 'caseID') $id = 'id'; if(!isset($fieldList[$id])) continue; $fields[$id]['order'] = $field->order; diff --git a/module/datatable/model.php b/module/datatable/model.php index 22247a7abc..249788f208 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -122,6 +122,7 @@ class datatableModel extends model } if(!isset($set['name'])) $setting[$field]['name'] = $field; + if($module == 'testcase' && $field == 'id') $setting[$field]['name'] = 'caseID'; if($field == 'actions') $setting[$field]['width'] = $fieldList[$field]['width']; } }