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

Đang mở Phù hợp với người mới
#254 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

Báo cáo cho biết plugin truyền false làm tham số entity, tức là các entity hiện tại của người dùng, và GLPI 12 chuyển giá trị này thành entity gốc 0. Hãy tìm chỗ plugin thực hiện lệnh gọi này cho các truy vấn cảnh báo ở trang trung tâm, helpdesk, danh mục dịch vụ và danh sách ticket, rồi đổi thành giá trị '' mà GLPI 12 chấp nhận. Hoàn thành khi một cảnh báo giới hạn trong entity con như IT hiển thị trên các trang đó cho Super-Admin đang làm việc trong entity ấy, và form ticket vẫn hiển thị cảnh báo đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
PHP
Star
32
Fork
25
Merge trung bình
2 giờ 10 phút
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pluginsGLPI/news

Tất cả issue của pluginsGLPI/news

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.