Default state not working in activity dialog

Moderator: crythias

Post Reply
doodleb
Znuny newbie
Posts: 7
Joined: 14 Jan 2019, 17:21
Znuny Version: 6.0.16

Default state not working in activity dialog

Post by doodleb »

Hi.

We have a process designed for our Helpdesk. In the end, there is an Activity to close the ticket, with an Activity Dialog.

The Activity Dialog has four fields:
- State (mandatory - there are four custom states: three of "closed" type and one of "pending" type; these four states are filtered by an ACL);
- Article (not mandatory);
- Lock (hidden field);
- DynamicField_Status (hidden field - to move the ticket to the next Activity).

In the "State" field, the "Default value" is filled with the name of one of those four states mentioned above.

The problem is that, when the Activity Dialog is opened, we get a different value than the one configured as "Default".

There are no typos, because the state name was copied from the State Management screen.
We tried to set the ACL to "invalid", but the "Default value" still doesn't work.
Trying to change the "Default value" to one of the other three possible states also doesn't work.
As far as we know, there is no "process ticket default state" configuration, as mentioned in this topic: viewtopic.php?t=27324.

Any other suggestions?
OTRS 6.0.x on Linux with MySQL database.
root
Administrator
Posts: 3961
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Default state not working in activity dialog

Post by root »

Hi,

I think the shown state is the current state of the ticket?

- 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 ?
doodleb
Znuny newbie
Posts: 7
Joined: 14 Jan 2019, 17:21
Znuny Version: 6.0.16

Re: Default state not working in activity dialog

Post by doodleb »

I think the shown state is the current state of the ticket?
Actually, the Activity Dialog says "Next ticket state".

Image

Are we doing something wrong?
OTRS 6.0.x on Linux with MySQL database.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Default state not working in activity dialog

Post by crythias »

What are you attempting to accomplish?
Do you want to get the current state?
State or <OTRS_TICKET_State>
Do you want to set the state?
Transition Action StateUpdate
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
doodleb
Znuny newbie
Posts: 7
Joined: 14 Jan 2019, 17:21
Znuny Version: 6.0.16

Re: Default state not working in activity dialog

Post by doodleb »

Hi crythias.
What are you attempting to accomplish?
Do you want to set the state?
Exactly. The purpose of this "State" field is to set the next state of the ticket.
And, in that sense, it's working. The agent selects one of the four options and the state is set.

The only problem is that one of the options is more common that the other three. We want that option as default when the Activity Dialog opens.
But, even with that option as "Deafult value", that doesn't happen.
Transition Action StateUpdate
If I understand your suggestion correctly, the agent shouldn't set the state directly in the Activity Dialog? We should configure a Transition Action based on another field?

I appreciate your help.
OTRS 6.0.x on Linux with MySQL database.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Default state not working in activity dialog

Post by crythias »

I can't seem to replicate this.
Make sure it matches case. Might want to copy/paste from the states interface.

I added "State" as a field and "open" as default and it did say "Next ticket state: open"
Make sure ACL and permissions don't block the state.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
doodleb
Znuny newbie
Posts: 7
Joined: 14 Jan 2019, 17:21
Znuny Version: 6.0.16

Re: Default state not working in activity dialog

Post by doodleb »

Hi crythias.
Make sure it matches case. Might want to copy/paste from the states interface.
That was my first thought too. I tried copy/paste. I even renamed the states, since the original state names have diacrits (they are in portuguese), unsuccessfully.

Image

Image

Image
Make sure ACL and permissions don't block the state.
This is the ACL that filters those four states.
Image

But I tried to deactivate ALL the ACLs to fix the problem. No luck.
OTRS 6.0.x on Linux with MySQL database.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Default state not working in activity dialog

Post by crythias »

1C is chooseable still? I know that should be implied, but I'm just asking ...

If nothing else, you could inject javascript (though I'm struggling to push this.)
Frontend::Module###AgentTicketProcess (unless it's customer ...)

document.getElementById('StateID').value="4" (Based upon the StateID. Come to think of it, you might look at the index number of 1C and see if that works?)

document.getElementById.selectedIndex=3 (based upon 0 as the first entry and in ABC order)

That should theoretically work, but modernized interface isn't updating in console.

Ticket::Frontend::CustomerTicketProcess###StateType
make sure it says closed if it's possible in the >>Customer<< interface. Agent already has closed.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
doodleb
Znuny newbie
Posts: 7
Joined: 14 Jan 2019, 17:21
Znuny Version: 6.0.16

Re: Default state not working in activity dialog

Post by doodleb »

1C is chooseable still? I know that should be implied, but I'm just asking ...
Yes, it's still chooseable.
I can't seem to replicate this.
After you said you couldn't replicate it, I did some additional tests.
The interesting thing is that, when the activity dialog is moved to the first activity in the process, the default value works as expected!

But if I move it to the second or the third activity in the process, the problem happens again.

I'll test your javascript suggestion. Thank you again, crythias.
OTRS 6.0.x on Linux with MySQL database.
Post Reply