* [apiv2] Fix productID

This commit is contained in:
朱金勇
2025-12-17 22:22:52 +08:00
committed by Gitfox
parent f1e3c4bf66
commit fe40b2021e
+3
View File
@@ -70,6 +70,9 @@ class story extends control
if($this->post->project) $objectID = (int)$this->post->project;
if($this->post->execution) $objectID = (int)$this->post->execution;
/* API only has productID. */
if(!isset($_POST['product'])) $_POST['product'] = $productID;
/* Get story data from post. */
$storyData = $this->storyZen->buildStoryForCreate($objectID, $bugID, $storyType);
if(!$storyData) return $this->send(array('result' => 'fail', 'message' => dao::getError()));