Creating System Address and Queue via Command Line – Circular Dependency?

Moderator: crythias

Post Reply
gwarsow
Znuny newbie
Posts: 8
Joined: 09 Aug 2024, 12:17
Znuny Version: 6.5
Real Name: Gregor Warsow

Creating System Address and Queue via Command Line – Circular Dependency?

Post by gwarsow »

I'm trying to create a new system address and queue in Znuny using command line tools, but I’m running into a circular dependency issue.

When I try to add a system address, it requires a queue:

Code: Select all

bin/otrs.Console.pl Admin::SystemAddress::Add --name testAddress --email-address test@example.com
Error: please provide option '--queue-name'.
Clearly, when I specify the name of a queue which does not yet exists, this is rejected:

Code: Select all

bin/otrs.Console.pl Admin::SystemAddress::Add --name testAddress --email-address test@example.com --queue-name testQueue
Error: Queue testQueue does not exist.
On the other hand, when creating a queue, a system address is optional:

Code: Select all

bin/otrs.Console.pl Admin::Queue::Add --name testQueue --group users
Once the queue is created, I can create the system address linked to the queue, but there seems to be no way to update the queue afterward to use the newly created system address with command line tools. I thought of something like Admin::Queue::Update but this does not exist.

How can I properly link a new queue and a new system address when both seem to depend on each other? Is there a way to update the queue via command line, or is database modification the only option?

Thanks in advance!
Gregor
shawnbeasley
Znuny Employee
Posts: 147
Joined: 13 Sep 2021, 09:38
Znuny Version: Znuny 6.3.x
Real Name: Shawn Beasley
Company: Znuny

Re: Creating System Address and Queue via Command Line – Circular Dependency?

Post by shawnbeasley »

Yeah, this is also a "chicken and egg" situation in the frontend as well. You cannot update the queue on the command line. There is no good solution here, unfortunatnely.
hkais
Znuny wizard
Posts: 357
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Creating System Address and Queue via Command Line – Circular Dependency?

Post by hkais »

shawnbeasley wrote: 17 Apr 2025, 21:33 Yeah, this is also a "chicken and egg" situation in the frontend as well. You cannot update the queue on the command line. There is no good solution here, unfortunatnely.
Is there a plan to change this behavior?
IMHO, having a CREATE operation is doing already a good job. So usually the UPDATE is not much more complex, or do I underestimate the complexity?

If I understand the principle here well it shall be required to add

for SystemAddress

Code: Select all

Update.pm
into https://github.com/znuny/Znuny/tree/dev ... temAddress

for Queue

Code: Select all

Update.pm
into https://github.com/znuny/Znuny/tree/dev ... dmin/Queue

Hope I understood this code section well.
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO power users and admins
Specialized for AI-based Solutions with Znuny

IT Governance Portal
Post Reply