You are not logged in.
Pages: 1
Hi,
is it possible to add costs even for tickets that have already been solved? Unfortunately I cannot find a setting for this.
Offline
Hi, I have the same problem. Did you get any solution?
Offline
I don't think it is possible.
But maybe you will fix your problem by using this plugin: https://tic.gal/en/project/costs-control-plugin-glpi/
Regards,
Offline
Hi, I have the same problem. Did you get any solution?
Yes, with this hack:
diff -Naur tickets.orig/inc/commonitilcost.class.php tickets/inc/commonitilcost.class.php
--- tickets.orig/inc/commonitilcost.class.php 2020-10-07 08:42:12.000000000 +0200
+++ tickets/inc/commonitilcost.class.php 2020-12-08 10:25:55.446125641 +0100
@@ -511,8 +511,7 @@
$rand = mt_rand();
if ($canedit
- && !in_array($item->fields['status'], array_merge($item->getClosedStatusArray(),
- $item->getSolvedStatusArray()))) {
+ && !in_array($item->fields['status'], array_merge($item->getClosedStatusArray()))) {
echo "<div id='viewcost".$ID."_$rand'></div>\n";
echo "<script type='text/javascript' >\n";
echo "function viewAddCost".$ID."_$rand() {\n";
diff -Naur tickets.orig/inc/item_ticket.class.php tickets/inc/item_ticket.class.php
--- tickets.orig/inc/item_ticket.class.php 2020-10-07 08:42:12.000000000 +0200
+++ tickets/inc/item_ticket.class.php 2020-12-08 10:27:00.222281682 +0100
@@ -381,8 +381,7 @@
$number = count($types_iterator);
if ($canedit
- && !in_array($ticket->fields['status'], array_merge($ticket->getClosedStatusArray(),
- $ticket->getSolvedStatusArray()))) {
+ && !in_array($ticket->fields['status'], array_merge($ticket->getClosedStatusArray()))) {
echo "<div class='firstbloc'>";
echo "<form name='ticketitem_form$rand' id='ticketitem_form$rand' method='post'
action='".Toolbox::getItemTypeFormURL(__CLASS__)."'>";
diff -Naur tickets.orig/inc/knowbaseitem_item.class.php tickets/inc/knowbaseitem_item.class.php
--- tickets.orig/inc/knowbaseitem_item.class.php 2020-10-07 08:42:12.000000000 +0200
+++ tickets/inc/knowbaseitem_item.class.php 2020-12-08 10:27:58.850422541 +0100
@@ -132,8 +132,7 @@
$ok_state = !in_array(
$item->fields['status'],
array_merge(
- $item->getClosedStatusArray(),
- $item->getSolvedStatusArray()
+ $item->getClosedStatusArray()
)
);
}
This works at least for GLPI version 9.5.2
Offline
sorry to ask, but where should i put this text, i'm newbie, if you can help me i really appreciate it
Offline
I noticed that the commonitilcost.class.php file doesn't exist in version 10
Offline
Pages: 1