Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 353d88b

Browse files
committed
GLPI 9.4 compatibility
- Use ITILFollowup in replacement of TicketFollowup
1 parent 5febc64 commit 353d88b

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

inc/issue.class.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ private function needNote($champsGlpi, $champsUrl) {
844844
}
845845

846846
/**
847-
* Function to get the information of ticketFollowup
847+
* Function to get the information of ticket followup
848848
*
849849
* @param $ticket
850850
* @return string content
@@ -854,15 +854,16 @@ private function getFollowUpFromticket($ticket) {
854854

855855
$content = '';
856856

857-
$res = $DB->query("SELECT `glpi_ticketfollowups`.*
858-
FROM `glpi_ticketfollowups`
859-
WHERE `glpi_ticketfollowups`.`tickets_id` = '" . Toolbox::cleanInteger($ticket->fields["id"]) . "'");
857+
$res = $DB->query("SELECT *
858+
FROM `glpi_itilfollowups`
859+
WHERE `items_id` = '" . Toolbox::cleanInteger($ticket->fields["id"]) . "'
860+
AND `itemtype` = 'Ticket'");
860861

861862
if ($res->num_rows > 0) {
862863

863864
while ($row = $res->fetch_assoc()) {
864865

865-
$ticket_followUp = new TicketFollowup();
866+
$ticket_followUp = new ITILFollowup();
866867
$ticket_followUp->getFromDB($row["id"]);
867868

868869
$request_type = new RequestType();
@@ -897,7 +898,7 @@ private function getTaskFromticket($ticket, $itemType) {
897898
$content = '';
898899

899900
$res = $DB->query("SELECT `glpi_tickettasks`.*
900-
FROM `glpi_tickettasks`
901+
FROM `glpi_tickettasks`
901902
WHERE `glpi_tickettasks`.`tickets_id` = '" . Toolbox::cleanInteger($ticket->fields["id"]) . "'");
902903

903904
if ($res->num_rows > 0) {

mantis.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
<author>TECLIB'</author>
5555
</authors>
5656
<versions>
57+
<version>
58+
<num>4.3.0</num>
59+
<compatibility>9.4</compatibility>
60+
</version>
5761
<version>
5862
<num>4.2.1</num>
5963
<compatibility>9.3</compatibility>

setup.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
* -------------------------------------------------------------------------
2424
*/
2525

26-
define("PLUGIN_MANTIS_VERSION", "4.2.1");
26+
define("PLUGIN_MANTIS_VERSION", "4.3.0");
2727

2828
// Minimal GLPI version, inclusive
29-
define("PLUGIN_MANTIS_MIN_GLPI", "9.3");
29+
define("PLUGIN_MANTIS_MIN_GLPI", "9.4");
3030
// Maximum GLPI version, exclusive
31-
define("PLUGIN_MANTIS_MAX_GLPI", "9.4");
31+
define("PLUGIN_MANTIS_MAX_GLPI", "9.5");
3232

3333
/**
3434
* function to initialize the plugin

0 commit comments

Comments
 (0)