Description from script based validation is not working
![]()
Michael Besems (13●1)
| asked Sep 19 '18, 3:21 a.m.
edited Sep 19 '18, 5:17 a.m. by Ralph Schoon (62.0k●3●36●43)
I can't seem to get my script based validation to work.
What I need?
When a new story is created a standard text is filled in the description field (Different text for Story & Defect, none for the rest).
What I've done:
- Script based validators are turned on
- Created new validator:
- Attached the new validator to the Description attribute
What I see:
- goto web interrface: Work item - Create Work item - Defect
- Description field remains empty
I at least expected to see something happening here.
At the very least the "I am no defect" if I got the type wrong or a visible error message somewhere.
Note: If I add a Default Value to the "Desription" attribute this does work (only same text for all work item types, hence why I went script based).
Thanks in advance
|
Accepted answer
![]()
Ralph Schoon (62.0k●3●36●43)
| answered Sep 19 '18, 5:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Did you search for any documentation before you tried that?
You selected the template for a default value provider - which obviously does not work.
See https://jazz.net/wiki/bin/view/Main/AttributeCustomization and https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Validators
Create a proper validator that returns what is needed AND configure the operation behavior
Also see https://jazz.net/library/article/1093 last two chapters.
Michael Besems selected this answer as the correct answer
Comments Also note that a validator is not a Default value provider. You should try to be precise with what you ask.
Thanks that helped me find the answer.
I got the suggestion for this solution from:
But the link in that answer (just above the template) opens on a screen for a validator.
I should have paid more attention to the fact that this was just an example of <a> type of script based action.
Anyway, thanks again I guess you are looking for a default value then.
Please note that there is very little information available (e.g. NOT necessary the type) on creation time. Also carefully read what is supported (and implying the limitations because what is not documented there is not supported). The workshop is more detailed.
I also tried to summarize this in https://rsjazz.wordpress.com/2016/07/15/rtc-process-customization-what-you-can-and-cannot-do/
|