stable

Clone or download

Read-only

fix: Hybrids default string setter discards zero value

How to test: - Create an artifact with non-empty values for an int and float field - Edit this artifact and set values to 0 (zero) - Open the artifact in the Tracker Artifact UI. In the changesets, you should see the zero value. It should not say the fields were cleared. - When you create an artifact with zero values, they are saved correctly (not as empty string). Notes: - When setting the `value: ""` property, hybrids will use its default setter for strings. It probably discards "0" as the same as "". Using our own setter avoids this issue. fix request #34345 0 value is discarded in int and float fields in the Artifact modal Change-Id: I4e0b4a752db1cdc0e7b71a8072062197049c0bfe Signed-off-by: Yannis ROSSETTO <yannis.rossetto@enalean.com>

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/float-field/FloatField.test.ts +7 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/float-field/FloatField.ts +5 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/int-field/IntField.test.ts +7 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/int-field/IntField.ts +5 −1 Go to diff View file