[SOLVED] Transition Condition

Moderator: crythias

Locked
ppreininger
Znuny newbie
Posts: 12
Joined: 20 Jun 2024, 10:21
Znuny Version: Znuny LTS
Real Name: Peter Preininger

[SOLVED] Transition Condition

Post by ppreininger »

Hello,
I need to create a condition that checks, if there is content at all. I need to do the transition when the Dynamic field (which is a string) is empty. Is there a way to do so?
Last edited by ppreininger on 26 Jun 2024, 11:44, edited 1 time in total.
root
Administrator
Posts: 4249
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Transition Condition

Post by root »

Hi,

The regular expression .+ will match if the string contains one or more characters.

- 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 ?
ppreininger
Znuny newbie
Posts: 12
Joined: 20 Jun 2024, 10:21
Znuny Version: Znuny LTS
Real Name: Peter Preininger

Re: Transition Condition

Post by ppreininger »

Yes, but this just matches if there is a character. The condition has to match, if the string is empty - nothing is entered in the dynamic field.
root
Administrator
Posts: 4249
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Transition Condition

Post by root »

Hi,
ppreininger wrote: 21 Jun 2024, 08:55 Yes, but this just matches if there is a character. The condition has to match, if the string is empty - nothing is entered in the dynamic field.
I suspected your answer because your request was not on point:
ppreininger wrote: 20 Jun 2024, 16:24 I need to create a condition that checks, if there is content at all.
What you want is probably impossible because if a dynamic field has no value, it does not exist. Dynamic fields can only be used in transition if the have a value (=exist).

There are two options I see here:

1. Use TicketDynamicFieldDefault to have an initial value you can check against instead of empty.
2. Custom development that implements such kind of a check you want.

- 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 ?
ppreininger
Znuny newbie
Posts: 12
Joined: 20 Jun 2024, 10:21
Znuny Version: Znuny LTS
Real Name: Peter Preininger

Re: Transition Condition

Post by ppreininger »

Thank you, at least I do not have to dig deeper into that.
Locked