Can you clear out the value in the "Planned For" field using java script
RTC6.0.3 Is there a way to set the timeline back to unassigned(null) using javascript? |
Accepted answer
Ralph Schoon (63.6k●3●36●46)
| answered Oct 30 '18, 3:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Yes, there is a way to do that. Ralph Schoon selected this answer as the correct answer
Comments
nannette Mori
commented Oct 30 '18, 10:16 a.m.
Can you give me an example of how to set the value to null using java script?
Ralph Schoon
commented Oct 30 '18, 10:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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:
Ralph Schoon
commented Oct 30 '18, 1:26 p.m.
| edited Oct 30 '18, 2:34 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
|
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.
Comments
Based on what event and why?
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.