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

オープン 初心者向け
#254 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

レポートによると、プラグインは entity 引数として false を渡しており、これはユーザーの現在の entity を意味します。GLPI 12 はこれをルート entity の 0 に変換します。中央、ヘルプデスク、サービスカタログ、チケット一覧のアラートクエリについて、プラグインがこの呼び出しを行っている箇所を見つけ、GLPI 12 が受け付ける '' の値に変更してください。IT のような子 entity に限定したアラートが、その entity で作業している Super-Admin に対してこれらのページに表示され、チケットフォームにも引き続き表示されれば完了です。

索引モデルが 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分
マージ済み PR(30日)
10

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pluginsGLPI/news のほかの issue

pluginsGLPI/news の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。