Prepared dynamic field delete command.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Stefan Härter 2023-10-10 18:57:05 +02:00
parent 04a2a6adcb
commit cc90f9719b

View File

@ -25,40 +25,48 @@ use warnings;
# OTOBO modules # OTOBO modules
our @ObjectDependencies = ( use parent qw(Kernel::System::Console::BaseCommand);
our @ObjectDependencies = (
'Kernel::System::DynamicField',
); );
=head1 NAME sub Configure {
my ( $Self, %Param ) = @_;
[name_placeholder] $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,
);
=head1 DESCRIPTION return;
[description_placeholder]
=head1 PUBLIC INTERFACE
=head2 new()
create an object. Do not use it directly, instead use:
my $DeleteObject = $Kernel::OM->Get('Kernel::System::Console::Command::Admin::DynamicField::Delete');
=cut
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {%Param};
bless( $Self, $Type );
return $Self;
} }
sub Run { sub Run {
my ( $Self, %Param ) = @_; my ( $Self, %Param ) = @_;
return;
} }
1; 1;