RTC6.0.3
Our CR workflow has to different workflows, one that will use the "Planned For" Field and the other workflow where the "Planned For" field will be used if the CR is associated with an Epic workitem. I implemented a validator that gets the Value of the Epic (yes/no) enumeration field and if the Planned For is unassigned it throws an error "Increment must be set" However if for some reason the user sets the Epic field back to "No" we wanted to set the "Planned For" field back to "Unassigned"(null) using the java script.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPEROct 30 '18, 10:27 a.m.
You return null in a calculated value.
/***********
* 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.eraseTarget");(function() {
dojo.declare("com.example.eraseTarget", null, { getValue: function(attribute, workItem, configuration) {
var target = workItem.getValue("target");
var prio = workItem.getLabel("internalPriority");
if(prio!=null && prio=="High"){
return null;
}
return target;
}
});
})();
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPEROct 30 '18, 2:34 p.m.
See https://rsjazz.wordpress.com/2016/07/15/rtc-process-customization-what-you-can-and-cannot-do/
Attribute customization only allows to return values to a specific attribute. It is not possible (from the described API) to change another attribute.
The approach above is a calculated value that checks if the event to erase attribute "target" happens and then returns null. It returns the current value otherwise.
Note that attribute customization is for all attribute types that have the attribute - or you need to check the type, etc.
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.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 29 '18, 2:16 p.m.nannette Mori
Oct 29 '18, 2:33 p.m.