Attribute Customizations - Calculated Value - How do I extract a name from the UUID for Creator
![]()
David Murphy (11●1●4●3)
| asked Apr 10 '13, 5:33 p.m.
edited Apr 11 '13, 1:08 a.m. by Ralph Schoon (61.8k●3●36●43)
I want to assign the name of the work item's creator to a custom field. I can figure out how to extract the UUID for the Creator field, but don't know how to fetch the name in the form of a string for my calculated value script from the UUID.
|
2 answers
![]()
currently there is no mechanism to get from UUID to contributor name in Javascript
see https://jazz.net/forum/questions/80964/how-to-get-contributor-name-by-javascript you would have to write a java participant server plugin |
![]()
Ralph Schoon (61.8k●3●36●43)
| answered Apr 11 '13, 1:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Try workItem.getLabel().
Comments getlabel() on what? the UUID or the contributor entry?
instead of
Cannot find function getLabel in object [object com.ibm.team.workitem.shared.common.internal.scripting.facades.WorkItemAPIType]. my js statement: workItem.getLabel(WorkItemAttributes.CREATOR) ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
showing 5 of 7
show 2 more comments
|