How to set an attribute based on the time WI is loaded?
Hi guys,
Accepted answer
I believe you are thinking of a "script-based calculated value", not a "script-based value set. But that doesn't help, because changes to the calculated value are triggered by a save of the work item, not by a "load" of the work item (I assume by "load", you mean when the work item is retrieved from the server via a GET call).
Comments
Geoffrey,
Sorry for the late, but what I was trying to do was to show the time a workitem was in a status. I've created an attribute that records the time the workitem has the status changed. So, If there was a way to figure out the time when the workitem was loaded, I could calculate "time_workitem_loaded" minus "time_status_changed", then I would have the time the workitem is in the status.
Did you understand me?
One other answer
Did you even read the answer? An attribute customization using what the basic JavaScript attribute customization allows will NOT work.
Here is an approach that works for the Web UI, dependent on the requirements: Custom RTC work item presentation showing the state history.