It's all about the answers!

Ask a question

RTC / EWM: How do I get the current user name?


Franca Zober (1512) | asked May 05 '21, 9:59 a.m.
Hi,

having spent hours trying to make this work reading a lot of answers to similar questions also in this forum, I still cannot get it done. Mainly I am stuck on three points, and hopefully someone can point me in the right direction:

1) Main point: How do I get the current user name?

with
dojo.require("com.ibm.team.repository.web.client.session.Session");
[...]
loggedIn = com.ibm.team.repository.web.client.session.getAuthenticatedContributor().itemId;
I can successfully get the current user's ID. What I would like to get is the name (as one can see when selecting in a contributor field).

2) As I read it in different answer from years ago, at least back then it was not possible to return above itemId in a script used for a calculated field in order to alter a custom contributor attribute. Is this still the case? No chance to set a contributor field with a calculated value script?

3) Where can I find the reference/specification for above used get-Authenticated...-method? I do have the "Jazz Client API Specification" but that so it seams does not cover com.ibm.team.repository.web.*

Thanks in advance for your helpful comments!

regards
Franca

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.