diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index 9059107e6d..f5bf8269c7 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -2380,7 +2380,7 @@ EOF
return $oObj->DisplayModifyForm( $oPage, $aExtraParams);
}
- public function DisplayStimulusForm(WebPage $oPage, $sStimulus)
+ public function DisplayStimulusForm(WebPage $oPage, $sStimulus, $aPrefillFormParam = null)
{
$sClass = get_class($this);
$iKey = $this->GetKey();
@@ -2422,6 +2422,12 @@ EOF
$oPage->add("
$sActionDetails
\n");
$sTargetState = $aTransitions[$sStimulus]['target_state'];
$aExpectedAttributes = $this->GetTransitionAttributes($sStimulus /*, current state*/);
+ if ($aPrefillFormParam != null)
+ {
+ $aPrefillFormParam['expected_attributes'] = $aExpectedAttributes;
+ $this->PrefillForm('state_change', $aPrefillFormParam);
+ $aExpectedAttributes = $aPrefillFormParam['expected_attributes'];
+ }
$sButtonsPosition = MetaModel::GetConfig()->Get('buttons_position');
if ($sButtonsPosition == 'bottom')
{
diff --git a/pages/UI.php b/pages/UI.php
index b0721dd35e..110a07acf2 100644
--- a/pages/UI.php
+++ b/pages/UI.php
@@ -1485,8 +1485,7 @@ EOF
'stimulus' => $sStimulus,
'origin' => 'console'
);
- $oObj->PrefillForm('state_change', $aPrefillFormParam);
- $oObj->DisplayStimulusForm($oP, $sStimulus);
+ $oObj->DisplayStimulusForm($oP, $sStimulus, $aPrefillFormParam);
}
else
{