HOR-1319 "Registros corruptos: Crea 2 registros de un Elemento..." SOLVED

Issue:
    Registros corruptos: Crea 2 registros de un Elemento con 2 Tareas, se debe borrar los q no se usan
Cause:
    - El problema se presenta cuando se tiene la combinacion gateway-to-gateway y al hacer (por ejemplo) un movimiento
      de algun elemento del proceso y posteriormente guardarlo. Esto ocasiona que se creen registros corruptos en las tablas
      TASK, ROUTE y ELEMENT_TASK_RELATION
    - Este problema fue ocasionado por:
          > Commit: 137a4ea2237573a54964414f477e13a4f5c76a5d, Card: PMLOCAL-3840
      El commit 137a4ea2237573a54964414f477e13a4f5c76a5d tambien origino los siguientes issues:
          > Commit: 6bb8ad6cc05a3d8e671baa5d358b409c1f2710f6, Card: HOR-421
          > Commit: 9e8030904a4c0f4f670fc159c9220fead10a5859, Card: PMLOCAL-4270
          > Commit: d3296132bf13f81aee12c0f7696d5952d79ee323, Card: HOR-1383
          > Commit: b58dc888c1f54d981fc329c3a35cb4294785e0f7, Card: HOR-1358
Solution:
    Se revirtieron los cambios de los commits involucrados, con el siguiente detalle:
        - Commit 137a4ea2237573a54964414f477e13a4f5c76a5d: Se revirtio el cambio; se soluciono el problema problema planteado en el card
        - Commit 6bb8ad6cc05a3d8e671baa5d358b409c1f2710f6: Se revirtio el cambio; se soluciono el problema problema planteado en el card
        - Commit 9e8030904a4c0f4f670fc159c9220fead10a5859: Se revirtio el cambio
        - Commit d3296132bf13f81aee12c0f7696d5952d79ee323: Se revirtio el cambio
        - Commit b58dc888c1f54d981fc329c3a35cb4294785e0f7: Se revirtio el cambio; se soluciono el problema planteado segun el analisis del commit
This commit is contained in:
Victor Saisa Lopez
2016-07-26 15:34:52 -04:00
parent d58967138c
commit bf115b86ca
16 changed files with 249 additions and 305 deletions

View File

@@ -255,6 +255,12 @@ abstract class BaseProcess extends BaseObject implements Persistent
*/
protected $pro_itee = 1;
/**
* The value for the pro_action_done field.
* @var string
*/
protected $pro_action_done = '';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -729,6 +735,17 @@ abstract class BaseProcess extends BaseObject implements Persistent
return $this->pro_itee;
}
/**
* Get the [pro_action_done] column value.
*
* @return string
*/
public function getProActionDone()
{
return $this->pro_action_done;
}
/**
* Set the value of [pro_uid] column.
*
@@ -1567,6 +1584,28 @@ abstract class BaseProcess extends BaseObject implements Persistent
} // setProItee()
/**
* Set the value of [pro_action_done] column.
*
* @param string $v new value
* @return void
*/
public function setProActionDone($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->pro_action_done !== $v || $v === '') {
$this->pro_action_done = $v;
$this->modifiedColumns[] = ProcessPeer::PRO_ACTION_DONE;
}
} // setProActionDone()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -1660,12 +1699,14 @@ abstract class BaseProcess extends BaseObject implements Persistent
$this->pro_itee = $rs->getString($startcol + 37);
$this->pro_action_done = $rs->getString($startcol + 38);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 37; // 37 = ProcessPeer::NUM_COLUMNS - ProcessPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 39; // 39 = ProcessPeer::NUM_COLUMNS - ProcessPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating Process object", $e);
@@ -1983,6 +2024,9 @@ abstract class BaseProcess extends BaseObject implements Persistent
case 37:
return $this->getProItee();
break;
case 38:
return $this->getProActionDone();
break;
default:
return null;
break;
@@ -2041,6 +2085,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
$keys[35] => $this->getProCost(),
$keys[36] => $this->getProUnitCost(),
$keys[37] => $this->getProItee(),
$keys[38] => $this->getProActionDone(),
);
return $result;
}
@@ -2186,6 +2231,9 @@ abstract class BaseProcess extends BaseObject implements Persistent
case 37:
$this->setProItee($value);
break;
case 38:
$this->setProActionDone($value);
break;
} // switch()
}
@@ -2361,6 +2409,10 @@ abstract class BaseProcess extends BaseObject implements Persistent
$this->setProItee($arr[$keys[37]]);
}
if (array_key_exists($keys[38], $arr)) {
$this->setProActionDone($arr[$keys[38]]);
}
}
/**
@@ -2524,6 +2576,10 @@ abstract class BaseProcess extends BaseObject implements Persistent
$criteria->add(ProcessPeer::PRO_ITEE, $this->pro_itee);
}
if ($this->isColumnModified(ProcessPeer::PRO_ACTION_DONE)) {
$criteria->add(ProcessPeer::PRO_ACTION_DONE, $this->pro_action_done);
}
return $criteria;
}
@@ -2652,6 +2708,8 @@ abstract class BaseProcess extends BaseObject implements Persistent
$copyObj->setProItee($this->pro_itee);
$copyObj->setProActionDone($this->pro_action_done);
$copyObj->setNew(true);