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?
|
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Jan 19 '15, 4:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
|
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.
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