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
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Mar 21 '14, 4:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Did you configure the Attribute Validation Advisor and set the Severity to Error?
Comments
Rachel Biderman
commented Mar 21 '14, 8:22 a.m.
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 " 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:
< and >.
Rachel Biderman
commented Mar 22 '14, 3:00 p.m.
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
|
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.
|
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.