Hello,
We've been using OTRS 3.0.11 for a while now, and I managed to import all of our users and regular contacts at other companies as customers using instructions found at this link:
http://kb.norsetech.net/how-to-import-c ... -from-csv/
Now, I've been testing with 3.2.5 and I like a lot of the newer features, but one that is giving me a lot of trouble is trying to import all of our users again. I've ran the import, and I can check the database directly and see them all there. When I go into OTRS, I can go to Customers > Customer User Administration and I can see them all there, however when I click on one of them all the fields are empty, and if I delete them all from the database they still show up in the list there with all the empty fields. If I add a user manually through the web interface, I see them show up in the customer_preferences table as well, but none of the ones that I import are going in there, and if I manually import a different CSV with all the same names it doesn't tie them together.
I have set username, email and customer ID to all be the same (email address), would this somehow be causing this problem? I can set customerID to just be the name without the @address.com part, but for some outside users this makes it pretty confusing as to who they are.
Somewhat of a different issue, I'm also trying to set up the CMDB for inventory on our computers, monitors, software etc. but I'm having trouble thinking of a way to link these efficiently. I've done some searching and haven't found any way to import them as linked items, and I'm looking through the database trying to find the relationship between linked items to hopefully come up with some kind of script to automate it once it's all imported but it's a bit over my head (fairly new to MySQL).
Any pointers on these?
Thanks
Issues importing customers
Moderator: crythias
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Issues importing customers
Your Config.pm may be pointing to a database you're not looking at.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Issues importing customers
As far as I can tell it's looking at the right database, in mysql the only databases there when I do show databases; are :
information_schema
mysql
otrs
test
The others don't have the same tables, so I'd assume that it would throw an error if I was trying to load data into them in the wrong database.
In Config.pm:
# The database host
$Self->{'DatabaseHost'} = 'tickets.domain.ca';
# The database name
$Self->{'Database'} = 'otrs';
# The database user
$Self->{'DatabaseUser'} = 'otrs';
I think I may have an issue with the user though, when I type mysql at the command prompt (using CentOS 6.4 and mysql 5.1.67) it goes right into the prompt without asking me for a password, however if I try mysql -u otrs -p and then my password I'm getting :
[root@tickets Kernel]# mysql -u otrs -p
Enter password:
ERROR 1045 (28000): Access denied for user 'otrs'@'localhost' (using password: YES)
How would I go about fixing this? Or does that seem like the issue?
EDIT: Here are the users, seems like I have too many root accounts somehow...
mysql> select user from mysql.user;
+------+
| user |
+------+
| root |
| |
| root |
| |
| otrs |
| root |
+------+
information_schema
mysql
otrs
test
The others don't have the same tables, so I'd assume that it would throw an error if I was trying to load data into them in the wrong database.
In Config.pm:
# The database host
$Self->{'DatabaseHost'} = 'tickets.domain.ca';
# The database name
$Self->{'Database'} = 'otrs';
# The database user
$Self->{'DatabaseUser'} = 'otrs';
I think I may have an issue with the user though, when I type mysql at the command prompt (using CentOS 6.4 and mysql 5.1.67) it goes right into the prompt without asking me for a password, however if I try mysql -u otrs -p and then my password I'm getting :
[root@tickets Kernel]# mysql -u otrs -p
Enter password:
ERROR 1045 (28000): Access denied for user 'otrs'@'localhost' (using password: YES)
How would I go about fixing this? Or does that seem like the issue?
EDIT: Here are the users, seems like I have too many root accounts somehow...
mysql> select user from mysql.user;
+------+
| user |
+------+
| root |
| |
| root |
| |
| otrs |
| root |
+------+
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Issues importing customers
select host,user from mysql.user
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Issues importing customers
Here's what I've got:
mysql> select host,user from mysql.user;
+--------------------+------+
| host | user |
+--------------------+------+
| 127.0.0.1 | root |
| localhost | |
| localhost | otrs |
| localhost | root |
| tickets.domain.ca | |
| tickets.domain.ca | root |
+--------------------+------+
6 rows in set (0.00 sec)
Should there be that many hosts and users? I tried the same command on our current OTRS system which runs on Ubuntu and got:
127.0.0.1 root
*.*.*.* otrs (removed IP)
localhost debian-sys-maint
localhost otrs
localhost root
tickets root
So just comparing these it seems the localhost and tickets.domain.ca on my new install are missing users, would that be causing the problem?
Edit: Also here's a few warnings that come up from the csv file that I'm importing:
mysql> load data local infile 'old_customer_list_noheaders.csv' into table customer_user fields terminated by ',' lines terminated by '\r' (email, login, customer_id, first_name, last_name, comments, valid_id);
Query OK, 282 rows affected, 4 warnings (0.06 sec)
Records: 282 Deleted: 0 Skipped: 0 Warnings: 0
Warning (Code 1364): Field 'create_time' doesn't have a default value
Warning (Code 1364): Field 'create_by' doesn't have a default value
Warning (Code 1364): Field 'change_time' doesn't have a default value
Warning (Code 1364): Field 'change_by' doesn't have a default value
I've also tried with those fields doesn't seem to make any difference though.
mysql> select host,user from mysql.user;
+--------------------+------+
| host | user |
+--------------------+------+
| 127.0.0.1 | root |
| localhost | |
| localhost | otrs |
| localhost | root |
| tickets.domain.ca | |
| tickets.domain.ca | root |
+--------------------+------+
6 rows in set (0.00 sec)
Should there be that many hosts and users? I tried the same command on our current OTRS system which runs on Ubuntu and got:
127.0.0.1 root
*.*.*.* otrs (removed IP)
localhost debian-sys-maint
localhost otrs
localhost root
tickets root
So just comparing these it seems the localhost and tickets.domain.ca on my new install are missing users, would that be causing the problem?
Edit: Also here's a few warnings that come up from the csv file that I'm importing:
mysql> load data local infile 'old_customer_list_noheaders.csv' into table customer_user fields terminated by ',' lines terminated by '\r' (email, login, customer_id, first_name, last_name, comments, valid_id);
Query OK, 282 rows affected, 4 warnings (0.06 sec)
Records: 282 Deleted: 0 Skipped: 0 Warnings: 0
Warning (Code 1364): Field 'create_time' doesn't have a default value
Warning (Code 1364): Field 'create_by' doesn't have a default value
Warning (Code 1364): Field 'change_time' doesn't have a default value
Warning (Code 1364): Field 'change_by' doesn't have a default value
I've also tried with those fields doesn't seem to make any difference though.