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_designxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="3.0"><constants></constants><classes><classid="Change"_delta="if_exists"><methods><methodid="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><classid="NormalChange"_delta="if_exists"><lifecycle><states><stateid="plannedscheduled"><transitions><transitionid="ev_approve"><actions><action_delta="define"><verb>SetCurrentDate</verb><params><paramxsi:type="attcode">approval_date</param></params></action></actions></transition></transitions></state></states></lifecycle></class><classid="EmergencyChange"_delta="if_exists"><lifecycle><states><stateid="plannedscheduled"><transitions><transitionid="ev_approve"><actions><action_delta="define"><verb>SetCurrentDate</verb><params><paramxsi: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>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.