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

How to prevent Work Item summary from including the character "?

 We want some special characters not to be allowed - i was able to define a validation script using Regex.
When testing in the process template: "Try sample text" it all works fine.
Any string with " is marked as invalid.
But when i actually give a work item summary value with quotes (") it allows to save and no issue.

All other chars i prevented work fine and are not allowed.
I don't really understand why quotes is working in test sample but not in actual summary.
Am i missing anything?

The regex i used is: ^[^<>'\"/`@#:\\,]*$
Thanks

0 votes



2 answers

Permanent link
Did you configure the Attribute Validation Advisor and set the Severity to Error?

0 votes

Comments

Yes, of course I did.

Otherwise non of the other character restriction would work.
The issue seems to be only with quotes, although as I mentioned in the validation condition configuration section, when I test sample with quotes is says it is invalid.
 

I hope someone with a better grasp on regexp comes up with an idea.

It seems my regular expression is correct

but when it is stored in the process configuration - it translates the quotes from:
\" to &quot which is the one used to validate the summary and that is why it is not working.
it is the same issue with the characters: < and > which are translated as well to:
&lt and &gt.

sorry, i meant < > (not rectangle brackets which are working ok []) 

use the hex  values instead of the text values , \x3c = < and \x3e = > , \x22 = double quote

This is odd.I would consider this behavior problematic. I think you should open a PMR. If there is a need to translate the data to store it, I think thins kind of translation should be done correctly while saving.

showing 5 of 6 show 1 more comments

Permanent link
 I got an answer from IBM:
They suggested i use the chars i do allow rather than the ones i don't.
It is not trivial listing all allowed ones, in oppose to the ones i don't - but it solved the problem.

0 votes

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: Mar 21 '14, 3:10 a.m.

Question was seen: 4,458 times

Last updated: Apr 07 '14, 3:25 p.m.

Confirmation Cancel Confirm