BUG 12253 "Cuando se borra un caso por PM, este caso no..." SOLVED
- Cuando se borra un caso por PM, este caso no se borra en los PM Reportes. - Problema resuelto, cuando se ejecuta un proceso que tenga Report Tables, al borrar el caso tambien se eliminara los registros de los Report Tables. * Available from version ProcessMaker-2.5.2-testing.1
This commit is contained in:
@@ -1100,7 +1100,6 @@ class Cases
|
||||
$criteria = new Criteria("workflow");
|
||||
$criteria->add(AppSolrQueuePeer::APP_UID, $sAppUid);
|
||||
AppSolrQueuePeer::doDelete($criteria);
|
||||
|
||||
//Before delete verify if is a child case
|
||||
$oCriteria2 = new Criteria('workflow');
|
||||
$oCriteria2->add(SubApplicationPeer::APP_UID, $sAppUid);
|
||||
@@ -1118,10 +1117,12 @@ class Cases
|
||||
$oCriteria2->add(SubApplicationPeer::APP_PARENT, $sAppUid);
|
||||
SubApplicationPeer::doDelete($oCriteria2);
|
||||
|
||||
//Delete records of the Report Table
|
||||
$this->reportTableDeleteRecord($sAppUid);
|
||||
|
||||
//Delete record of the APPLICATION table (trigger: delete records of the APP_CACHE_VIEW table)
|
||||
$application = new Application();
|
||||
$result = $application->remove($sAppUid);
|
||||
|
||||
//delete application from index
|
||||
if ($this->appSolr != null) {
|
||||
$this->appSolr->deleteApplicationSearchIndex($sAppUid);
|
||||
|
||||
@@ -62,7 +62,6 @@ class adhocUserProxy extends HttpProxyController
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
|
||||
$oCase = new Cases();
|
||||
$oCase->reportTableDeleteRecord($applicationUID);
|
||||
$oCase->removeCase( $applicationUID );
|
||||
|
||||
$this->success = true;
|
||||
|
||||
@@ -43,15 +43,9 @@ try {
|
||||
$oCase = new Cases();
|
||||
if (isset( $_POST['APP_UIDS'] )) {
|
||||
$ids = explode( ',', $_POST['APP_UIDS'] );
|
||||
|
||||
G::LoadClass("pmTable");
|
||||
$pmTable = new PmTable();
|
||||
|
||||
foreach ($ids as $id) {
|
||||
$oCase->reportTableDeleteRecord($id);
|
||||
$oCase->removeCase( $id );
|
||||
}
|
||||
|
||||
if (count( $_POST['APP_UIDS'] ) > 1) {
|
||||
echo 'The Case was deleted successfully';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user