* If bug severity has customed, show severity value not the key.
This commit is contained in:
+19
-1
@@ -2442,6 +2442,17 @@ class bugModel extends model
|
||||
$canBatchAction = $canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo;
|
||||
|
||||
$canView = common::hasPriv('bug', 'view');
|
||||
|
||||
$hasCustomSeverity = false;
|
||||
foreach($this->lang->bug->severityList as $severityKey => $severityValue)
|
||||
{
|
||||
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
|
||||
{
|
||||
$hasCustomSeverity = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$bugLink = inlink('view', "bugID=$bug->id");
|
||||
$account = $this->app->user->account;
|
||||
$id = $col->id;
|
||||
@@ -2482,7 +2493,14 @@ class bugModel extends model
|
||||
}
|
||||
break;
|
||||
case 'severity':
|
||||
echo "<span class='label-severity' data-severity='{$bug->severity}' title='" . zget($this->lang->bug->severityList, $bug->severity) . "'></span>";
|
||||
if($hasCustomSeverity)
|
||||
{
|
||||
echo "<span class='label-severity-custom' data-severity='{$bug->severity}' title='" . zget($this->lang->bug->severityList, $bug->severity) . "'>" . zget($this->lang->bug->severityList, $bug->severity) . "</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<span class='label-severity' data-severity='{$bug->severity}' title='" . zget($this->lang->bug->severityList, $bug->severity) . "'></span>";
|
||||
}
|
||||
break;
|
||||
case 'pri':
|
||||
echo "<span class='label-pri label-pri-" . $bug->pri . "' title='" . zget($this->lang->bug->priList, $bug->pri, $bug->pri) . "'>";
|
||||
|
||||
Reference in New Issue
Block a user