Can an integer field accept 0 as a valid value when required ?
I am using RTC 4.0.1 and found that zero value is not accepted as valid integer value when "required value for type and state" is enabled
steps to reproduce:
- create PA - SCRUM
- add a custom integer type attribute and presentation
- enable "required value for type and state" for this attribute
- create a new work item
- observe: integer value is defaulted to zero
- save work item
- expected: work item is saved as value is set (zero is a valid integer value)
- observed: attribute not set error
is this a defect?
steps to reproduce:
- create PA - SCRUM
- add a custom integer type attribute and presentation
- enable "required value for type and state" for this attribute
- create a new work item
- observe: integer value is defaulted to zero
- save work item
- expected: work item is saved as value is set (zero is a valid integer value)
- observed: attribute not set error
is this a defect?
One answer
No : behavior is as designed, and will be improved with enhancement Allow unset int/long attributes (47827)
Integer attributes can not be unset, they always have a value: at least the default value which is 0. In the UI, when you clear the field and save, it will immediately change to 0.
Also note that defect Zero not accepted as valid entry in an integer field when made mandatory (169684)
was rejected for this reason (as designed behavior)
Integer attributes can not be unset, they always have a value: at least the default value which is 0. In the UI, when you clear the field and save, it will immediately change to 0.
Also note that defect Zero not accepted as valid entry in an integer field when made mandatory (169684)
was rejected for this reason (as designed behavior)