From f088c548c0d94c1f9d433b9644677ddf080a0622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Fri, 29 Nov 2019 15:04:32 +0530 Subject: [PATCH 1/4] Bug #153497 fix: Front end>> Form Submission taking longer time to send submitted successfully message to the user. --- .../administrator/houseKeeping/1.2.3/updateClientName.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php index bd7319e7..38093052 100644 --- a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php +++ b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php @@ -101,15 +101,15 @@ public function migrate() if ($tjfieldsFieldTable->type == 'cluster') { - $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_clusterid'; + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_clusterclusterid'; } elseif ($tjfieldsFieldTable->type == 'ownership') { - $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_createdby'; + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_ownershipcreatedby'; } elseif ($tjfieldsFieldTable->type == 'itemcategory') { - $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_itemcategory'; + $tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_itemcategoryitemcategory'; } else { From 96b37ffb061df06c840d2b2990ba8d20b26f2869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Fri, 29 Nov 2019 15:13:58 +0530 Subject: [PATCH 2/4] Bug #153497 fix: Front end>> Form Submission taking longer time to send submitted successfully message to the user. --- .../administrator/houseKeeping/1.2.3/updateClientName.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php index 38093052..34311c49 100644 --- a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php +++ b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php @@ -36,6 +36,9 @@ class TjHouseKeepingUpdateClientName extends TjModelHouseKeeping */ public function migrate() { + // Increase the php execution time for migration + ini_set('max_execution_time', 0); + JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjucm/tables'); JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjfields/tables'); JLoader::import('components.com_tjfields.helpers.tjfields', JPATH_ADMINISTRATOR); From 438839fd5a803ad0678146fa982fb5bab82d92ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Fri, 29 Nov 2019 19:14:51 +0530 Subject: [PATCH 3/4] Bug #153497 fix: Front end>> Form Submission taking longer time to send submitted successfully message to the user. --- .../houseKeeping/1.2.3/updateClientName.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php index 34311c49..66916381 100644 --- a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php +++ b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php @@ -56,10 +56,18 @@ public function migrate() $db->setQuery($query); $ucmTypes = $db->loadObjectlist(); + $session = JFactory::getSession(); + $updatedTypes = (empty($session->get('updatedTypes'))) ? array() : $session->get('updatedTypes'); + if (!empty($ucmTypes)) { foreach ($ucmTypes as $ucmType) { + if (in_array($ucmType->id, $updatedTypes)) + { + continue; + } + $ucmTypeTable = JTable::getInstance('Type', 'TjucmTable', array('dbo', $db)); $ucmTypeTable->load($ucmType->id); $updatedUniqueIdentifier = 'com_tjucm.' . preg_replace("/[^a-zA-Z0-9]/", "", str_replace('com_tjucm.', '', $ucmTypeTable->unique_identifier)); @@ -229,9 +237,19 @@ public function migrate() // Regenerate the XML files $tjfieldsHelper->generateXml(array('client' => $updatedUniqueIdentifier, 'client_type' => $newClientParts[1])); } + + $updatedTypes[] = $ucmType->id; + $session->set('updatedTypes', $updatedTypes); + + $result['status'] = false; + $result['message'] = "Migration in progress"; + + return $result; } } + $session->set('updatedTypes', ''); + $result['status'] = true; $result['message'] = "Migration successful"; } From e667786fad0aac34f853376b7afada6ea908e8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Mon, 2 Dec 2019 10:23:40 +0530 Subject: [PATCH 4/4] Bug #153541 fix: Request time out while executing the migration for client name --- .../administrator/houseKeeping/1.2.3/updateClientName.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php index 66916381..cefb781b 100644 --- a/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php +++ b/src/components/com_tjucm/administrator/houseKeeping/1.2.3/updateClientName.php @@ -36,9 +36,6 @@ class TjHouseKeepingUpdateClientName extends TjModelHouseKeeping */ public function migrate() { - // Increase the php execution time for migration - ini_set('max_execution_time', 0); - JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjucm/tables'); JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjfields/tables'); JLoader::import('components.com_tjfields.helpers.tjfields', JPATH_ADMINISTRATOR); @@ -241,7 +238,7 @@ public function migrate() $updatedTypes[] = $ucmType->id; $session->set('updatedTypes', $updatedTypes); - $result['status'] = false; + $result['status'] = ''; $result['message'] = "Migration in progress"; return $result;