how to edit of WI updates condition
I have configured a Script-based calculated value.
my script is taking 'actual start time' where status changes to 'in progress'. But in WI, whenever a save happened, its updating 'actual start time'. Can you tell me how to edit of WI updates condition. |
Accepted answer
even if you get it to record the time only on a state change (this is currently not possible as a save will invoke the script forcing it to return some value and hence inducing a changed attribute value), if the worflow allows a reopen (and possible revisit of the same state), the condition will be true again and a possible second assignment of the attribute value...
Ayan Paul selected this answer as the correct answer
|
2 other answers
Hi Ayan,
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. Comments
Ayan Paul
commented Dec 10 '12, 2:38 a.m.
but in that case, we wont get the proper actual start date as it is getting modified
Ayan Paul
commented Dec 10 '12, 3:14 a.m.
I have the dependency on WI Type and WI Status. Please let me know how I can rectify this issue. Thanks in advance
|
Ralph Schoon (63.6k●3●36●46)
| answered Dec 10 '12, 3:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Then this is not doable with JavaScript. JavaScript has no mechanism to detect the state change as far as I can tell.
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
Ayan Paul
commented Dec 10 '12, 4:12 a.m.
it is possible. see the example, I m identifying state and type and accordingly taking the date.
Great if it works for you.
|
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
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.