From 96fd75142feaa5a49d576a1ae229c5cefa9d5c63 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Tue, 14 Sep 2021 11:20:00 +0800 Subject: [PATCH 1/3] * Code for task #41764. --- module/execution/css/grouptask.css | 2 ++ module/execution/css/team.css | 1 + module/execution/view/grouptask.html.php | 14 +++++++------- module/execution/view/team.html.php | 4 ++-- module/personnel/css/accessible.css | 4 ++++ module/personnel/css/invest.css | 1 + module/personnel/css/whitelist.css | 2 ++ module/personnel/view/accessible.html.php | 12 ++++++------ module/personnel/view/invest.html.php | 2 +- module/personnel/view/whitelist.html.php | 12 ++++++------ module/repo/css/browse.css | 7 +++++++ module/repo/view/ajaxsidecommits.html.php | 10 +++++----- module/repo/view/browse.html.php | 10 +++++----- module/stakeholder/css/browse.css | 2 ++ module/stakeholder/view/browse.html.php | 12 ++++++------ www/theme/default/style.css | 1 + 16 files changed, 58 insertions(+), 38 deletions(-) create mode 100644 module/personnel/css/accessible.css create mode 100644 module/personnel/css/invest.css diff --git a/module/execution/css/grouptask.css b/module/execution/css/grouptask.css index c886b84612..2e54857cc4 100644 --- a/module/execution/css/grouptask.css +++ b/module/execution/css/grouptask.css @@ -25,3 +25,5 @@ .is-firefox .group-header > a, .is-firefox .group-header > .groupSummary {position: relative; z-index: 1;} .c-hours {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;} +.c-user, .c-type {width: 70px;} +.c-progress {width: 60px;} diff --git a/module/execution/css/team.css b/module/execution/css/team.css index d5928797b5..97a46daf2a 100644 --- a/module/execution/css/team.css +++ b/module/execution/css/team.css @@ -1 +1,2 @@ #memberList tbody td {text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.c-limited {width: 100px;} diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php index ca422382b0..f7b02eba8b 100644 --- a/module/execution/view/grouptask.html.php +++ b/module/execution/view/grouptask.html.php @@ -112,15 +112,15 @@ task->id;?> - priAB;?> + priAB;?> task->name;?> task->status;?> - task->assignedTo;?> - task->finishedBy;?> - task->estimateAB;?> - task->consumedAB;?> - task->leftAB;?> - task->progressAB;?> + task->assignedTo;?> + task->finishedBy;?> + task->estimateAB;?> + task->consumedAB;?> + task->leftAB;?> + task->progressAB;?> typeAB;?> task->deadlineAB;?> actions;?> diff --git a/module/execution/view/team.html.php b/module/execution/view/team.html.php index 9d220883eb..8453200b57 100644 --- a/module/execution/view/team.html.php +++ b/module/execution/view/team.html.php @@ -55,9 +55,9 @@ team->days;?> team->hours;?> team->totalHours;?> - team->limited;?> + team->limited;?> - actions;?> + actions;?> diff --git a/module/personnel/css/accessible.css b/module/personnel/css/accessible.css new file mode 100644 index 0000000000..b3e2a08c1d --- /dev/null +++ b/module/personnel/css/accessible.css @@ -0,0 +1,4 @@ +.c-id {width: 40px;} +.c-department {width: 120px;} +.c-user, .c-job {width: 80px;} +.c-genders {width: 60px;} diff --git a/module/personnel/css/invest.css b/module/personnel/css/invest.css new file mode 100644 index 0000000000..b975887bf1 --- /dev/null +++ b/module/personnel/css/invest.css @@ -0,0 +1 @@ +.c-story {width: 150px;} diff --git a/module/personnel/css/whitelist.css b/module/personnel/css/whitelist.css index f36b859c91..4c4d68cd08 100644 --- a/module/personnel/css/whitelist.css +++ b/module/personnel/css/whitelist.css @@ -1 +1,3 @@ .c-dept {overflow:hidden; text-overflow: ellipsis; white-space: nowrap;} +.c-phone {width: 120px;} +.c-email {width: 200px;} diff --git a/module/personnel/view/accessible.html.php b/module/personnel/view/accessible.html.php index 745a1c51b5..4fd59b91a9 100644 --- a/module/personnel/view/accessible.html.php +++ b/module/personnel/view/accessible.html.php @@ -36,12 +36,12 @@ js::set('deptID', $deptID); - - - - - - + + + + + + diff --git a/module/personnel/view/invest.html.php b/module/personnel/view/invest.html.php index b7edd908d5..e12717eb0b 100644 --- a/module/personnel/view/invest.html.php +++ b/module/personnel/view/invest.html.php @@ -28,7 +28,7 @@ - + config->maxVersion)): ?> diff --git a/module/personnel/view/whitelist.html.php b/module/personnel/view/whitelist.html.php index 4af68ed307..767b8726d4 100644 --- a/module/personnel/view/whitelist.html.php +++ b/module/personnel/view/whitelist.html.php @@ -35,12 +35,12 @@ - - - - - - + + + + + + diff --git a/module/repo/css/browse.css b/module/repo/css/browse.css index 6031a88317..d8570a6143 100644 --- a/module/repo/css/browse.css +++ b/module/repo/css/browse.css @@ -3,3 +3,10 @@ .main-row {width: 99%;} .btn-toolbar > .last-sync-time {display: inline-block; float: left; margin-right: 10px;} .dropdown-menu > li.selected > a:after {content: '';} + +.c-name {min-width: 150px;} +.c-checkbox {width: 40px;} +.c-version {width: 80px;} +.c-commit {width: 70px;} +.c-committer {width: 100px;} +.c-icon {width: 30px;} diff --git a/module/repo/view/ajaxsidecommits.html.php b/module/repo/view/ajaxsidecommits.html.php index 89b828c2b8..89e7c656d6 100644 --- a/module/repo/view/ajaxsidecommits.html.php +++ b/module/repo/view/ajaxsidecommits.html.php @@ -18,13 +18,13 @@ if(isset($entry)) $pathInfo .= '&type=file';
idAB;?>personnel->department;?>personnel->realName;?>personnel->userName;?>personnel->job;?>personnel->genders;?>idAB;?>personnel->department;?>personnel->realName;?>personnel->userName;?>personnel->job;?>personnel->genders;?>
personnel->workingHours;?> personnel->task;?> personnel->bug;?>URAndSR ? "colspan='2'" : "rowspan='2'";?> class="w-150px">personnel->createStories;?>URAndSR ? "colspan='2'" : "rowspan='2'";?> class="c-story">personnel->createStories;?> personnel->issue;?> personnel->risk;?> user->realname;?> user->dept;?>user->role;?>user->phone;?>user->qq;?>user->weixin;?>user->email;?>actions;?>user->role;?>user->phone;?>user->qq;?>user->weixin;?>actions;?>
- - + + SCM != 'Subversion'):?> - + - - + + diff --git a/module/repo/view/browse.html.php b/module/repo/view/browse.html.php index 91ef7f76db..d303e166c4 100644 --- a/module/repo/view/browse.html.php +++ b/module/repo/view/browse.html.php @@ -66,11 +66,11 @@
repo->revisionA?>repo->revisionA?> repo->commit?>repo->commit?> repo->time?>repo->committer?>repo->time?>repo->committer?> repo->comment?>
- - - - - + + + + + diff --git a/module/stakeholder/css/browse.css b/module/stakeholder/css/browse.css index 8562b7a1f0..0e9ccdfc5f 100644 --- a/module/stakeholder/css/browse.css +++ b/module/stakeholder/css/browse.css @@ -1 +1,3 @@ table td, table th {overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} +.c-phone {width: 120px;} +.c-email {width: 200px;} diff --git a/module/stakeholder/view/browse.html.php b/module/stakeholder/view/browse.html.php index 8675a04b87..0dbf165593 100644 --- a/module/stakeholder/view/browse.html.php +++ b/module/stakeholder/view/browse.html.php @@ -33,12 +33,12 @@ idAB);?> - - - - - - + + + + + + diff --git a/www/theme/default/style.css b/www/theme/default/style.css index 6363418df5..0cc3c5813b 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -58,6 +58,7 @@ a.showMoreImage:hover {opacity: 1;} .c-number, .c-stage, .c-role, .c-estimate-box, .c-result {width: 80px;} .c-company, .c-budget {width: 80px;} .c-status, .c-type, .c-user, .c-date, .c-encode, .c-resolution, .c-pri-box, .c-extend {width: 100px;} +.c-qq, .c-weixin {width: 120px;} .c-object-type {width: 130px;} .c-full-date, .c-mobile, .c-email, .c-text, .c-subject, .c-assigned-box, .c-user-box {width: 150px;} .c-module, .c-date-box {width: 180px;} From 87397bf86fb971c0aafe61a2afa0e3c3be99c43c Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 14 Sep 2021 11:23:56 +0800 Subject: [PATCH 2/3] * Fix bug #15138. --- module/bug/control.php | 12 ++++++------ module/bug/model.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 95668fc569..8412b26f41 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -202,7 +202,7 @@ class bug extends control $this->bug->buildSearchForm($productID, $this->products, $queryID, $actionURL); $showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : ''; - $productName = $productID ? $this->products[$productID] : $this->lang->product->allProduct; + $productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct; /* Set view. */ $this->view->title = $productName . $this->lang->colon . $this->lang->bug->common; @@ -573,16 +573,16 @@ class bug extends control /* Set custom. */ foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field; + + $title = isset($this->products[$productID]) ? $this->products[$productID] . $this->lang->colon . $this->lang->bug->create : $this->lang->bug->create; + + $this->view->title = $title; $this->view->customFields = $customFields; $this->view->showFields = $this->config->bug->custom->createFields; - $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->create; - $this->view->products = $products; $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; + $this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : ''; $this->view->moduleOptionMenu = $moduleOptionMenu; $this->view->stories = $stories; $this->view->projects = $projects; diff --git a/module/bug/model.php b/module/bug/model.php index 07c5a885f4..378f3f35eb 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1288,7 +1288,7 @@ class bugModel extends model public function buildSearchForm($productID, $products, $queryID, $actionURL) { $projectID = $this->lang->navGroup->bug == 'qa' ? 0 : $this->session->project; - $productParams = $productID ? array($productID => $products[$productID]) : $products; + $productParams = ($productID and isset($products[$productID])) ? array($productID => $products[$productID]) : $products; $productParams = $productParams + array('all' => $this->lang->bug->allProduct); /* Get all modules. */ From 659a466795fa6b7b20f966ca15c66f127cedbb45 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 14 Sep 2021 11:30:17 +0800 Subject: [PATCH 3/3] * Fix key of testcases. --- api/v1/entries/stories.php | 6 +++++- api/v1/entries/testcases.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/v1/entries/stories.php b/api/v1/entries/stories.php index e305b8556f..946d9c1156 100644 --- a/api/v1/entries/stories.php +++ b/api/v1/entries/stories.php @@ -65,8 +65,12 @@ class storiesEntry extends entry * @access public * @return void */ - public function post($productID) + public function post($productID = 0) { + if(!$productID) $productID = $this->param('product'); + if(!$productID and isset($this->requestBody->product)) $productID = $this->requestBody->product; + if(!$productID) return $this->sendError(400, 'Need product id.'); + $fields = 'title,spec,verify,reviewer,type'; $this->batchSetPost($fields); diff --git a/api/v1/entries/testcases.php b/api/v1/entries/testcases.php index 34a0b431d3..62dac12bb4 100644 --- a/api/v1/entries/testcases.php +++ b/api/v1/entries/testcases.php @@ -50,7 +50,7 @@ class testcasesEntry extends entry $result[] = $this->format($case, 'openedDate:time,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedDate:date,deleted:bool'); } - return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'tasks' => $result)); + return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'testcases' => $result)); } if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
repo->name?>repo->revisions?>repo->time?>repo->committer?>repo->name?>repo->revisions?>repo->time?>repo->committer?> repo->comment?>
stakeholder->name;?>stakeholder->common . $lang->stakeholder->type;?>stakeholder->phone;?>stakeholder->qq;?>stakeholder->weixin;?>stakeholder->email;?>actions;?>stakeholder->common . $lang->stakeholder->type;?>stakeholder->phone;?>stakeholder->qq;?>stakeholder->weixin;?>actions;?>