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

#1 2013-11-18 15:54:00

mercury131
Member
Registered: 2013-10-15
Posts: 50

Add new ticket status

Hello every one!
I try to add a new ticket status in GLPI via this instruction http://blog.angel2s2.ru/2009/04/glpi_27.html (It's Russian language you can translate it via google translate) It instruction works only for GLPI ver 0.71.5 only, and I can't add status via this method in GLPI v 0.84.
May somebody help me to solve this problem?

Offline

#2 2013-11-19 00:20:46

alexian
Member
Registered: 2013-10-03
Posts: 35

Re: Add new ticket status

I did something similar the other day. I didn't create a new status but I reuse some of the ones are already included.

There is an array for the status in /inc/commonitilobjet.class.php (lines 64 and up).

Now you need to edit the /inc/ticket.class.php    (lines 2346 and up) to add the new names for the statuses you want to add

Please remember here you are not creating new statuses, you are just repurposing some of them.


Hope it helps.

Last edited by alexian (2014-07-28 20:05:27)


Alexian,
______________________________________
In the process of learning. One bit at the time!..
______________________________________

Offline

#3 2013-11-19 08:37:37

mercury131
Member
Registered: 2013-10-15
Posts: 50

Re: Add new ticket status

Hello! Thank you for your advance, it's very helpful!
I found status code on line 2616 in ticket.class.php
I add new status string in code:
// To be overridden by class
      $tab = array(self::INCOMING => _x('ticket', 'New'),
                   self::ASSIGNED => __('Processing (assigned)'),
                   self::PLANNED  => __('Processing (planned)'),
                   self::WAITING  => __('Pending'),
                   self::SOLVED   => __('Solved'),
                   self::CLOSED   => __('TEST'),
                   self::CLOSED   => __('Closed'));

But it's dont work? when I create new ticket I dont see new status in form.
Where is my fault?
Thanks for advance!
fcae0128866669c056440a3972097c0b.png

Offline

#4 2013-11-19 17:33:01

alexian
Member
Registered: 2013-10-03
Posts: 35

Re: Add new ticket status

Hi mercury131,

The problem is that you are using the object CLOSED two times. You need to use another from the commonitilobject array:

// STATUS
   const INCOMING      = 1; // new
   const ASSIGNED      = 2; // assign
   const PLANNED       = 3; // plan
   const WAITING       = 4; // waiting
   const SOLVED        = 5; // solved
   const CLOSED        = 6; // closed
   const ACCEPTED      = 7; // accepted
   const OBSERVED      = 8; // observe
   const EVALUATION    = 9; // evaluation
   const APPROVAL      = 10; // approbation
   const TEST          = 11; // test
   const QUALIFICATION = 12; // qualification


Use any of the other and you'll be able to see it in the status dropdown list.


Cheers,

Last edited by alexian (2014-07-28 20:05:49)


Alexian,
______________________________________
In the process of learning. One bit at the time!..
______________________________________

Offline

#5 2013-11-19 18:57:32

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Add new ticket status

Such will just break GLPI.

Each status is associated with code and rule.
Adding new constants will not work, and will result in strange behavior.


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#6 2013-11-19 19:32:21

alexian
Member
Registered: 2013-10-03
Posts: 35

Re: Add new ticket status

Ok remi, I agree but as one of the main developers how will you solve this issue?

Sometimes we need a new status.

What should we do?


Alexian,
______________________________________
In the process of learning. One bit at the time!..
______________________________________

Offline

#7 2014-03-05 17:29:36

Mr.Sfigatto
Member
Registered: 2014-02-04
Posts: 102

Re: Add new ticket status

Hey,
does this means that every software update will revert my changes to original status? This will make me crazy!

Why don't use a db table to store status?

Thanks

Offline

#8 2014-03-05 21:03:25

fred.jsf
Member
Registered: 2014-03-05
Posts: 1

Re: Add new ticket status

For me, it's a good solution!..

Mr.Sfigatto wrote:

Hey,
does this means that every software update will revert my changes to original status? This will make me crazy!

Why don't use a db table to store status?

Thanks

Offline

#9 2014-03-06 13:12:21

Mr.Sfigatto
Member
Registered: 2014-02-04
Posts: 102

Re: Add new ticket status

So... should I hope to see this enhancement in next release? cool

Offline

#10 2014-05-13 16:38:17

mateusfig
Member
Registered: 2013-03-02
Posts: 4

Re: Add new ticket status

Hi everyone. It would be a very great feature, bur it seems lastest stabel version don't have this.

Offline

#11 2022-02-06 01:05:53

k.iazza
Member
Registered: 2016-11-25
Posts: 2

Re: Add new ticket status

hello everyone,

watch this it might be helpful even for GLPI 10.
link : https://www.youtube.com/watch?v=tlZ9Kitr2Uw

regqrds

Last edited by k.iazza (2022-02-06 01:06:24)

Offline

#12 2024-02-26 17:48:42

doberk
Member
Registered: 2022-06-06
Posts: 18

Re: Add new ticket status

k.iazza wrote:

...watch this it might be helpful even for GLPI 10....

Hello, link is unavailable. Could you share it again?

Offline

Board footer

Powered by FluxBB