RTC custom work item script-based validator for unique value
I need to identify a method of ensuring a unique value in a small string attribute of a custom work item within Rational Team Concert (RTC). Ideally, the simplest solution, such as a database column constraint, would be best. However, a script-based validator for the attribute would be acceptable as well. If a script-based validator is the best or only method to accomplish this desired action the actual code to implement this solution would be helpful. |
Accepted answer
Script-based validators are based on, JavaScript. I would imagine it is painfully slow if you implement it this way. To ensure the uniqueness, you will have to retrieve all existing work items and compare the intended value with the existing values, which can take a long time.
Darin Hodgson selected this answer as the correct answer
Comments
Darin Hodgson
commented Jun 28 '17, 11:19 a.m.
Unfortunately, a timestamp (in milliseconds) would not meet the requirement. I understand your response that since the JavaScript would need to "retrieve all existing work items and compare the intended value with existing values..." and that this would be time consuming. Based on this information we'll not expend any more effort on using a script-based validator for the purpose of preventing a duplicate attribute value from being entered. Instead, maybe we'll just attempt to train our users to look for the existence of the value before entering a new work item. Thanks for the response. |
One other answer
Ralph Schoon (63.6k●3●36●46)
| answered Jun 28 '17, 1:00 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Maybe get inspiration here:
|
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.