Error message on frontend after a SQL insert of users

Ask your questions regarding TimeTrex installation here.
Post Reply
shaunh
Posts: 3
Joined: Thu Aug 21, 2014 12:06 pm

Error message on frontend after a SQL insert of users

Post by shaunh »

Hi there,

We have installed TimeTrex community edition on-site v7.3.10-20140707, we had some trouble with the CSV files we created and the import wizard, so we decided to try a SQL insert directly to the users table via Postgre's Pgadmin tool.

Here is the SQL we constructed based off of the admin user and a test user :

Code: Select all

insert into users (
id,
company_id,
status_id,
user_name,
password,
phone_id,
phone_password,
first_name,
last_name,
city,
province, 
country,
work_phone,
home_phone,
work_email,
birth_date,
hire_date,
sex_id,
created_date,
created_by,
updated_date,
updated_by,
deleted,
labor_standard_industry,
title_id,
default_branch_id,
default_department_id,
employee_number,
group_id,
currency_id,
second_last_name,
first_name_metaphone,
last_name_metaphone,
password_updated_date,
ethnic_group_id,
default_job_id,
default_job_item_id)

The error we are seeing is after attempting a login on the above inserted user. The frontend states :
WARNING: TimeTrex was unable to set your time zone. Please contact your TimeTrex administrator immediately.
in bold red on the top of the screen. This does not occur with the other test users created via the front end.

Our question is the following, a) Can you provide insight into whether or not another table exists that we need to insert to? Is our SQL OK? Or b) can you provide us with a sample CSV file that we can populate for the import Wizard to work correctly. We are unsure of what the file must look like.

Your help would be greatly appreciated :)

Kind regards,
Shaun
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Error message on frontend after a SQL insert of users

Post by shaunw »

Modifying the SQL database directly is not supported or recommended and pretty much guarantees that you will corrupt data or cause problems such as what you are experiencing. At this stage I would recommend deleting whatever records you manually created.

If you attach a example copy of the CSV file and the exact error messages that you are receiving, we can try to assist you further with that approach.
shaunh
Posts: 3
Joined: Thu Aug 21, 2014 12:06 pm

Re: Error message on frontend after a SQL insert of users

Post by shaunh »

Hi Shaun,

Many thanks for the advice! We will heed caution and stay out of the DB.

Attached is the CSV file we have with one line item as a test.
Screen 1, Mapping
Screen 1, Mapping
On the second screenshot we are unsure of the options to select, but the ones we chose made sense.
Capture02Options.JPG
Capture03Exceptions.JPG
The last screenshot shows that there are 2 exceptions found. Policy_group and default_branch. I attempted to add these to our CSV but got the same error. If you could advise on what the cause is we would really be quite happy.

Kind regards,
Shaun
Attachments
Example01.csv
Example CSV
(1.04 KiB) Downloaded 372 times
shaunh
Posts: 3
Joined: Thu Aug 21, 2014 12:06 pm

Re: Error message on frontend after a SQL insert of users

Post by shaunh »

Hi Shaun,

Thank you for your help but I just found the issues, Its exactly as stated.

Can I please ask that you remove the original post, the sample data in the SQL query is a real line. Would appreciate if you could.

Thank you indeed.

Kind regards,
Shaun
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Error message on frontend after a SQL insert of users

Post by shaunw »

Done.
Post Reply