glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.24k stars 1.29k forks source link

[9.5.0] ITILTemplate fields and keys not renaming on update #6256

Closed cconard96 closed 5 years ago

cconard96 commented 5 years ago

Describe the bug

Noticed while running tests locally for another feature, Fields and keys are not renamed properly for templates when updating.

"Unknown column 'glpi_itilcategories.itiltemplates_id_incident' in 'on clause'". After looking into it more, many keys are using the old names instead of new ones. They are not renamed in the update script, only fields.

For the field rename issue, there is a duplicate key in the array so only one change is applied: 'glpi_itilcategories' => 'tickettemplates_id_incident', 'glpi_itilcategories' => 'tickettemplates_id_demand',

Page(s) URL

Noticed in functional tests (Search test).

To reproduce

Run functional tests on an updated DB.

Expected behavior

All old ticket template fields and keys get renamed to itil template name.

trasher commented 5 years ago

I'll take a look. This should only happens updating from an old 9.5/bugfixes (since rename was reverted).