Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do I set a Contributor attribute from a Javascript based Calculated Value?

 I need to set a Contributor (e.g. Owner) in Javascript. Somehow I guess that I need to get the user id. How can I find that from a given username?

0 votes

Comments

I've built my own user-management to do such things...

Get the users through this script
"dojo.provide("com.ibm.team.process.web.client.internal.ProcessClient")"

Use this method to do so:
function getMembersPaged(args, responseHandler){

Then parse throught the loaded datas..

Or the second and mybe better solution, is to load them via REST-Calls
There you could set the params you'll need.
Those scripts I suggested first are not open and not declared in the API



One answer

Permanent link
You can not find the User ID from a given user name in a JavaScript attribute customization. You can print the ID and then put it into a script. See https://jazz.net/library/article/1093 Lab 5 for more explanations and examples. See https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ for how to use Java instead, where you have more access to complex items.

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,926
× 152

Question asked: Jan 16 '15, 7:29 a.m.

Question was seen: 3,946 times

Last updated: Jan 19 '15, 4:24 a.m.

Confirmation Cancel Confirm