* Refactor bugModel-createBugFromGitlabIssue and modify unit test.

This commit is contained in:
liumengyi
2023-05-29 13:20:02 +08:00
parent f390fe7bd4
commit 9e4e3f9a2e
3 changed files with 14 additions and 15 deletions
+3 -2
View File
@@ -124,6 +124,7 @@ class bugModel extends model
}
/**
* gitlab问题转为bug。
* Create bug from gitlab issue.
*
* @param object $bug
@@ -131,11 +132,11 @@ class bugModel extends model
* @access public
* @return int|bool
*/
public function createBugFromGitlabIssue($bug, $executionID)
public function createBugFromGitlabIssue(object $bug, int $executionID): int|bool
{
$bug->openedBy = $this->app->user->account;
$bug->openedDate = helper::now();
$bug->assignedDate = isset($bug->assignedTo) ? helper::now() : 0;
$bug->assignedDate = isset($bug->assignedTo) ? helper::now() : null;
$bug->openedBuild = 'trunk';
$bug->story = 0;
$bug->task = 0;