What is wrong with my Validator
I created a validator called TimeSpent.
I entered a regular expression (\d*h)|(\d*m)|(\d*h[ \t]\d*m)
what the expression is meant to validate is that the user entere the value of Time Spent as :
3h OR 3m OR 3h<space>3m
When I test this using "Try the Regular Expression on sample Text" within the "Attribute Customisation" window and I enter 3h 3m no ettor(red cross) is shown BUT
when I create the WI and enter 3h 3m , the red cross appears
I entered a regular expression (\d*h)|(\d*m)|(\d*h[ \t]\d*m)
what the expression is meant to validate is that the user entere the value of Time Spent as :
3h OR 3m OR 3h<space>3m
When I test this using "Try the Regular Expression on sample Text" within the "Attribute Customisation" window and I enter 3h 3m no ettor(red cross) is shown BUT
when I create the WI and enter 3h 3m , the red cross appears
3 answers
Here is the work item I created to track this issue:
Regular expression sample text behaves differently to work item validated text
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=392457
Hi Ian,
Even the "calculated values" feature does not seem to work, I have spent a week on trying to get it to work. The Java script does not seem to fire no matter what I do. Can you raise a defect for this too. Here is the link
https://jazz.net/forum/questions/222094/why-is-this-script-not-returning-any-calculated-value?utm_campaign=forum&utm_medium=email&utm_source=forum-new-comment&utm_content=forum-question
Even the "calculated values" feature does not seem to work, I have spent a week on trying to get it to work. The Java script does not seem to fire no matter what I do. Can you raise a defect for this too. Here is the link
https://jazz.net/forum/questions/222094/why-is-this-script-not-returning-any-calculated-value?utm_campaign=forum&utm_medium=email&utm_source=forum-new-comment&utm_content=forum-question
Comments
This feature will work when all the stars are aligned. I made a suggestion in the other forum question, but essentially, you need to get some kind of message feedback at the beginning or else you may never have a basis for debugging. With your super pared down example, I would add console.log(); messages. If you are using Tomcat it may be easier to find the console.log messages. Note that there are times you need to check both the server and client to find the console.log messages.
Server: JazzTeamServer/server/tomcat/work/Catalina/localhost/ccm/eclipse/workspace/.metadata/.log
Eclipse client: client/eclipse/workspace/.metadata/.log
If you can manage to stop at a breakpoint (you may need to use an old version of a browser) then the below article gives good explanation for how to set up Javascript debug:
Debugging attribute customization scripts - an example