U4-4652 - Missing Decimal/Double data types

Created by Ian Wright 09 Apr 2014, 11:34:44 Updated by Shannon Deminick 25 Jan 2016, 15:14:05

Is duplicated by: U4-7587

Depends on: U4-7246

Umbraco seems to only handle Integer types when dealing with numerical values. It really needs to be able to handle floating point numbers, including Decimals for anything currency related.

Comments

Andy Butland 26 Sep 2015, 20:54:44

Have submitted a PR for this: https://github.com/umbraco/Umbraco-CMS/pull/800


Claus Jensen 14 Oct 2015, 08:06:01

PR: https://github.com/umbraco/Umbraco-CMS/pull/811


Shannon Deminick 14 Oct 2015, 10:08:30

Have made one commit: 327a00aaf4b6f12e8221631968965dcf1db05646

I'll close these issues now but if you think that commit has issues let me konw.


Bjarne Fyrstenborg 14 Oct 2015, 13:12:35

@Shandem the pattern attribute is a nice-to-have feature for mobile and tablet devicese, especially for the numeric (integer) datatype: http://bradfrost.com/blog/mobile/better-numerical-inputs-for-mobile-forms/

https://github.com/Umbraco/Umbraco-CMS/commit/327a00aaf4b6f12e8221631968965dcf1db05646#diff-45cde7e4a6d20014b6663e8ad93d492bL4


Shannon Deminick 14 Oct 2015, 13:17:30

Yup, it's been re-added back.


Chad Rosenthal 24 Jan 2016, 01:21:14

There is still a missing piece from this. If I try to set a decimal value via the contentbase, then there isn't a SetValueOnProperty(string propertyTypeAlias, double value) or SetValueOnProperty(string propertyTypeAlias, decimal value)

I'll see about writing one...


Chad Rosenthal 24 Jan 2016, 04:48:11

PR request created - https://github.com/umbraco/Umbraco-CMS/pull/1048


Claus Jensen 25 Jan 2016, 13:19:45

PR merged in - thanks @Chad.Rosenthal. Modified a bit since we don't really need to parse to string before setting the value. Only place this is necessary is the bool since we're storing that as an integer.


Claus Jensen 25 Jan 2016, 13:20:21

Note - the first part of this issue has already been reviewed. This is what needs to be reviewed: https://github.com/umbraco/Umbraco-CMS/commit/63635ec9fb7956659e67f0307adedd3249bc1d48


Shannon Deminick 25 Jan 2016, 15:14:02

looks good to me


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category: Editor

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.8

Due in version: 7.4.0

Sprint: Sprint 7

Story Points:

Cycle: