How can we write script based validators and condition scripting in RTC to display warning message for certain attributes when user wont input the value?
![]()
rkRash 123 (11●3●19)
| asked Oct 16 '17, 4:59 a.m.
edited Oct 16 '17, 5:54 a.m. by Ralph Schoon (63.3k●3●36●46) HI All,
|
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Oct 16 '17, 5:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You are mixing several concepts. I would really suggest to read some of the referenced articles
Making attributes required/mandatory is supported in different ways
1. For work item type and state
2. For conditions - only for this you need JavaScript or Java extensions
There is no way to specify an "Error Message" the UI will show a marker at the attribute and saving will fail if there is no value in a required attribute.
Validations can be specified as well. The "Error Message" is basically specified in the configuration of the validation and not in the script - the script basically only returns an error or a warning or OK.
Read:
For a more detailed how to with examples: https://jazz.net/library/article/1093
Comments Thanks Ralph,
JavaScript has only access to work item attribute information. You would have to determine the project area based on one of the attributes of the work item and code it into the script. Not a nice solution. I am not sure if I would take that route. You could try to use required attributes preconditions in the child project area. A much cleaner solution, I think.
Anyway,
https://jazz.net/library/article/1003#attributecustomization points to the Wiki and the other link I also already sent has examples. Consider reading them. They both point to the Wiki with some more JavaScript syntax.
Also read https://rsjazz.wordpress.com/2016/07/15/rtc-process-customization-what-you-can-and-cannot-do/ to get an idea what the limitations are.
|
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.