本文整理汇总了PHP中thebuggenie\core\entities\Issue::setState方法的典型用法代码示例。如果您正苦于以下问题:PHP Issue::setState方法的具体用法?PHP Issue::setState怎么用?PHP Issue::setState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thebuggenie\core\entities\Issue
的用法示例。
在下文中一共展示了Issue::setState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runDoImportCSV
//.........这里部分代码省略.........
$project->setLocked($activerow[self::CSV_PROJECT_ALLOW_REPORTING]);
}
if (isset($activerow[self::CSV_PROJECT_AUTOASSIGN])) {
$project->setAutoassign($activerow[self::CSV_PROJECT_AUTOASSIGN]);
}
if (isset($activerow[self::CSV_PROJECT_ISSUETYPE_SCHEME])) {
$project->setIssuetypeScheme(entities\IssuetypeScheme::getB2DBTable()->selectById($activerow[self::CSV_PROJECT_ISSUETYPE_SCHEME]));
}
if (isset($activerow[self::CSV_PROJECT_WORKFLOW_ID])) {
}
$project->setWorkflowScheme(entities\WorkflowScheme::getB2DBTable()->selectById($activerow[self::CSV_PROJECT_WORKFLOW_ID]));
$project->save();
} catch (\Exception $e) {
$errors[] = $this->getI18n()->__('Row %row failed: %err', array('%row' => $i + 1, '%err' => $e->getMessage()));
}
}
break;
case self::CSV_TYPE_ISSUES:
for ($i = 0; $i != count($data); $i++) {
try {
$activerow = $data[$i];
$issue = new entities\Issue();
$issue->setTitle($activerow[self::CSV_ISSUE_TITLE]);
$issue->setProject($activerow[self::CSV_ISSUE_PROJECT]);
$issue->setIssuetype($activerow[self::CSV_ISSUE_ISSUE_TYPE]);
$issue->save();
if (isset($activerow[self::CSV_ISSUE_DESCR])) {
$issue->setDescription($activerow[self::CSV_ISSUE_DESCR]);
}
if (isset($activerow[self::CSV_ISSUE_REPRO])) {
$issue->setReproductionSteps($activerow[self::CSV_ISSUE_REPRO]);
}
if (isset($activerow[self::CSV_ISSUE_STATE])) {
$issue->setState($activerow[self::CSV_ISSUE_STATE]);
}
if (isset($activerow[self::CSV_ISSUE_STATUS])) {
$issue->setStatus($activerow[self::CSV_ISSUE_STATUS]);
}
if (isset($activerow[self::CSV_ISSUE_POSTED_BY])) {
$issue->setPostedBy(entities\User::getB2DBTable()->selectByID($activerow[self::CSV_ISSUE_POSTED_BY]));
}
if (isset($activerow[self::CSV_ISSUE_OWNER]) && isset($activerow[self::CSV_ISSUE_OWNER_TYPE])) {
switch ($activerow[self::CSV_ISSUE_OWNER_TYPE]) {
case self::CSV_IDENTIFIER_TYPE_USER:
$user = new entities\User($activerow[self::CSV_ISSUE_OWNER]);
$issue->setOwner($user);
break;
case self::CSV_IDENTIFIER_TYPE_TEAM:
$team = new entities\Team($activerow[self::CSV_ISSUE_OWNER]);
$issue->setOwner($team);
break;
}
}
if (isset($activerow[self::CSV_ISSUE_ASSIGNED]) && isset($activerow[self::CSV_ISSUE_ASSIGNED_TYPE])) {
switch ($activerow[self::CSV_ISSUE_ASSIGNED_TYPE]) {
case self::CSV_IDENTIFIER_TYPE_USER:
$user = new entities\User($activerow[self::CSV_ISSUE_ASSIGNED]);
$issue->setAssignee($user);
break;
case self::CSV_IDENTIFIER_TYPE_TEAM:
$team = new entities\Team($activerow[self::CSV_ISSUE_ASSIGNED]);
$issue->setAssignee($team);
break;
}
}
if (isset($activerow[self::CSV_ISSUE_RESOLUTION])) {