Pornsawan - 2025-02-19

I'm using iTop version 3.0.3.
In this version, the approval date in change management appears as empty because there is no approval date field for state approve. I want the approval date to be set automatically once the change is approved.

Can you help me with the code? Here is my current code.

<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0">
  <constants>
  </constants>
  <classes>
    <class id="Change" _delta="if_exists">
      <methods>
        <method id="SetApprovalDate" _delta="define">
                    <comment><![CDATA[/**
                    * To be deprecated: use SetCurrentDate() instead
                    * @return void
                    */]]></comment>
                    <static>false</static>
                    <access>public</access>
                    <type>LifecycleAction</type>
                    <code><![CDATA[ public function SetApprovalDate($sStimulusCode)
                    {
                        $this->Set('approval_date', time());
                        return true;
                    }]]></code>
                </method>
      </methods>
    </class>
    <class id="NormalChange" _delta="if_exists">
      <lifecycle>
        <states>
          <state id="plannedscheduled">
            <transitions>
              <transition id="ev_approve">
                <actions>
                  <action _delta="define">
                    <verb>SetCurrentDate</verb>
                    <params>
                      <param xsi:type="attcode">approval_date</param>
                    </params>
                  </action>
                </actions>
              </transition>
            </transitions>
          </state>
        </states>
      </lifecycle>
    </class>
    <class id="EmergencyChange" _delta="if_exists">
      <lifecycle>
        <states>
          <state id="plannedscheduled">
            <transitions>
              <transition id="ev_approve">
                <actions>
                  <action _delta="define">
                    <verb>SetCurrentDate</verb>
                    <params>
                      <param xsi:type="attcode">approval_date</param>
                    </params>
                  </action>
                </actions>
              </transition>
            </transitions>
          </state>
        </states>
      </lifecycle>
    </class>
  </classes>
  <user_rights>
    <groups>
    </groups>
    <profiles>
    </profiles>
  </user_rights>
</itop_design>