How to set a date on change of a workitem state?
One answer
The only reliable way of doing this, would be by developing a custom follow up server extension.
See here how to get started. Most important is the Rational Team Concert Extensions Workshop. The blog has some errata for that workshop for recent versions.
EWM has attribute customization, that provides calculated values, but unfortunately there is no way to react on a state change. All you can do, is to create a script based calculated value for that attribute. However, it would detect the state change, after the state has actually happened and you would require an additional save. You would have to check if the attribute is already set and then decide based on that, if you want to re-set it.
Here some valuable reading: https://rsjazz.wordpress.com/2022/11/25/ewm-attribute-customization-introduction/
I do not find that approach reliable. I would prefer implement a follow up action server extension. This requires to be able to deploy on the server which might be an issue. There is no simple answer here.