Skip to content

Commit

Permalink
* Fix bug for the story list does not display the value of the SRS fi…
Browse files Browse the repository at this point in the history
…eld.
  • Loading branch information
hufangzhou committed Sep 15, 2023
1 parent ebd31dd commit d20fe5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module/story/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -6874,11 +6874,11 @@ public function generateRow($stories, $cols, $options, $execution, $storyType)
$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')
if($col->name == 'URS' || $col->name == 'SRS')
{
$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;
$link = helper::createLink('story', 'relation', "storyID=$story->id&storyType=$story->type");
$storySR = $this->getStoryRelationCounts($story->id, $story->type);
$data->{$col->name} = $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);
Expand Down

0 comments on commit d20fe5d

Please sign in to comment.