From 2c0e3e7288d53082dbcdbf2217159b2da115bc63 Mon Sep 17 00:00:00 2001
From: satish <satish.dvnk@vtiger.com>
Date: Wed, 14 Sep 2016 13:10:41 +0530
Subject: [PATCH] #177 - Convert lead field mapping NULL values and redundant
 rows

---
 modules/Users/DefaultDataPopulator.php |  2 +-
 run-migration-script.php               | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 run-migration-script.php

diff --git a/modules/Users/DefaultDataPopulator.php b/modules/Users/DefaultDataPopulator.php
index f10fc0114..31538ea52 100644
--- a/modules/Users/DefaultDataPopulator.php
+++ b/modules/Users/DefaultDataPopulator.php
@@ -2573,7 +2573,7 @@ Should any need arise,please do give us a call.';
 		$fieldMap = array(
 			array('company', 'accountname', null, 'potentialname', 0),
 			array('industry', 'industry', null, null, 1),
-			array('phone', 'phone', 'phone', null), 1,
+			array('phone', 'phone', 'phone', null, 1),
 			array('fax', 'fax', 'fax', null, 1),
 			array('rating', 'rating', null, null, 1),
 			array('email', 'email1', 'email', null, 0),
diff --git a/run-migration-script.php b/run-migration-script.php
new file mode 100644
index 000000000..607cb506e
--- /dev/null
+++ b/run-migration-script.php
@@ -0,0 +1,14 @@
+<?php
+/*+***********************************************************************************
+ * The contents of this file are subject to the vtiger CRM Public License Version 1.0
+ * ("License"); You may not use this file except in compliance with the License
+ * The Original Code is:  vtiger CRM Open Source
+ * The Initial Developer of the Original Code is vtiger.
+ * Portions created by vtiger are Copyright (C) vtiger.
+ * All Rights Reserved.
+ *************************************************************************************/
+
+//migration script started
+$db = PearDatabase::getInstance();
+$phoneFieldId = getFieldid(getTabid('Leads'), 'phone');
+$db->pquery('UPDATE vtiger_convertleadmapping SET editable=? WHERE leadfid=?', array(1, $phoneFieldId));
\ No newline at end of file
-- 
GitLab