It's all about the answers!

Ask a question

Longueur d'un attribut - Lenght of Custom Attribut


Jocelyn Ferdinand (1611) | asked Nov 07 '11, 5:51 a.m.
Comment limiter dans un workitem la longueur des champs saisissables de type string ?
Par exemple une valeur de code ne devra pas dpasser 4 caractres.

How limit in workitem the length of string custom attributes ?
For instance an code's value should be less of 4 letters.

6 answers



permanent link
Ralph Schoon (63.4k33646) | answered Nov 07 '11, 6:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

for 3.x you could try to create a validator. Process configuration>Project Configuration>Configuration Data>Work Items>Attribute Customization. I'd try and create a regular expression validator.

permanent link
Jocelyn Ferdinand (1611) | answered Nov 07 '11, 7:19 a.m.
Great, that's what I need, thanks a lot.
For instance \w?\w?\w?\w? for my value.

permanent link
Ralph Schoon (63.4k33646) | answered Nov 07 '11, 7:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Great, that's what I need, thanks a lot.
For instance \w?\w?\w?\w? for my value.


Hi,

just to add:

Please note, the indication does not prevent from saving with an invalid value. it can be used in conjunction with the Attribute Validation precondition for saving a work item (server). With this precondition set it prevents saving work items with attribute validation issues of level error. Validation results with level Warning or Information can still be saved.

See https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Validators

permanent link
Jocelyn Ferdinand (1611) | answered Nov 07 '11, 8:19 a.m.
Ok, I put the Attribute Validation on saving the workitem, and now the validation is fine, and the workitem can't be saved if there is a mistake :
Erreur
Valeur de l'attribut 'Application' non valide dans l'lment de travail '4687' :

Cause
Vrifie qu'un lment de travail peut tre sauvegard uniquement si toutes les valeurs d'attribut sont valides.


But I can't explain to the user the reason of the error, because the "Message" field is not available to be written in the 'regular expression validator' screen.

An idea ?
(I send you the screen by email)

permanent link
Ralph Schoon (63.4k33646) | answered Nov 07 '11, 9:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

that is odd, can you try on a machine with a higher resolution?

Another idea would be to add -Duser.language=en to your eclipse.ini (of the RTC client) and, just for this, work with the English menus. Which version are you running? I would consider to open a defect/work item/PMR for the missing field.

permanent link
Jocelyn Ferdinand (1611) | answered Nov 07 '11, 9:59 a.m.
In fact the 'message' Field is available !
But not with 'fences' arround...
My local support tried on differents serveurs (all with same RTC level), and it seems to by a installation difference, because one of his RTC shows the fences, and none other...

I can write my information in it, and now the error is clearly explained.
(see my screenshot by mail)

Thank you very much for the explanations and help.

Jocelyn

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.