Kolya_Net
Kolya_Net

Reputation: 1140

TFS. Apply pattern matching to a double field

There are system fields:

Effort

As I understand these fields are of type double. TFS does not allow you to enter letters into these fields.

My problem is that TFS allows you to enter a dot (.) or a comma (,) in the fields. But if you enter a comma (,) in the field, TFS deletes it after saving the form. For example, the number 15,50 will be converted to 1550.

I understand that this can be partially corrected by the Windows localization settings, but this option does not work. does not provide a 100% guarantee.

The documentation found that you can use pattern matching, but this only applies to fields of type string (https://learn.microsoft.com/ru-ru/vsts/work/customize/reference/apply-pattern-matching-to-string-field).

How can I check the value in the field so that when I enter 15,50 I get 15.50 or an error when saving?

Used version of TFS 15.117.27024.0.

Upvotes: 0

Views: 197

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30392

Unfortunately the feature is not supported for now.

You can only set that with dot (.), but it will remove the 0 if the last bit is 0, that means you can only get 15.5 but not 15.50.

And there isn't a rule to match the condition which contains a comma (,) in the fields (See Assign conditional-based values and rules). So, we also cannot set error when saving.

Actually there's already a user voice here to suggest this feature, you can go and vote it up to help achieving that in future.

Upvotes: 1

Related Questions