It's all about the answers!

Ask a question

Get current user for Calculated Value works in Eclipse, not in browser.


Jason Gould (111) | asked Mar 14 '17, 9:58 a.m.
edited Mar 15 '17, 4:04 a.m. by Ralph Schoon (63.6k33646)

Hi,

I am using some javascript to update a calculated value. I want to populate a field with the name of the user that resolves a defect.

I have been using -

var current_user = dojo.getObject("com.ibm.team.repository.web.client.internal.AUTHENTICATED_CONTRIBUTOR");

To do this. I've noticed that this works fine in eclipse and my attribute is correctly assigned. However, when I modify a defect in a browser I then get the value unassigned.

Has anyone else seen this behavior and if so did you manage to fix it?

Thanks,

Jason


Comments
Donald Nong commented Mar 14 '17, 9:11 p.m.

Shouldn't this be the other way round? The variable that you use should be available in the Web UI only - note the "web" in its name.


Ralph Schoon commented Mar 15 '17, 3:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Agreed, that call will only work in the web UI and we have also commented that everywhere on the forum. 


Jason Gould commented Mar 16 '17, 3:46 a.m.

 I agree, that this should be web only - that's why I'm confused... I expected to have problems in Eclipse and I'm seeing the opposite. I wondered if anyone else had seen similar.


Donald Nong commented Mar 17 '17, 12:01 a.m.

No offense, but is it possible that you are looking at the wrong place? That is, the code that you quoted is not that one updating the attribute. If you can still do debugging (assuming not a production), you sure can get more information about it.

Be the first one to answer this question!


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.