Import Employees Data (screenshots)

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
blacksmith
Posts: 91
Joined: Mon Feb 11, 2008 6:57 am

Import Employees Data (screenshots)

Post by blacksmith »

I am trying to import users data to TimeTrex.

1. This is a screenshot of my user_data.csv file:

Image

2. This is a screenshot of my user_column_map.txt file:

Image

3. As seen, all three relevant files related to the import process are in the same directory:

Image

4. Then I write the following command in the command prompt:

Image

5. This is the result of the command:

Image

6. Errors continue till reach to the end with this:

Image


I'm not sure if the error comes from the Company ID. I tried the Full Name, Short Name, and the id in the database table. But errors are still occurred .

Please advise on how to solve these errors and import users / employees data into TimeTrex.

Thanks very much


TimeTrex Standard Edition v2.2.10
PHP 5.2.5
Windows XP Pro SP2
Apache 2.2.8
MySQL 5.0.51a
Firefox 2.0.0.14
Last edited by blacksmith on Wed Jun 11, 2008 6:01 am, edited 1 time in total.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

You didn't post a snippet of the user file in raw text form, so I don't know for sure, but I think your column mappings are all wrong. When you save a Excel file as CSV, it doesn't use column names of "A", "B" and such.

So your column names are just the very first line in your CSV file, in this case: "company_id", "status_id", "currency_id", etc...

However, if you are using the exact columns that TimeTrex uses, you don't need to do any mapping at all, TimeTrex is smart enough to know. So I would remove all the "letters" (A,B,C,D,E,F,...) from your column map file.

As for company_id, you can't enter "anything", thats not valid. You need to enter the actual company ID, chances are "1" will work fine. You can do this in the column map file under the "default" column, it would look like this:

"company_id","","1",""

Then remove the company_id column from your user_data.csv file completely, and the import script will just use the default value ("1") for everyone.

You may run into other issues, whenever you use "names" instead of "IDs" in the user_data.csv file, the names have to match EXACTLY, if they don't it will fail.

For example, you entered: "monthly payperiod" for the pay_period_schedule_id, this has to match EXACTLY the name of your pay period schedule otherwise it will fail. This includes spaces and everything.
blacksmith
Posts: 91
Joined: Mon Feb 11, 2008 6:57 am

Data not imported completely

Post by blacksmith »

Thank you very much. Your reply has helped.

Now, I have six issues regarding the import process.

1. It imports only one employee although I entered five. Please see the result of the import process in the command prompt screenshot.

2. All Wages' values didn't imported at all.

3. There are seven fields' values didn't imported at all:

* Group
* Note
* Other ID1 (military)
* Other ID2 (punishment)
* Other ID3 (medical)
* Other ID4 (life)
* Other ID5 (car)

4. Status field always import (Active) although I tried all the five built in status.

Please correct me if I am wrong in the following id:

Active ---------------------------> 10
Leave - illness/injury ----------> 12
Leave - Maturity/Parental -----> 14
Leave - Other ------------------> 16
Terminated ---------------------> 20

5. How can I import employee's Permission Group values? Their id are:

Regular Employee -------------------> 1
Supervisor (Subordinates Only) ---> 2
Supervisor (All Employees) --------> 3
Payroll Administrator ---------------> 4
Administrator ------------------------> 5

Please correct me if I am wrong

6. How can I import employees' Bank Accounts?

Here are my work:

1. This is the user csv file opened by Excel to enter data:

Image

2 This is the same user csv file but in raw text form:

Image

3. This is the user_column_map file:

Image

4. And finally, this is the result of the process:

Image

Please advise me on previous six issues.

Thanks very much

TimeTrex Standard Edition v2.2.10
PHP 5.2.5
Windows XP Pro SP2
Apache 2.2.8
MySQL 5.0.51a
Firefox 2.0.0.14
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Data not imported completely

Post by shaunw »

blacksmith wrote:Thank you very much. Your reply has helped.

Now, I have six issues regarding the import process.

1. It imports only one employee although I entered five. Please see the result of the import process in the command prompt screenshot.
I'm not quite sure why its doing this. My best guess is that its getting some sort of error during the wage import process and its failing at that point. I would edit the import_users.php file, and uncomment the last line:
//Debug::Display();
Change to:
Debug::Display();
Then run it again, see if that gives us any information.
blacksmith wrote: 2. All Wages' values didn't imported at all.
Probably because of the above issue.

blacksmith wrote: 3. There are seven fields' values didn't imported at all:

* Group
* Note
* Other ID1 (military)
* Other ID2 (punishment)
* Other ID3 (medical)
* Other ID4 (life)
* Other ID5 (car)
If the columns aren't in the column_map file, they aren't supported at this time. Group, Note, and Permission Group aren't. However the import script does use the New Hire Defaults for some of these.

As for the "other" fields, you can't rename them, they have to stay as "other_id1", "other_id2", ... Otherwise they won't be imported either.
blacksmith wrote: 4. Status field always import (Active) although I tried all the five built in status.

Please correct me if I am wrong in the following id:

Active ---------------------------> 10
Leave - illness/injury ----------> 12
Leave - Maturity/Parental -----> 14
Leave - Other ------------------> 16
Terminated ---------------------> 20
Currently the import script will only import active employees.
blacksmith wrote: 5. How can I import employee's Permission Group values? Their id are:

Regular Employee -------------------> 1
Supervisor (Subordinates Only) ---> 2
Supervisor (All Employees) --------> 3
Payroll Administrator ---------------> 4
Administrator ------------------------> 5

Please correct me if I am wrong
New Hire Defaults are used for Permission Groups at this time. You can easily change them after the employees are imported.
blacksmith wrote: 6. How can I import employees' Bank Accounts?
Bank accounts aren't supported at this time.
Locked