Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move item order from array if needed #303

Merged

Conversation

stonebuzz
Copy link
Contributor

The injection process is based on the order of the columns in the CSV file
Which can be annoying in some cases
We need to move item before another

Ex : NetworkPort before NetworkName

it's ugly ! we agree, but I have no other solution for the moment

@Mirkk
Copy link

Mirkk commented Aug 10, 2022

@stonebuzz doesn't work for me, in both "directions" the same error (tried on GLPI 9.5 ):
Undefined index: NetworkPort in /usr/share/glpi/plugins/datainjection/inc/networknameinjection.class.php at line 95
SQL Error "1048": Column 'items_id' cannot be null in query "INSERT INTO glpi_networknames (name, itemtype, items_id, entities_id, date_creation, date_mod) VALUES ('netname10', 'NetworkPort', NULL, '0', '2022-08-10 16:51:36', '2022-08-10 16:51:36')"

@stonebuzz
Copy link
Contributor Author

@Mirkk
I made a change, can you do a test again ?

Best regards

@Mirkk
Copy link

Mirkk commented Aug 11, 2022

@stonebuzz this one works, tested with order "NetName, NetPort" and "NetPort, NetName". Thanks!

@stonebuzz stonebuzz added this to the 2.11.3 milestone Aug 11, 2022
@cedric-anne cedric-anne merged commit 3136494 into pluginsGLPI:develop Sep 2, 2022
@cedric-anne cedric-anne modified the milestones: 2.11.3, 2.12.0 Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants