It's all about the answers!

Ask a question

RTC custom attribute of Integer type


1
1
Meghana Pandey (15111514) | asked Sep 27 '11, 2:09 a.m.
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

Comments
Robert Huet commented Nov 19 '15, 10:39 a.m.

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.


Ralph Schoon commented Nov 20 '15, 5:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.

2 answers



permanent link
Donald Nong (14.5k414) | answered Nov 20 '15, 4:50 a.m.
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
Ralph Schoon commented Nov 20 '15, 5:02 a.m. | edited Nov 20 '15, 5:03 a.m.
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.


permanent link
Gustavo Monti Rocha (251216) | answered Jan 29 '13, 8:09 a.m.
Hi Meghana,

We're having same trouble. Any solution?

Thanks.

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.