It's all about the answers!

Ask a question

validation script for comparing two string values

Naveen Chandani (4812022) | asked Jun 19 '12, 3:09 a.m.

I have got 3 attributes with the data type as String (Attribute1, Attribute2, Attribute3). I want to write a validation script which will ensure that the value entered by user for Attribute1 is equal to the sum of values entered for Attribute2 and Attribute3. Could you please help me with the script.

One answer

permanent link
Gabriel Enriquez (3463) | answered Jun 19 '12, 5:47 p.m.
Please refer to Attribute Customization.

Gabriel Enriquez, IBM Rational, Tracking & Planning

Marc Towersap commented Feb 12 '13, 6:50 p.m.

that wiki isn't very good.  I'm looking at this now, and, after enabling the attachments, still not sure how this is working.

I downloaded the example code for Custom Validator code, modified it a tiny bit (which may or may not break, no clue). Reloaded it... and then what?  Right after that you go deeper into some of the API stuff, which would be nice later once I can prove I can actually call a javascript file.  Why have you not added a newbie section detailing something obvious yet useful where validation might actually be of use and really doing it and showing it works?  Much of this drowns you in information that will be useful later, but for now, it kinda sucks.

Gabriel Enriquez commented Feb 12 '13, 7:23 p.m.

Hi Marc,

There is a working example (script-based validation) in that wiki under: Attribute Customization: Validation.

Please file a new question in the forum, if you have a more specific situation.

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.