You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#26 2022-07-14 09:44:54

supertramp4
Member
Registered: 2022-06-13
Posts: 28

Re: Follow-up show blank in ticket after replying to ticket from email

Hi oneill2john
This has just been solved, and works for me at h-t-t-p-s://github.com/glpi-project/glpi/pull/12208/files

diff --git a/src/CommonITILObject.php b/src/CommonITILObject.php
index ee5ba5906e..bf4b44c495 100644
--- a/src/CommonITILObject.php
+++ b/src/CommonITILObject.php
@@ -6626,7 +6626,7 @@ abstract class CommonITILObject extends CommonDBTM
             $followups = $followup_obj->find(['items_id'  => $this->getID()] + $restrict_fup, ['date DESC', 'id DESC']);
             foreach ($followups as $followups_id => $followup) {
                 $followup_obj->getFromDB($followups_id);
-                if ($followup_obj->canViewItem()) {
+                if ($followup_obj->canViewItem() || $params['bypass_rights']) {
                     $followup['can_edit'] = $followup_obj->canUpdateItem();
                     $timeline["ITILFollowup_" . $followups_id] = [
                         'type' => ITILFollowup::class,
@@ -6642,7 +6642,7 @@ abstract class CommonITILObject extends CommonDBTM
             $tasks = $task_obj->find([$foreignKey => $this->getID()] + $restrict_task, 'date DESC');
             foreach ($tasks as $tasks_id => $task) {
                 $task_obj->getFromDB($tasks_id);
-                if ($task_obj->canViewItem()) {
+                if ($task_obj->canViewItem() || $params['bypass_rights']) {
                     $task['can_edit'] = $task_obj->canUpdateItem();
                     $timeline[$task_obj::getType() . "_" . $tasks_id] = [
                         'type' => $taskClass,

Offline

#27 2022-07-14 13:35:06

oneill2john
Member
Registered: 2022-05-07
Posts: 58

Re: Follow-up show blank in ticket after replying to ticket from email

Thank you this, I can confirm it's working for me too with these changes smile
No more blank emails.

For everyone else having this problem and reading this, here's what I did:
1. Created new file "CommonITILObject.php" in "public_html/your_glpi_installation/src" (you can rename original "CommonITILObject.php" to something else, to have a backup of it)
2. Pasted whole code from:

https://github.com/glpi-project/glpi/pull/12208/files

And now it works.

Offline

Board footer

Powered by FluxBB