It's all about the answers!

Ask a question

Can an integer field accept 0 as a valid value when required ?


Eric Jodet (6.3k5111120) | asked Feb 14 '13, 8:22 a.m.
JAZZ DEVELOPER
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?

One answer



permanent link
Eric Jodet (6.3k5111120) | answered Feb 14 '13, 8:24 a.m.
JAZZ DEVELOPER
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)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.