* Fix bug when creating zentao object label.

This commit is contained in:
dingguodong
2021-06-25 15:08:11 +08:00
parent 903f361882
commit 354d13f907
+6 -6
View File
@@ -368,20 +368,20 @@ class gitlabModel extends model
if($object == 'task')
{
$label->name = sprintf($this->config->gitlab->zentaoObjectLabel->name, $object, $objectID);
$label->color = $config->gitlab->zentaoObjectLabel->taskColor;
$label->description = $this->createLink('task', 'view', "taskID={$object->taskID}");
$label->color = $this->config->gitlab->zentaoObjectLabel->taskColor;
$label->description = helper::createLink('task', 'view', "taskID={$object->taskID}");
}
elseif($object == 'bug')
{
$label->name = sprintf($this->config->gitlab->zentaoObjectLabel->name, $object, $objectID);
$label->color = $config->gitlab->zentaoObjectLabel->taskColor;
$label->description = $this->createLink('bug', 'view', "taskID={$object->bugID}");
$label->color = $this->config->gitlab->zentaoObjectLabel->taskColor;
$label->description = helper::createLink('bug', 'view', "taskID={$object->bugID}");
}
elseif($object == 'story')
{
$label->name = sprintf($this->config->gitlab->zentaoObjectLabel->name, $object, $objectID);
$label->color = $config->gitlab->zentaoObjectLabel->taskColor;
$label->description = $this->createLink('story', 'view', "storyID={$object->storyID}");
$label->color = $this->config->gitlab->zentaoObjectLabel->taskColor;
$label->description = helper::createLink('story', 'view', "storyID={$object->storyID}");
}
return $this->apiCreateLabel($gitlabID, $projectID, $label);