[SOLVED] Creating a new ticket state type

Moderator: crythias

Post Reply
JHS
Znuny newbie
Posts: 25
Joined: 13 Oct 2016, 11:22
Znuny Version: 6 PL 4

[SOLVED] Creating a new ticket state type

Post by JHS »

Hello!

I'm using OTRS 5.0.23

I'm trying to add a new ticket state type, we would love to have an extra type called 'resolved' to enable us to use a more advanced flow for closing a ticket.

The idea is the following: the agent would set the ticket to the status 'resolve' when the ticket is deemed resolved whereafter the customer has x amount of time to reply and update in case it is not solved.

I originally tried to just create a state called 'resolved', but under the state type 'closed', except that we than run into the issue that the customer is not able to add extra information when we define our follow-up method on the queue as 'reject' (because the state type of 'resolved' is already 'closed').

According to the admin manual, it should be sufficient to add an extra row to the ticket_state_type table using the following query

Code: Select all

insert into ticket_state_type (name,comments) values ('resolved','all resolved ticket states');
I get the following SQL error

Code: Select all

ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`otrs`.`ticket_state_type`, CONSTRAINT 'FK_ticket_state_type_create_by_id` FOREIGN KEY (`create_by`) REFERENCES `users` (`id`))
So I added the create_by and change_by id, resulting in the following query

Code: Select all

insert into ticket_state_type (name,comments,create_by,change_by) values ('resolved','All resolved state types','1','1');
This command works and the row is inserted.
The admin manual than states that it should now be possible to use that newly created state type.
However, I don't see the extra option when creating/editing a ticket state.

Because I'm curious I changed the name of an existing one in the table (don't worry, I'm using our test environment) and it did not change either.

Is there another file or sysconfig item that I need to change before I can use this ticket state? Am I overlooking something?
I've already restarted the services and rebooted the whole server, just in case.
According to the admin manual, the insert should be enough.

Thanks for helping me!
You do not have the required permissions to view the files attached to this post.
Last edited by JHS on 23 Jan 2018, 16:34, edited 1 time in total.
OTRS 6.0.5
JHS
Znuny newbie
Posts: 25
Joined: 13 Oct 2016, 11:22
Znuny Version: 6 PL 4

Re: Creating a new ticket state type

Post by JHS »

I solved it, I just had to clean the cache and try again, this solved the issue

Code: Select all

/opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete
OTRS 6.0.5
root
Administrator
Posts: 3931
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [SOLVED] Creating a new ticket state type

Post by root »

Hi,

I'm pretty sure you'll run into other problems. Why not using the state resolved with the state type pending auto? The ticket types are hard coded and who can predict the behaviour with a new ticket type?

Just my two cents,

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
JHS
Znuny newbie
Posts: 25
Joined: 13 Oct 2016, 11:22
Znuny Version: 6 PL 4

Re: [SOLVED] Creating a new ticket state type

Post by JHS »

Hi

I see what you mean, I didn't consider that.

We could use the state type 'pending auto' but we don't want to agent to choose the date at which the ticket closes automatically, we are doing this with the GenericAgent based on type and last changed older than x days.

Considering your input, we are thinking of just leaving the ticket state type on 'open', that way the customer can still reply, still see it in the 'open ticket view'.

I'll discuss this with my colleagues and come back to the topic.
Thanks for your advice and input.
OTRS 6.0.5
Post Reply