N°6201 - Change a CI role to "computed" in pop-up freeze the screen

This commit is contained in:
Benjamin Dalsass
2023-04-19 14:03:15 +02:00
parent e436f9bf8d
commit b2c0c5253a

View File

@@ -641,44 +641,43 @@ JS;
}
}
}
if ($bDisplayDetails)
{
$oObj = MetaModel::GetObject(get_class($oObj), $oObj->GetKey()); //Workaround: reload the object so that the linkedset are displayed properly
$sNextAction = utils::ReadPostedParam('next_action', '');
if (!empty($sNextAction))
{
try
{
ApplyNextAction($oPage, $oObj, $sNextAction);
}
catch (ApplicationException $e)
{
$sMessage = $e->getMessage();
$sSeverity = 'info';
ReloadAndDisplay($oPage, $oObj, 'update', $sMessage, $sSeverity);
}
}
else
{
// Nothing more to do
$sMessage = isset($sMessage) ? $sMessage : '';
$sSeverity = isset($sSeverity) ? $sSeverity : null;
if ($this->IsHandlingXmlHttpRequest()) {
;
} else{
ReloadAndDisplay($oPage, $oObj, 'update', $sMessage, $sSeverity);
}
}
if ($bDisplayDetails) {
$oObj = MetaModel::GetObject(get_class($oObj), $oObj->GetKey(), false); //Workaround: reload the object so that the linkedset are displayed properly
$bLockEnabled = MetaModel::GetConfig()->Get('concurrent_lock_enabled');
if ($bLockEnabled)
{
// Release the concurrent lock, if any
$sOwnershipToken = utils::ReadPostedParam('ownership_token', null, 'raw_data');
if ($sOwnershipToken !== null)
{
// We're done, let's release the lock
iTopOwnershipLock::ReleaseLock(get_class($oObj), $oObj->GetKey(), $sOwnershipToken);
if ($oObj === null) {
// N°6201 - Change a CI role to "computed" in pop-up freeze the screen
// Here, the Object might have been removed by impact analysis, we consider this transaction as succeeded.
$aResult['success'] = true;
} else {
$sNextAction = utils::ReadPostedParam('next_action', '');
if (!empty($sNextAction)) {
try {
ApplyNextAction($oPage, $oObj, $sNextAction);
}
catch (ApplicationException $e) {
$sMessage = $e->getMessage();
$sSeverity = 'info';
ReloadAndDisplay($oPage, $oObj, 'update', $sMessage, $sSeverity);
}
} else {
// Nothing more to do
$sMessage = isset($sMessage) ? $sMessage : '';
$sSeverity = isset($sSeverity) ? $sSeverity : null;
if ($this->IsHandlingXmlHttpRequest()) {
;
} else {
ReloadAndDisplay($oPage, $oObj, 'update', $sMessage, $sSeverity);
}
}
$bLockEnabled = MetaModel::GetConfig()->Get('concurrent_lock_enabled');
if ($bLockEnabled) {
// Release the concurrent lock, if any
$sOwnershipToken = utils::ReadPostedParam('ownership_token', null, 'raw_data');
if ($sOwnershipToken !== null) {
// We're done, let's release the lock
iTopOwnershipLock::ReleaseLock(get_class($oObj), $oObj->GetKey(), $sOwnershipToken);
}
}
}
}