It's all about the answers!

Ask a question

workItem.getValue(WorkItemAttributes.MODIFIED_BY) return nothing in web UI

Rafael Rodero (11) | asked Jan 31 '18, 9:20 a.m.
edited Jan 31 '18, 10:06 a.m. by Ralph Schoon (63.3k33646)


We need to populate a custom field, Contributor type, with the value of the attribute Modified by or with the logged in user. So we created the following script. The way the script works is in the eclipse client, but it does not work in the web interface. Could you please correct me on this script? and let us know the right script for my requirement. Thanks in advance


(function() {
dojo.declare("", null, {
getValue: function(attribute, workItem, configuration) {
var WorkItemAttributes =;
//valor padrão;
var result = workItem.getValue("attr.mergeReq.validadoPor");
var status = workItem.getValue(WorkItemAttributes.STATE);
//verifica se o estado é "Aprovado para Entrega"
if(status === "") {
result = workItem.getValue(WorkItemAttributes.MODIFIED_BY);
} else if(status === "") {
result = null;
return result;

Donald Nong commented Jan 31 '18, 11:06 p.m.

Have you done any debugging on the web client? Has the scripted been triggered? Is the variable "status" has the correct value? Does the code workItem.getValue() get called at all?

One answer

permanent link
Rafael Rodriguez Montes (23013130254) | answered Feb 12 '20, 5:58 p.m.

 Hi I have the same issue 


is not giving any value during the modification of a work item, it gives null
I believe this should be corrected for consistency

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.