pluginsGLPI / customfields

customfields plugin for GLPI
GNU General Public License v2.0
13 stars 4 forks source link

test of migration to fields #81

Open satyan01 opened 8 years ago

satyan01 commented 8 years ago

Hello,

Thank you for your work to create a script to migrate.

I have added the content of the script in migrate-to-fields.php and copy the file in glpi090/

Unfortunately the error message appears :+1:

Searching for Fields plugin It appears you did not install or activate Fields plugin Please download it here : http://github.com/pluginsglpi/fields

Custom fields and fields are installed and activated.

btry commented 8 years ago

Thank you for your report. I'll (try to ?) reproduce and feedback when a fix is available.

remember the script is WIP and is experimental for now. Ensure you run it on a qualification server :)

satyan01 commented 8 years ago

I am available to test on my GLPI staging server. let me now when you have fixed this first issue.

nauevg commented 8 years ago

Hello. My first actions on github, so, if my post is somewhat wrong - tell me how to do it right.

I tested migration script. It not worked in my env. I have glpi 0.85.5 and latest CustomFields (1.7) and Fields (0.90-1.1) plugins. My GLPI instance was upgraded from some earlier version, not previous. Upgrade finished without errors. What I faced when tried script:

  1. version error. My DB has "160" version, and script needs "170". It reads version from CustomFields table, but i have latest version of plugin. Have no idea how to get "170" version. I corrected condition, so script goes further. (see 97 line of script)
  2. Line 127. $fieldResult has 0 rows, so, code in "while" loop not executed.
  3. Line 189 Explode takes array $customFieldsColumns instead of string. It returns NULL.
  4. Line 190 Missed "$" sign before fieldsColumns argument (it is array too)
  5. Query at line 191 It generated without any variables. It leads to "die" at Line 194.
satyan01 commented 8 years ago

Hello,

I would like to test again after your update but

You don't have permission to access /glpi/plugins/customfields/scripts/migrate-to-fields.php on this server.

http://ungsrvgva117/glpi/plugins/customfields/scripts/migrate-to-fields.php

rights are ok on apache

<Directory "E:/webserver/apache24/htdocs/glpi"> AllowOverride all Require all granted

Thanks

dethegeek commented 8 years ago

Hi

The script is not ready, has no user credential check and may disable Custom Fields. Therefore, I have to prevent any unauthorized execution : there is a .htaccess file in its directory.

Please be patient. I need to work for a while before the script has a chance to run as expected in a real environment.

satyan01 commented 8 years ago

Hello, do you have news, we would like to migrate glpi, without custom fields we can't because our compliance needs to keep information for control

nauevg commented 8 years ago

If someone really need migrate data - it is not so hard to do it. You need some SQL query skills. I can tell about my experience, but not sure if it is place here for that...

btry commented 8 years ago

Hi

@nauevg : you're welcom to describe your way to manually migrate data. I agree that it is not so hard, as long you do not have custom dropdowns.

Note that Fields and Custom Fields are too different to port entities restrictions. When used, this cannot be done by simply mapping the restrictons from a plugin to the other.

nauevg commented 8 years ago

In my setup I used two custom fields with devices class and one with phones class.

Main idea is to enable "Fields" plugin, create convenient Fields in GLPI (both plugins enabled). Fill data for one asset to have ability inspect created structure in DB. Then you need to open DB - I used phpmyadmin. Look into "Fields" plugin fields to find out its names. Then look into "CustomFields" fields. After that in my case i used two simple SQL code like: insert into FieldsTableName field1,field2,...fieldN (select fieldA, fieldB,...fieldZ from CustomFieldsTableName); for each class. If you have basic SQL skills - it won't be hard. If you have not - i would not recommend to use this way, but ask anybody, who have.

02.02.2016 16:45, btry пишет:

Hi

@nauevg https://github.com/nauevg : you're welcom to describe your way to manually migrate data. I agree that it is not so hard, as long you do not have custom dropdowns.

Note that Fields and Custom Fields are too different to port entities restrictions. When used, this cannot be done by simply mapping the restrictons from a plugin to the other.

— Reply to this email directly or view it on GitHub https://github.com/pluginsGLPI/customfields/issues/81#issuecomment-178451143.