# -- # OTOBO is a web-based ticketing system for service organisations. # -- # Copyright (C) 2001-2020 OTRS AG, https://otrs.com/ # Copyright (C) 2019-2023 Rother OSS GmbH, https://otobo.de/ # -- # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -- package Kernel::System::Console::Command::Admin::DynamicField::Delete; use strict; use warnings; # core modules # CPAN modules # OTOBO modules use parent qw(Kernel::System::Console::BaseCommand); our @ObjectDependencies = ( 'Kernel::System::DynamicField', ); sub Configure { my ( $Self, %Param ) = @_; $Self->Description('Delete an existing dynamic field.'); $Self->AddArgument( Name => 'name', Description => 'Delete dynamic field by name.', Required => 0, ValueRegex => qr/([A-Za-z0-9]+\-)?[A-Za-z0-9]+/smx, ); $Self->AddArgument( Name => 'id', Description => 'Delete dynamic field by field id.', Required => 0, ValueRegex => qr/\d+/smx, ); $Self->AddOption( Name => 'dry-run', Description => 'Perform a dry run and show which field whould be deleted.', Required => 0, HasValue => 0, ); $Self->AddOption( Name => 'execute', Description => 'Execute the deletion.', Required => 0, HasValue => 0, ); return; } sub Run { my ( $Self, %Param ) = @_; return; } 1;