From e6287a4d682a23500d31ae10c5cb59704a741b85 Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Tue, 15 Mar 2022 16:12:56 +0800 Subject: [PATCH 1/3] * Fix bug. --- api/v1/entries/builds.php | 1 - api/v1/entries/stories.php | 2 +- api/v1/entries/story.php | 2 +- config/config.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/v1/entries/builds.php b/api/v1/entries/builds.php index e303c9a4e1..3709a0463c 100644 --- a/api/v1/entries/builds.php +++ b/api/v1/entries/builds.php @@ -21,7 +21,6 @@ class buildsEntry extends entry public function get($projectID = 0) { if(empty($projectID)) $projectID = $this->param('project', 0); - if(empty($projectID)) return $this->sendError(400, "Need project id."); $control = $this->loadController('project', 'build'); $control->build($projectID, $this->param('type', 'all'), $this->param('param', 0), $this->param('order', 't1.date_desc,t1.id_desc')); diff --git a/api/v1/entries/stories.php b/api/v1/entries/stories.php index 863888aa3f..165c27f2ef 100644 --- a/api/v1/entries/stories.php +++ b/api/v1/entries/stories.php @@ -55,7 +55,7 @@ class storiesEntry extends entry 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,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords'; + $fields = 'title,spec,verify,reviewer,type,assignedTo,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords'; $this->batchSetPost($fields); /* If reviewer is not post, set needNotReview. */ diff --git a/api/v1/entries/story.php b/api/v1/entries/story.php index a22703a461..77889a3dbc 100644 --- a/api/v1/entries/story.php +++ b/api/v1/entries/story.php @@ -95,7 +95,7 @@ class storyEntry extends Entry $oldStory = $this->loadModel('story')->getByID($storyID); /* Set $_POST variables. */ - $fields = 'title,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords'; + $fields = 'title,product,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords'; $this->batchSetPost($fields, $oldStory); $this->setPost('parent', 0); diff --git a/config/config.php b/config/config.php index 6271d1a45d..b6b562c975 100644 --- a/config/config.php +++ b/config/config.php @@ -23,7 +23,7 @@ $config->cookieLife = time() + 2592000; // Cookie的生存时间。The co $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. $config->webRoot = ''; // URL根目录。 The root path of the url. $config->customSession = false; // 是否开启自定义session的存储路径。Whether custom the session save path. -$config->edition = 'open'; // 设置系统的edition,可选值:open|biz|max。Set edition, optional: open|biz|max. +$config->edition = 'max'; // 设置系统的edition,可选值:open|biz|max。Set edition, optional: open|biz|max. /* 框架路由相关设置。Routing settings. */ $config->requestType = 'PATH_INFO'; // 请求类型:PATH_INFO|PATHINFO2|GET。 The request type: PATH_INFO|PATH_INFO2|GET. From 459ccd36202398f1b1088f66d88782a5b35d1a8d Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Wed, 16 Mar 2022 09:01:13 +0800 Subject: [PATCH 2/3] * Fix bug. --- api/v1/entries/product.php | 3 +++ api/v1/entries/stories.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/v1/entries/product.php b/api/v1/entries/product.php index 1f30423a74..90b70743c9 100644 --- a/api/v1/entries/product.php +++ b/api/v1/entries/product.php @@ -51,6 +51,9 @@ class productEntry extends Entry $product->modules = $data->data->tree; } break; + case 'moduleoptionmenu': + $product->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($productID, 'bug', 0, 'all'); + break; case 'actions': $product->addComment = common::hasPriv('action', 'comment') ? true : false; diff --git a/api/v1/entries/stories.php b/api/v1/entries/stories.php index 165c27f2ef..d92f3ddd6e 100644 --- a/api/v1/entries/stories.php +++ b/api/v1/entries/stories.php @@ -55,7 +55,7 @@ class storiesEntry extends entry 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,assignedTo,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords'; + $fields = 'title,spec,verify,reviewer,type,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords'; $this->batchSetPost($fields); /* If reviewer is not post, set needNotReview. */ From 956933c4a18002fc71628bf37ac93537436c900d Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Wed, 16 Mar 2022 09:29:05 +0800 Subject: [PATCH 3/3] * fix bug. --- api/v1/entries/product.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/v1/entries/product.php b/api/v1/entries/product.php index 90b70743c9..effecc6a9a 100644 --- a/api/v1/entries/product.php +++ b/api/v1/entries/product.php @@ -54,6 +54,9 @@ class productEntry extends Entry case 'moduleoptionmenu': $product->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($productID, 'bug', 0, 'all'); break; + case 'builds': + $product->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,noterminate,nodone,withbranch'); + break; case 'actions': $product->addComment = common::hasPriv('action', 'comment') ? true : false;