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

Add os installation date #12893

Merged

Conversation

stonebuzz
Copy link
Contributor

Add os installation date from inventory

image

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #233

@stonebuzz stonebuzz added this to the 10.0.4 milestone Oct 6, 2022
@stonebuzz stonebuzz self-assigned this Oct 6, 2022
@trasher trasher merged commit 83209f9 into glpi-project:10.0/bugfixes Oct 7, 2022
@@ -47,3 +47,6 @@

//new right value for locked_field (previously based on config UPDATE)
$migration->addRight('locked_field', CREATE | PURGE, ['config' => UPDATE]);

//add date_install
$migration->addField(getTableForItemType(Item_OperatingSystem::class), 'install_date', 'date');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getTableForItemType(Item_OperatingSystem::class) should be replaced by glpi_items_operatingsystems

'table' => 'glpi_items_operatingsystems',
'field' => 'install_date',
'name' => __('Installation date'),
'datatype' => 'string',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

datatype should probably be datetime


{{ fields.htmlField(
'install_date',
item.fields['install_date'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe |formatted_datetime filter should be added here, to make the datetime formatted according to user preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants