Setting Process and Activity ID based on another field

Moderator: crythias

Locked
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Setting Process and Activity ID based on another field

Post by aph »

Hi all,

I would like the agents to be able to enter process and activity ID from a ticket. For this purpose I added the ProcessManagementProcessID and ProcessManagementActivityID to free fields text. However, I would like these two fields to be drop down fields. As I can see, these fields are text fields and cannot be changed. As a workaround I thought of creating two dummy drop down fields ProceesID and ActivityID, which the user can select. I thought of a generic agent which would set the value of ProcessManagementProcessID and ProcessManagementActivityID when the value of ProceesID and ActivityID is changed. However, I can't quite figure out how to set the values of ProcessManagementProcessID and ProcessManagementActivityID same as the values of ProceesID and ActivityID. I can only manually enter the values in the text fields.

How can I solve this problem
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Setting Process and Activity ID based on another field

Post by RStraub »

I'd suggest:
Make a dropdown-dynamic Field (just one) where you name the entries like:
- Process one (e.g. Support)
- Process two (e.g. Sales)
...

Then create for each value a generic agent, which listens to the event "dynamic field update" and filter for one of those values. Then let the generic agent under ticket action set the ProcessManagementProcessID and Activity ID.

Edit:
Be aware that the PM-IDs are getting changed with OTRS 4.x
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: Setting Process and Activity ID based on another field

Post by aph »

Thanks!
Does it mean one has to create a generic agent for each process separatly and there is no possibility to set the following: If Process ID = XY then ProcessManagementProcessID = XY?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Setting Process and Activity ID based on another field

Post by RStraub »

Yeah, that would mean one generic agent per entry.

As of now you cannot use OTRS variables to write into a field, they have to be absolutes.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Locked