* Fix bug for the story list does not display the value of the URS field.

This commit is contained in:
hufangzhou
2023-09-15 00:58:23 +00:00
parent f69a668da8
commit 5fffe4d7a5
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ class product extends control
$this->view->storyType = $storyType;
$this->view->from = $this->app->tab;
$this->view->isProjectStory = $isProjectStory;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
$this->view->modulePairs = $this->tree->getModulePairs($productID, 'story', $showModule);
$this->view->project = $project;
$this->display();
}
+6
View File
@@ -6874,6 +6874,12 @@ class storyModel extends model
$mailto = array_map(function($account) use($users){$account = trim($account); return zget($users, $account);}, explode(',', $story->mailto));
$data->mailto = implode(' ', $mailto);
}
if($col->name == 'URS')
{
$link = helper::createLink('story', 'relation', "storyID=$story->id&storyType=$story->type");
$storySR = $this->getStoryRelationCounts($story->id, $story->type);
$data->URS = $storySR > 0 ? html::a($link, $storySR, '', 'class="iframe" data-toggle="modal"') : 0;
}
if(in_array($col->name, $userFields)) $data->{$col->name} = zget($users, $story->{$col->name});
if(in_array($col->name, $dateFields)) $data->{$col->name} = helper::isZeroDate($story->{$col->name}) ? '' : substr($story->{$col->name}, 5, 11);
}