From 4598959bc245e2fd9200c77a5326a46a8c31785d Mon Sep 17 00:00:00 2001
From: Denis Flaven
Date: Mon, 14 Nov 2011 10:43:06 +0000
Subject: [PATCH] - Reload the object after applying a stimulus, in case an
action has an effect on an external field...
SVN:1.2[1664]
---
pages/UI.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pages/UI.php b/pages/UI.php
index 32800623de..d576ac92f2 100644
--- a/pages/UI.php
+++ b/pages/UI.php
@@ -393,6 +393,7 @@ function ApplyNextAction(Webpage $oP, CMDBObject $oObj, $sNextAction, $oMyChange
}
$oObj->DBUpdateTracked($oMyChange);
}
+ $oObj->Reload();
$oObj->DisplayDetails($oP);
}
else
@@ -842,7 +843,7 @@ try
$currValue = $oObj->Get($sAttCode);
if ($oAttDef instanceof AttributeCaseLog)
{
- $currValue = '';
+ $currValue = ' '; // Don't put an empty string, in case the field would be considered as mandatory...
}
if (is_object($currValue)) continue; // Skip non scalar values...
if(!array_key_exists($currValue, $aValues[$sAttCode]))
@@ -2006,6 +2007,7 @@ EOF
$oP->p(implode('
', $aErrors));
}
}
+ $oObj->Reload();
$oObj->DisplayDetails($oP);
}
else