Skip to content

Commit

Permalink
Merge pull request #1112 from mozzy11/develop
Browse files Browse the repository at this point in the history
Fix test Calculated
  • Loading branch information
mozzy11 authored Jun 18, 2024
2 parents 8fb3d26 + 64965a1 commit 058b621
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ accessing any of these links, simply follow these steps:
cd frontend
npm run format

2. After making changes to the [backend](./src/) directory, run the formatter to
properly format the Java code
2. After making changes to the [backend](./src/) directory, run the formatter
to properly format the Java code

mvn clean install -P format
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ const CalculatedValue: React.FC<CalculatedValueProps> = () => {
name="value"
type="number"
id={index + "_" + operationIndex + "_integer"}
step="any"
labelText={
<FormattedMessage id="testcalculation.label.integer" />
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<minor.version>8</minor.version>
<state.version>1</state.version>
<!-- 0 = alpha, 1 = beta, 2 = rc, 3 = deployable -->
<fix.version>34</fix.version>
<fix.version>35</fix.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<liquibase.propertyFile>${project.basedir}/liquibase/liquibase.properties</liquibase.propertyFile>
<castor.version>1.4.1</castor.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,17 @@ public List<Analysis> addNewTestsToDBForCalculatedTests(
Operation.OperationType.TEST_RESULT.toString());
break;
case INTEGER:
function.append(Integer.valueOf(operation.getValue())).append(" ");
try {
if (operation.getValue().contains(".")) {
double val = Double.parseDouble(operation.getValue());
function.append(val).append(" ");
} else {
int number = Integer.parseInt(operation.getValue());
function.append(number).append(" ");
}
} catch (NumberFormatException e) {

}
break;
case MATH_FUNCTION:
if (operation.getValue().equals(Operation.IN_NORMAL_RANGE)) {
Expand Down

0 comments on commit 058b621

Please sign in to comment.