GLPI 12: alerts scoped to child entities (outside the root) are only visible inside a Form, nowhere else

未关闭 适合新手
#254 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
backend

调研方向

报告称,该插件将 false 作为 entity 参数传入,即用户当前的 entity,而 GLPI 12 会将其转换为根 entity 0。请找到插件在中心、服务台、服务目录和工单列表的告警查询中进行该调用的位置,并将其改为 GLPI 12 接受的 '' 值。当限定在子 entity(例如 IT)的告警,在超级管理员于该 entity 中工作时能显示在这些页面上,并且工单表单仍能显示该告警时,即为完成。

由索引模型根据 Issue 内容生成。

描述

Code of Conduct
  • I agree to follow this project's Code of Conduct
Is there an existing issue for this?
  • I have searched the existing issues
GLPI Version

12.0.2

Plugin version

1.15.1

Bug description

On GLPI 12, an alert that belongs to any entity other than the root entity is never shown on the central page, the helpdesk home page, the service catalog, or above the ticket list.

This happens even for a Super-Admin who is working in that entity. The alert is only visible on ticket forms.

Alerts created in the root entity display normally everywhere. The problem occurs when the entity is a child entity.

E.g. if I create an alert in Entity ID 2, target all profiles, select all visibility options, that alert only appears inside a Form / Ticket, nowhere else.

Relevant log output
N/A
Page URL

/front/central.php, /Helpdesk, /ServiceCatalog and /front/ticket.php

Steps To reproduce
  1. Create a child entity, for example Root > IT

  2. Under Tools > Alerts, create an alert in IT (not recursive) with:

  • active, start date now, no end date
  • displayed on central, helpdesk and service catalog
  • Target: Profile, all profiles
  1. As a Super-Admin, make IT the active entity, or the root with sub-entities included

  2. Open /front/central.php, /Helpdesk, /ServiceCatalog and /front/ticket.php. The alert won't appear in any of these places

  3. Open a ticket in IT (/front/ticket.form.php?id=…). The alert is visible in the right pane.

When an alert is created this way, it should be visible in both steps 4 and 5, as was the case with GLPI 11.

Your GLPI setup information

GLPI 12.0.2 (also reproduced on 12.0.x in a second instance)

News 1.15.0 and 1.15.1 (same behaviour)

Anything else?

the plugin passes false to mean “the user’s current entities”. GLPI 12 turns false into 0, which is the root entity, so only root-entity alerts showed outside ticket forms. '' is the value GLPI 12 accepts for “current entities”.

No response

主要语言
PHP
星标
32
派生
25
平均合并
2 小时 10 分钟
30 天内合并 PR
10

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pluginsGLPI/news 的其他 Issue

查看 pluginsGLPI/news 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。