Web Client javascript validator message shown twice - bug or something I did wrong?
![]()
Susan Hanson (1.6k●2●191●193)
| asked Jul 29 '13, 10:01 p.m.
edited Jul 30 '13, 2:23 a.m. by Ralph Schoon (61.5k●3●36●43)
I've recently added a JavaScript-based validator on the FiledAgainst attribute and enabled Attribute Validation.
If I modify a work item such that the validator will cause an Error message and click Save: 1) in the Eclipse Client, I get a single copy of my message at the top: Invalid value of attribute 'Filed Against': The work item owned by an individual must be Filed Against a team backlog. Set the Filed Against attribute to your teams' backlog. (the part after the : is my message). 2) In the Web client, the same thing shows the error at the top but I get 2 copies: Invalid value of attribute 'Filed Against': The work item owned by an individual must be Filed Against a team backlog. Set the Filed Against attribute to your teams' backlog. Invalid value of attribute 'Filed Against' in work item '66382': The work item owned by an individual must be Filed Against a team backlog. Set the Filed Against attribute to your teams' backlog. Is there something I did incorrectly in my validator? I can't believe so because the Eclipse client shows properly. Susan |
2 answers
![]()
Hello Susan,
try and use Firefox and firebug to determine why / if your code is called twice.
you may add some tracing to your js validator so it will output some trace in the firebug console,
and/or debug your javascript.
Hope it helps.
Eric.
|
![]()
Dear Eric, as you can see, Rachel told that the script was run once at web client, but the message showed twice.
I have the same problem. At my Eclipse client the message shows once, but the same validation, when runs at web client, shows duplicated message. Please help us. |
Comments
Hi Susan,
Using RTC 4.0.6, I've been working on a validator script on the summary attribute. I've been experiencing the same problem that you've described. At save of a invalid summary on the browser, the error message is displayed twice. Did you ever get to the bottom of the problem?
I've tried debugging and I can see the script runs twice on the client side (ie before save) when I run it with Chrome's debugger or firebug and Firefox - but I don't understand why.
Then according to my server-side debugging, using console.log statements, on save the script only runs once - yet I get the error message displayed twice (but not when doing the same thing in the RTC client).
Any help/suggestions gratefully received!
Rachel