Hello!
I would like to ask you for transition condition type regex. The documentation says: (https://doc.otrs.com/doc/manual/admin/6 ... .7.3.5.5.3)
"Regex: The field value can be tested with a regular expression. It is important that Match contains qr{}xms as a base condition. Between the braces the actual regular expression can be noted."
Unfortunately I've got two problems: in exported process source file (yml) instead of "Regex" type we have "Regexp" and I have tried many possible combinations like qr{^ZH.*$}xms or qr{'^ZH.*$'}xms and list full of other delimiters for regex string like (),"", // and so forth.
Because I have previously reported few bugs to process management code I think that it may be an another bug, but I like to ask if somebody knows what is the proper formatting of regex condition to make the transaction to be called successfully. I still hope there is my fault somewhere.
Best regards
Daniel Lisiecki
[Solved] Process Transition condition type
Moderator: crythias
-
- Znuny newbie
- Posts: 55
- Joined: 13 Apr 2017, 11:27
- Znuny Version: 6.5.4
- Real Name: Daniel
- Company: Komputronik S.A.
[Solved] Process Transition condition type
Last edited by lis9 on 08 Apr 2021, 19:50, edited 1 time in total.
-
- Administrator
- Posts: 3968
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: Process Transition condition type
Hi,
I think you misunderstood the manual. This is a working condition in one of my test systems, matching states containing the term closed
I suggest that you go just with
- Roy
P.S.: Do you use the GUI for creating the processes, right?
I think you misunderstood the manual. This is a working condition in one of my test systems, matching states containing the term closed
I suggest that you go just with
Code: Select all
^ZH.*$
P.S.: Do you use the GUI for creating the processes, right?
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 ?
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 ?
-
- Znuny newbie
- Posts: 55
- Joined: 13 Apr 2017, 11:27
- Znuny Version: 6.5.4
- Real Name: Daniel
- Company: Komputronik S.A.
Re: Process Transition condition type
Yes right. I use the GUI to create processes.
Unfortunately the working solution seems to be ZH* without ^$. It's sad because I cannot look for empty/whitespace field using such regex as (^$)|(\s+$). It seems that the only solution is to write my own transition validation module
In your example your condition is equivalent to type String and fixed value, no wildcards.
Thank you very much for your assistance!
Unfortunately the working solution seems to be ZH* without ^$. It's sad because I cannot look for empty/whitespace field using such regex as (^$)|(\s+$). It seems that the only solution is to write my own transition validation module
In your example your condition is equivalent to type String and fixed value, no wildcards.
Thank you very much for your assistance!
Re: Process Transition condition type
.* works fine for anything and ^$ for empty. Please note that a dynamic field if it has no value is not existant for this ticket so checking on empty will not work here
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Administrator
- Posts: 3968
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: Process Transition condition type
Not really. My examples matches e.g. these states
- closed successful
- closed successful
- closed
- closed with workaround
A regular expression may contain a wildcard or other pattern but this is not mandatory.
- 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 ?
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 ?
-
- Znuny newbie
- Posts: 55
- Joined: 13 Apr 2017, 11:27
- Znuny Version: 6.5.4
- Real Name: Daniel
- Company: Komputronik S.A.
Re: Process Transition condition type
Yes, I'm aware of that, but my situation is quite different. I have some values in DF type textarea. Every line begins with ZH-<number>. I want to call transition action when the field gets emptied by user. It can be completely empty or can contain white spaces.
My idea was to call transition when DF contains any ZH string, and call other transaction when it does not. If DF emptied by user gets DF nonexistent in ticket my belief to create own validation module seems to be right even more.