It's all about the answers!

Ask a question

workingCopy.getValue attribute in javascript plugin


David MICHEL (1472448) | asked Nov 13 '12, 10:43 a.m.
edited Mar 21 '13, 12:12 p.m. by Ralph Schoon (63.1k33645)
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



permanent link
Ralph Schoon (63.1k33645) | 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.

Your answer


Register or to post 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.