From 049bf6c3db0dfa910e1ced133a51e94bde4c4414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=87=91=E5=8B=87?= Date: Mon, 15 Dec 2025 13:09:37 +0800 Subject: [PATCH] * [apiv2] Fix projectstory --- module/story/control.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/story/control.php b/module/story/control.php index 410ef14ab5..1f9711ec15 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -66,6 +66,10 @@ class story extends control if(isset($_POST['modules'])) $moduleID = reset($_POST['modules']); helper::setcookie('lastStoryModule', $moduleID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false); + /* API will post projectID or executionID. */ + if($this->post->project) $objectID = $this->post->project; + if($this->post->execution) $objectID = $this->post->execution; + /* Get story data from post. */ $storyData = $this->storyZen->buildStoryForCreate($objectID, $bugID, $storyType); if(!$storyData) return $this->send(array('result' => 'fail', 'message' => dao::getError()));