How do I set a Contributor attribute from a Javascript based Calculated Value?
One answer
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.
Comments
Jonas Studer
Jan 16 '15, 7:43 a.m.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