]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttImportHelper.class.php
Fixed team export by assigning role id 0 to top managers.
[timetracker.git] / WEB-INF / lib / ttImportHelper.class.php
index 002dac2212f9bb3c5d05fabe9cc32a6dcf463f41..5bc7d77a73086ddffefc3de8ee99364164cd7710 100644 (file)
@@ -52,8 +52,8 @@ class ttImportHelper {
 
   // The following arrays are maps between entity ids in the file versus the database.
   // In the file they are sequential (1,2,3...) while in the database the entities have different ids.
-  var $userMap       = array(); // User ids.
   var $roleMap       = array(); // Role ids.
+  var $userMap       = array(); // User ids.
   var $projectMap    = array(); // Project ids.
   var $taskMap       = array(); // Task ids.
   var $clientMap     = array(); // Client ids.
@@ -139,7 +139,7 @@ class ttImportHelper {
           foreach ($this->users as $key=>$user_item) {
             $user_id = ttUserHelper::insert(array(
               'team_id' => $this->team_id,
-              'role' => $user_item['ROLE'],
+              'role_id' => $user_item['ROLE_ID'], // Note: NOT mapped value. Not implemented currently, need to fix.
               'client_id' => $user_item['CLIENT_ID'], // Note: NOT mapped value, replaced in CLIENT handler.
               'name' => $user_item['NAME'],
               'login' => $user_item['LOGIN'],