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
Entity Assistance Tab UI + some AJAX #17023
base: main
Are you sure you want to change the base?
Conversation
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.
Please rebase to solve conflicts.
8b5d442
to
18dc3a3
Compare
@@ -2526,7 +2526,38 @@ public static function getSpecificValueToDisplay($field, $values, array $options | |||
if ($values[$field] === self::CONFIG_PARENT) { | |||
return __('Inheritance of the parent entity'); | |||
} | |||
return CommonITILSatisfaction::getTypeInquestName($values[$field]); | |||
$inherit = |
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.
Did you forgot to assign a value here, or is it intended?
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.
I have the following error:
glpiphplog.CRITICAL: *** Twig Error (Twig\Error\RuntimeError): "The merge filter only works with arrays or "Traversable", got "NULL" for argument 2." in template "/var/www/glpi/templates/pages/admin/entity/assistance.html.twig" at line 100
Backtrace :
...tes/e0/e026b9d5fe9203796cd1513f4ebf9d2c.php:127 Twig\Extension\CoreExtension::arrayMerge()
vendor/twig/twig/src/Template.php:430 __TwigTemplate_b8f857557d4b7425bc0d35fae94fb920->block_form_fields()
...tes/49/497db28d66d4b3437cf9b8a995a3a252.php:103 Twig\Template->yieldBlock()
vendor/twig/twig/src/Template.php:360 __TwigTemplate_e7892048913a21898706f90f34fadae5->doDisplay()
...ates/e0/e026b9d5fe9203796cd1513f4ebf9d2c.php:46 Twig\Template->yield()
vendor/twig/twig/src/Template.php:360 __TwigTemplate_b8f857557d4b7425bc0d35fae94fb920->doDisplay()
vendor/twig/twig/src/Template.php:327 Twig\Template->yield()
vendor/twig/twig/src/TemplateWrapper.php:45 Twig\Template->display()
src/Application/View/TemplateRenderer.php:185 Twig\TemplateWrapper->display()
src/Entity.php:2025 Glpi\Application\View\TemplateRenderer->display()
src/Entity.php:544 Entity::showHelpdeskOptions()
src/CommonGLPI.php:682 Entity::displayTabContentForItem()
ajax/common.tabs.php:114 CommonGLPI::displayStandardTab()
public/index.php:83 require()
'admin_email' => $entity->getInheritedValueBadge(field: 'admin_email', inherit_parent_value: null), | ||
'admin_email_name' => $entity->getInheritedValueBadge(field: 'admin_email_name', inherit_parent_value: null), | ||
'from_email' => $entity->getInheritedValueBadge(field: 'from_email', inherit_parent_value: null), | ||
'from_email_name' => $entity->getInheritedValueBadge(field: 'from_email_name', inherit_parent_value: null), | ||
'noreply_email' => $entity->getInheritedValueBadge(field: 'noreply_email', inherit_parent_value: null), | ||
'noreply_email_name' => $entity->getInheritedValueBadge(field: 'noreply_email_name', inherit_parent_value: null), | ||
'replyto_email' => $entity->getInheritedValueBadge(field: 'replyto_email', inherit_parent_value: null), | ||
'replyto_email_name' => $entity->getInheritedValueBadge(field: 'replyto_email_name', inherit_parent_value: null), | ||
'notification_subject_tag' => $entity->getInheritedValueBadge(field: 'notification_subject_tag', inherit_parent_value: null), |
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.
'autofill_use_date' => $entity->getInheritedValueBadge('autofill_use_date'), | ||
'autofill_warranty_date' => $entity->getInheritedValueBadge('autofill_warranty_date'), | ||
'autofill_decommission_date' => $entity->getInheritedValueBadge('autofill_decommission_date'), | ||
'agent_base_url' => $entity->getInheritedValueBadge(field: 'agent_base_url', inherit_parent_value: null), |
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.
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.
Is there something different in my DB? This field is just empty/null by default and AFAIK, an empty value is supposed to be treated as inherited by parent.
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.
My screenshot was taken in the root entity context. The root entity cannot inherit anything.
'autofill_buy_date' => $entity->getInheritedValueBadge('autofill_buy_date'), | ||
'autofill_order_date' => $entity->getInheritedValueBadge('autofill_order_date'), | ||
'autofill_delivery_date' => $entity->getInheritedValueBadge('autofill_delivery_date'), | ||
'autofill_use_date' => $entity->getInheritedValueBadge('autofill_use_date'), | ||
'autofill_warranty_date' => $entity->getInheritedValueBadge('autofill_warranty_date'), | ||
'autofill_decommission_date' => $entity->getInheritedValueBadge('autofill_decommission_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.
'use_domains_alert' => $entity->getInheritedValueBadge('use_domains_alert'), | ||
'send_domains_alert_close_expiries_delay' => $entity->getInheritedValueBadge('send_domains_alert_close_expiries_delay'), | ||
'send_domains_alert_expired_delay' => $entity->getInheritedValueBadge('send_domains_alert_expired_delay'), |
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.
ajax/commonitilsatisfaction.php
directly.ajax/commonitilsatisfaction.php
to Twig.concat_ws
to QueryFunction class