RTC custom attribute of Integer type
![]()
We have added a custom workitem attribute of type "Integer" to one of our workitem types. What we have observed is that the attribute's value gets defaulted to "0", which we do not want.
Is there a way we can default it to null or any other value by changing in the process template? Regards, Meghana |
2 answers
![]()
I don't think it's going to work this way, as "null" is not a valid integer value. I would suggest using a String type instead with a validator to make sure the string represents an integer.
Comments ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Yes, for types like integer the default is a valid 0. and not a non existent object null. The same applies for Boolean as far as I can tell.
|
![]()
Hi Meghana,
We're having same trouble. Any solution? Thanks. |
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.
Comments
Does anyone know if an enhancement has been filed for this? I could not find one. Not being able to default custom integer values to "null" is a real problem for required attributes. We are defaulting to "-1", since "0" could be a valid value, but that is ugly and has to be filtered out of our reports. Fortunately, we have Insight, so we can do this in the Framework.
Consider to add a condition that returns false for -1 and add a required attribute for condition operational behavior so that you prevent saving the -1.