how to edit of WI updates condition
Accepted answer
2 other answers
Any save operation will trigger the execution of scripts.
Below is an extract from Attribute Customization Wiki which states the three conditions where a script gets executed:
hence the behavior you are experiencing appears to me to be expected.If you configure a Script-based calculated value, the script will be executed in three cases:
- When a work item is created, the script is executed
- When a work item is saved, the script is executed to recalculate the value.
- When an attribute which the current attribute depends on is changed, the value of the current attribute is recalculated. Depending on the presentations of the two attributes this may not work in all cases.
Comments
but in that case, we wont get the proper actual start date as it is getting modified
How can it be rectified? I want only at the time of status changes to 'in progress', it will take actual start date.
I have the dependency on WI Type and WI Status. Please let me know how I can rectify this issue. Thanks in advance
You need to create an Advisor or Participant.
See https://jazz.net/library/article/1000 or the other versions for your version of RTC and check https://rsjazz.wordpress.com/ for some other examples.
Comments
it is possible. see the example, I m identifying state and type and accordingly taking the date.
(type == "issue" && state =="com.ibm.team.workitem.issueWorkflow.state.s7")
Great if it works for you.
My concern is the script will trigger if the state changes as well as if the type changes or any other dependent attributes you might have. It might even trigger multiple times if multiple changes occur. You can not tell what the value of the attributes were before, so it is hard to tell that the state changed. However, great if it works for your special case.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Dec 10 '12, 2:40 a.m.As far as I can tell, there is no way to tell a state change in a script today. If your script has only the dependency to the state attribute, you might be able to use that because it will trigger on saving the state. If a state change needs to be detected, I usually use an Advisor or Participant.