[SOLVED] Force State Change On Lock - tried it, not working...

Moderator: crythias

Post Reply
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

[SOLVED] Force State Change On Lock - tried it, not working...

Post by estomagado »

Hello everyone!
I think (I'm not sure) it's my first post.
Please be kind :)

I already searched the forum but only found this (misleadingly unrelated) post:
viewtopic.php?f=62&t=40717&p=164534&hil ... #p164534
I am using OTRS 6.0.19 (yes, I will upgrade to Znuny 6.0.36 soon).
I want to set the ticket state from new (or open) to some other state when ticket is locked.

Ticket::EventModulePost###2800-ForceStateChangeOnLock
seems to be just what the doctor ordered, but I can't seem to make it work. For starters, it doesn't apper on the Sysconfig Web interface if I want to navigate to it. If I search for it in the search box, it appears and I can edit it. Unfortunately, after deploying it never works.

What am I doing wrong?
Last edited by estomagado on 17 Aug 2021, 19:37, edited 1 time in total.
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

Re: Force State Change On Lock - tried it, not working...

Post by estomagado »

Here's how it set up my
Ticket::EventModulePost###2800-ForceStateChangeOnLock
(I did it on the Web interface, but I reckon it's in Ticket.xml.
Also, the path Core::Event::Ticket does not appear on my interface, I have to use the search.)

Key-Value pairs
  • Event - TicketLockUpdate
  • Module - Kernel::System::Ticket::Event::ForceState
  • new - some state*
  • open - some state*
* where some state is either a predefined system state, or one I created. Either way, it does not work.

As a side note, I noticed that in Ticket.xml, i have the following line:
<Setting Name="Ticket::EventModulePost###2800-ForceStateChangeOnLock" Required="0" Valid="0">

Do I have to flip the Valid switch on this, somewhere?
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

Re: Force State Change On Lock - tried it, not working...

Post by estomagado »

(Well, no, I have 20 posts already... It's difficult to be a 50-something sometimes...)
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Force State Change On Lock - tried it, not working...

Post by root »

Hi,
estomagado wrote: 16 Aug 2021, 23:48 Do I have to flip the Valid switch on this, somewhere?

Yes, click on the name of the setting and a menu appears with a button to enable:
2021-08-17_06-04-20.png
- Roy
You do not have the required permissions to view the files attached to this post.
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 ?
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

[SOLVED] Force State Change On Lock - tried it, not working...

Post by estomagado »

TL;DR: YOU HAVE TO USE YOUR LANGUAGE, NOT ENGLISH.
root wrote: 17 Aug 2021, 06:07Yes, click on the name of the setting and a menu appears with a button to enable:
Thanks, Roy!
It turns on automatically when you edit and save the config, but no luck, still not working. Then something struck me.

I was using the english names of states, but my installation is in Portuguese by default. As soon as I used all Portuguese state names (e.g. Minho instead of Minnesota :D ) everything worked.

So for me the correct Key-Value pairs are:
  • Event - TicketLockUpdate
  • Module - Kernel::System::Ticket::Event::ForceState
  • Novo - some other state*
  • Aberto - some other state*
instead of
  • Event - TicketLockUpdate
  • Module - Kernel::System::Ticket::Event::ForceState
  • new - some other state*
  • open - some other state*

All's whell when ends well. 8)
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [SOLVED] Force State Change On Lock - tried it, not working...

Post by root »

estomagado wrote: 17 Aug 2021, 17:24 TL;DR: YOU HAVE TO USE YOUR LANGUAGE, NOT ENGLISH.

Hi,

Not your language, you need the same what's stored in the database. Looks like you have them renamed.

- 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 ?
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

Re: [SOLVED] Force State Change On Lock - tried it, not working...

Post by estomagado »

root wrote: 17 Aug 2021, 18:12
estomagado wrote: 17 Aug 2021, 17:24 TL;DR: YOU HAVE TO USE YOUR LANGUAGE, NOT ENGLISH.
Not your language, you need the same what's stored in the database. Looks like you have them renamed.
Yes, but I did not rename them, the installer did.
When you choose the language during installation, all states are translated.

I wonder if there is a way to have a multi-language installation.
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [SOLVED] Force State Change On Lock - tried it, not working...

Post by root »

estomagado wrote: 17 Aug 2021, 19:39 Yes, but I did not rename them, the installer did.
When you choose the language during installation, all states are translated.
I really never heard or saw of this. What was the version you had installed?

- 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 ?
estomagado
Znuny newbie
Posts: 44
Joined: 20 Sep 2019, 16:24
Znuny Version: 6.0.36
Real Name: Henrique Ulbrich
Company: Design for Context

Re: [SOLVED] Force State Change On Lock - tried it, not working...

Post by estomagado »

Originally 6.0.18
--
Your pal
Estomagado

Znuny 6.0.36 Vanilla (no add-ons installed, no fancy customization)
MySQL BD backend for external customer users
LDAP (AD) backend for internal customer users & agents
Post Reply