workingCopy.getValue attribute in javascript plugin
![]()
David MICHEL (147●20●45)
| asked Nov 13 '12, 10:43 a.m.
edited Mar 21 '13, 12:12 p.m. by Ralph Schoon (62.0k●3●36●43)
Hello everybody,
In the article, https://jazz.net/library/article/782/ , the following source code is used: this._currentPArea = new String(this.workingCopy.getValue({ path: "attributes.projectArea.id"})); I wish to use the same syntax to get the value of my own attribut. For example I have the ID,com.ibm.team.workitem.attribute.myattribute, for the attribut:myattribute (string or enumeration type) Could you tell me if someone have already used it ? If yes, do you have a code source example ? I have tried: var myvar=this.workingCopy.getValue({path: "attributes.com.ibm.team.workitem.attribute.myattribut"}). When I want to display variable myvar, I get "[Object object]". I don't know what kind of object I have got. Is it the good way to use this method to get the value of attribut in a javascript plugin ? Thank in advance for your help. Best regards . |
One answer
![]()
Ralph Schoon (62.0k●3●36●43)
| answered Mar 21 '13, 12:14 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In workitem customization - JavaScript, the API is simpler and does only allow to access the value using wirkItem.getValue("<ID>") or workItem.getLabel("<ID>"). See https://jazz.net/library/article/1093 Lab 5 for more information.
|