From 2e9351bad6bbada6257ad72d1347a257888eb773 Mon Sep 17 00:00:00 2001 From: lichengjun Date: Tue, 29 Jun 2021 09:07:00 +0800 Subject: [PATCH] * Add fix update story. --- module/gitlab/model.php | 15 --------------- module/story/model.php | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index f09d022bc6..568d05c41f 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -77,21 +77,6 @@ class gitlabModel extends model ->fetchPairs(); } - /** - * Get gitlab gitlabID and gitlabProjectID. - * - * @param int $gitlab - * @access public - * @return void - */ - public function getGitlabToGitlabProject($storyID) - { - return $this->dao->select('BID,BVersion')->from(TABLE_RELATION) - ->where('relation')->eq('gitlab') - ->andWhere('AID')->eq($storyID) - ->fetchAll(); - } - /** * Get zentao account gitlab user id pairs of one gitlab. * diff --git a/module/story/model.php b/module/story/model.php index dfb669f2e0..05486f3c2c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -830,7 +830,7 @@ class storyModel extends model $this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec(); } /* update story to gitlab issue. */ - $objectID = $this->loadModel('gitlab')->getGitlabToGitlabProject($storyID); + $objectID = $this->loadModel('gitlab')->getGitlabIDprojectID('story',$storyID); if($objectID) $this->loadModel('gitlab')->pushToissue('story', $storyID, $this->post->gitlab, $this->post->gitlabProject); unset($oldStory->parent); @@ -1770,7 +1770,7 @@ class storyModel extends model if(!dao::isError()) { /* Update this story to gitlab issue. */ - $objectID = $this->loadModel('gitlab')->getGitlabToGitlabProject($storyID); + $objectID = $this->loadModel('gitlab')->getGitlabIDprojectID('story',$storyID); if($objectID) $this->loadModel('gitlab')->pushToissue('story', $storyID, $this->post->gitlab, $this->post->gitlabProject); return common::createChanges($oldStory, $story);