Attribute Customizations - Calculated Value - How do I extract a name from the UUID for Creator

2 answers

Comments

getlabel() on what? the UUID or the contributor entry?

instead of
var uuid= workItem.getValue(
WorkItemAttributes.OWNER
);
try using
var name_or_id = workItem.getLabel(
WorkItemAttributes.OWNER
);
I am not sure if it returns the readable user ID or the user name though.

Cannot find function getLabel in object [object com.ibm.team.workitem.shared.common.internal.scripting.facades.WorkItemAPIType].
my js statement: workItem.getLabel(WorkItemAttributes.CREATOR)

I used it in https://jazz.net/library/article/1093 Lab 5 and it works for me. It might have been introduced in 4.0.

I am using your js and I am erroring out on this statement,
out+="Creator Name: " + workItem.getLabel(WorkItemAttributes.CREATOR)+"\n";
Tried this with RTC 4.0.1

I am using my lab 5 solution files from https://jazz.net/library/article/1093 (calculated against the description) and it works for me in 4.0.1. It actually provides the name and not the ID.

works fine when you use the right client, duh, thanks