Skip to content

Commit

Permalink
Merge pull request #261 from ankush-maherwal/release-1.2.3
Browse files Browse the repository at this point in the history
Bug #153497 fix: Front end>> Form Submission taking longer time to se…
  • Loading branch information
ankush-maherwal authored Nov 29, 2019
2 parents ad2bb50 + cd4d027 commit 2f5a86e
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,24 @@ public function migrate()
$tjfieldsFieldTable = JTable::getInstance('Field', 'TjfieldsTable', array('dbo', $db));
$tjfieldsFieldTable->load($field->id);
$tjfieldsFieldTable->client = $updatedUniqueIdentifier;
$tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_' . strtolower(preg_replace("/[^a-zA-Z0-9]/", "", $field->label));

if ($tjfieldsFieldTable->type == 'cluster')
{
$tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_clusterid';
}
elseif ($tjfieldsFieldTable->type == 'ownership')
{
$tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_createdby';
}
elseif ($tjfieldsFieldTable->type == 'itemcategory')
{
$tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_itemcategory';
}
else
{
$tjfieldsFieldTable->name = str_replace('.', '_', $updatedUniqueIdentifier) . '_' . strtolower(preg_replace("/[^a-zA-Z0-9]/", "", $field->label));
}

$tjfieldsFieldTable->store();

// Check if field name is unique
Expand Down

0 comments on commit 2f5a86e

Please sign in to comment.