diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index b529f97f8..88d4a2f20 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3764,7 +3764,15 @@ EOF $oPage->add(''); } } - + + /** + * @param $sCurrentState + * @param $sStimulus + * @param $bOnlyNewOnes + * @return array + * @throws ApplicationException + * @deprecated Since iTop 2.4, use DBObject::GetTransitionAttributes() instead. + */ public function GetExpectedAttributes($sCurrentState, $sStimulus, $bOnlyNewOnes) { $aTransitions = $this->EnumTransitions(); diff --git a/pages/UI.php b/pages/UI.php index ba8362efb..967a7bf39 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -88,7 +88,7 @@ function ApplyNextAction(Webpage $oP, CMDBObject $oObj, $sNextAction) throw new ApplicationException(Dict::Format('UI:Error:Invalid_Stimulus_On_Object_In_State', $sNextAction, $oObj->GetName(), $oObj->GetStateLabel())); } // Get the list of missing mandatory fields for the target state, considering only the changes from the previous form (i.e don't prompt twice) - $aExpectedAttributes = $oObj->GetExpectedAttributes($oObj->GetState(), $sNextAction, true /* $bOnlyNewOnes */); + $aExpectedAttributes = $oObj->GetTransitionAttributes($sNextAction); if (count($aExpectedAttributes) == 0) {