It's all about the answers!

Ask a question

How to get attribute value of other work item using Calculated value scripts

Shahana Shaikh (133) | asked Aug 20 '19, 8:51 a.m.
edited Aug 20 '19, 10:47 a.m. by Ralph Schoon (63.2k33646)

 I want to fetch value of an attribute from other work item by using its workitem ID and use it in current work item. Can we do this using calculated scripts?

Accepted answer

permanent link
Ralph Schoon (63.2k33646) | answered Aug 20 '19, 10:51 a.m.

For all I know this is not supported in attribute customization. See With attribute customization I mean what is covered in and .

There is a work item proxy which is not supported API that has been used for access across links It might be possible to use REST and other calls as well.

Shahana Shaikh selected this answer as the correct answer

Shahana Shaikh commented Aug 21 '19, 2:43 a.m.

 Thanks Ralph. 

I tried the work item proxy but as soon as i added (var WorkItemProxyFactory = to my script it stopped working. Any suggestions?

(function() {
var WorkItemAttributes=;
var WorkItemProxyFactory =;

dojo.declare("example.calculated.testScript", null, {

getValue: function(attributeId, workItem, configuration) {
var workitem = workItem.getLabel('workitem_att');

var index = workitem.indexOf(':');
if(index > 0){
var workitemId = workitem.substr(0,index);

return workitemId.toString();

Davyd Norris commented Aug 21 '19, 8:00 p.m.
WorkItemProxy and WorkItemProxyFactory are both available in the web client only, so your script will fail if the code is run by the Eclipse client or the server.

It may be that your calculated value script is being run on the server side. Comment out the proxy lines, put a console.log('Hi there'); line somewhere in your script and then try running it with the web console open. If you see the comment in the web console then your code is running on the client, if you see it in ccm.log then it's running on the server.

Shahana Shaikh commented Aug 23 '19, 12:15 a.m.

Thanks Davyd 

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.