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
Add os installation date #12893
Conversation
@@ -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'); |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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'], |
There was a problem hiding this comment.
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.
Add os installation date from inventory