* Fix bug.

This commit is contained in:
tianshujie98
2021-07-07 13:42:12 +08:00
parent d38280e257
commit cb4fd5ffb1
4 changed files with 4 additions and 3 deletions

View File

@@ -2,3 +2,4 @@ UPDATE `zt_block` SET `source`='execution' WHERE `source`='project' and `block`=
ALTER TABLE `zt_story` MODIFY COLUMN `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass');
ALTER TABLE `zt_storyestimate` MODIFY COLUMN `average` float NOT NULL;

View File

@@ -943,7 +943,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyestimate` (
`story` mediumint(9) NOT NULL,
`round` smallint(6) NOT NULL,
`estimate` text NOT NULL,
`average` float(10,2) NOT NULL,
`average` float NOT NULL,
`openedBy` varchar(30) NOT NULL,
`openedDate` datetime NOT NULL,
UNIQUE KEY `story` (`story`,`round`)

View File

@@ -54,7 +54,7 @@
<td><?php echo zget($users, $user->account);?></td>
<?php echo html::hidden('account[]', $user->account, "class='form-control'");?>
<?php if(!empty($estimateInfo->estimate)):?>
<td class='c-name' title="<?php echo isset($estimateInfo->estimate->{$user->account}) ? $estimateInfo->estimate->{$user->account}->estimate : '';?>"><?php echo isset($estimateInfo->estimate->{$user->account}) ? $estimateInfo->estimate->{$user->account}->estimate : '';?></td>
<td class='c-name' title="<?php echo isset($estimateInfo->estimate->{$user->account}) ? $estimateInfo->estimate->{$user->account}->estimate : '';?>" style='text-align: center !important;'><?php echo isset($estimateInfo->estimate->{$user->account}) ? $estimateInfo->estimate->{$user->account}->estimate : '';?></td>
<td class='new-estimate hide'><?php echo html::input('estimate[]', '', "class='form-control'");?></td>
<?php else:?>
<td class='new-estimate'><?php echo html::input('estimate[]', '', "class='form-control'");?></td>

View File

@@ -4165,7 +4165,7 @@ class storyModel extends model
dao::$errors[] = $this->lang->story->estimateMustBePlus;
return false;
}
$estimates[$account]['estimate'] = strpos($data->estimate[$key], '-') !== false ? (int)$data->estimate[$key] : $data->estimate[$key];
$estimates[$account]['estimate'] = strpos($data->estimate[$key], '-') !== false ? (int)$data->estimate[$key] : (float)$data->estimate[$key];
}