From 9459443016108bec7e7fd8b4288b6be9827e02f5 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 29 Jun 2021 10:00:45 +0800 Subject: [PATCH] * Preparing for merge them to pushObject. --- module/gitlab/model.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index dd9e1824ed..8cf41777ce 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -561,6 +561,14 @@ class gitlabModel extends model public function pushTask($taskID, $gitlab, $gitlabProject) { $task = $this->loadModel('task')->getByID($taskID); + + if(!$gitlabID or !$projectID) + { + $result = $this->getGitlabIDprojectID('task', $taskID); + $gitlabID = $result->gitlabID; + $projectID = $result->projectID; + } + $syncedIssue = $this->getSyncedIssue($objectType = 'task', $objectID = $taskID, $gitlab); $issue = $this->taskToIssue($gitlab, $gitlabProject, $task); @@ -628,6 +636,13 @@ class gitlabModel extends model { $bug = $this->loadModel('bug')->getByID($bugID); + if(!$gitlabID or !$projectID) + { + $result = $this->getGitlabIDprojectID('bug', $bugID); + $gitlabID = $result->gitlabID; + $projectID = $result->projectID; + } + $syncedIssue = $this->getSyncedIssue($objectType = 'bug', $objectID = $bugID, $gitlab); $issue = $this->bugToIssue($gitlab, $gitlabProject, $bug);