Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Longueur d'un attribut - Lenght of Custom Attribut

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.

0 votes



6 answers

Permanent link
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.

0 votes


Permanent link
Great, that's what I need, thanks a lot.
For instance \w?\w?\w?\w? for my value.

0 votes


Permanent link
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

0 votes


Permanent link
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)

0 votes


Permanent link
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.

0 votes


Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 07 '11, 5:51 a.m.

Question was seen: 4,558 times

Last updated: Nov 07 '11, 5:51 a.m.

Confirmation Cancel Confirm