Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



3 answers

Permanent link
 I can reproduce this issue on RTC 6.0.1. I have tried a few other options such as the below, but while they work in the sample section, they do not work in the work item itself.

(\d*h)|(\d*m)|(\d*h[ \t]{1}\d*m) 

Let me create a defect for it.

0 votes


Permanent link
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

0 votes

Comments

I don't have access to to save the defect WI you created so I am unable to attach screen shots


Permanent link
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

0 votes

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

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121

Question asked: May 26 '16, 11:22 p.m.

Question was seen: 1,803 times

Last updated: May 30 '16, 2:57 a.m.

Confirmation Cancel Confirm