U4-9464 - Decimal return 0 from GetProperty("test").Value when value is negative

Created by Roadhouse 01 Feb 2017, 23:34:14 Updated by Benjamin Ketron 28 Jun 2017, 18:00:06

Tags: PR

Subtask of: U4-9609


The screenshot is enough to understand what's wrong but here are the steps:

  1. Create a Document Type with a field of type Decimal.
  2. Create a node and populate that field with value: -5.6
  3. Get the node by ID and inspect results of new UmbracoHelper(UmbracoContext.Current).TypedContent(id).GetProperty("test")

Notice DataValue has "-5.6" but Value has 0.

This is only an issue for decimal values that are lower than 0 (negative values).

I have brought this issue up in the Ditto project also which makes use of the Value field: https://github.com/leekelleher/umbraco-ditto/issues/206

1 Attachments


Benjamin Ketron 07 Jun 2017, 04:25:46


Stephan 19 Jun 2017, 10:11:18

Should be fast to review, we must do it! -> assigning to next sprint

Benjamin Ketron 28 Jun 2017, 18:00:06

@zpqrtbnk Thank you, Stephan.

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions:

Due in version: 7.6.5

Sprint: Sprint 62

Story Points: 1