Calculated value execution cases
- When a work item is created
- When a work item is saved
- When an attribute which the current attribute depends on is changed
Accepted answer
2 other answers
-
FieldA (Small String, ReadOnly)
- FieldB (Small String)
- Action (Enumeration)
Comments
So, in that case, check for the existence of the window Object - that only exists when you're in the client. If it exists then do the copy, if not then don't.
How can I check it?
/***********
Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2011. All Rights Reserved.
Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
***********/
dojo.provide("com.example.ValueProvider.checkLocation");
(function() {
dojo.declare("com.example.ValueProvider.checkLocation", null, {
getValue: function(attribute, workItem, configuration) {
return window ? "client" : "server";
}
});
})();
getValue: function(attribute, workItem, configuration) {
console.log('here');
if (workItem.getValue(WorkItemAttributes.STATE) === null) {
return 'created';
}
if (window) {
return 'modified';
}
return 'saved';
The API is explained here: https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Calculated_values
I am not aware of an official mechanism that would reveal why the calculated value is run.