It's all about the answers!

Ask a question

Web Client javascript validator message shown twice - bug or something I did wrong?


Susan Hanson (1.6k2201194) | asked Jul 29 '13, 10:01 p.m.
edited Jul 30 '13, 2:23 a.m. by Ralph Schoon (63.1k33645)
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



Comments
Rachel Alderman commented May 23 '14, 11:18 a.m.

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

2 answers



permanent link
José Humberto Cruvinel (613) | answered Jul 25 '14, 1:54 p.m.
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.

permanent link
Eric Jodet (6.3k5111120) | answered Jul 30 '13, 2:57 a.m.
JAZZ DEVELOPER
 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.

Your answer


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