Compare commits

..

No commits in common. "705a352f365f5bfb123be77b7ba74d6e814a24ab" and "3402aa10f0f71b2691fc315513be90558b104c40" have entirely different histories.

2 changed files with 19 additions and 52 deletions

View File

@ -94,14 +94,14 @@ sub Configure {
Description => 'Whether to reorder other fields if an occupied order number is chosen. Defaults to 1.', Description => 'Whether to reorder other fields if an occupied order number is chosen. Defaults to 1.',
Required => 0, Required => 0,
HasValue => 1, HasValue => 1,
ValueRegex => qr/^[[0-1]{1}$/smx, ValueRegex => qr/\d/smx,
); );
$Self->AddOption( $Self->AddOption(
Name => 'valid', Name => 'valid',
Description => 'Whether the field to add is valid or invalid. Defaults to 1.', Description => 'Whether the field to add is valid or invalid. Defaults to 1.',
Required => 0, Required => 0,
HasValue => 1, HasValue => 1,
ValueRegex => qr/^[0-1]{1}$/smx, ValueRegex => qr/\d/smx,
); );
$Self->AddOption( $Self->AddOption(
Name => 'stdin', Name => 'stdin',

View File

@ -25,60 +25,27 @@ use warnings;
# OTOBO modules # OTOBO modules
use parent qw(Kernel::System::Console::BaseCommand);
our @ObjectDependencies = ( our @ObjectDependencies = (
'Kernel::System::DynamicField',
'Kernel::System::YAML',
'Kernel::System::JSON',
); );
sub Configure { =head1 NAME
my ( $Self, %Param ) = @_;
$Self->Description('List existing dynamic fields.'); [name_placeholder]
$Self->AddOption(
Name => 'field-type', =head1 DESCRIPTION
Description => 'Filter by comma-separated field type(s).',
Required => 0, [description_placeholder]
HasValue => 1,
ValueRegex => qr/[A-Za-z0-9,]+/smx, =head1 PUBLIC INTERFACE
);
$Self->AddOption( =head2 new()
Name => 'object-type',
Description => 'Filter by comma-separated object type(s).', create an object. Do not use it directly, instead use:
Required => 0,
HasValue => 1, my $ListObject = $Kernel::OM->Get('Kernel::System::Console::Command::Admin::DynamicField::List');
ValueRegex => qr/[A-Za-z0-9,]+/smx,
); =cut
$Self->AddOption(
Name => 'name-search',
Description => 'Filter by name or part of a name.',
Required => 0,
HasValue => 1,
ValueRegex => qr/[A-Za-z0-9-]+/smx,
);
$Self->AddOption(
Name => 'active',
Description => 'Filter by active state (0 or 1), default is both.',
Required => 0,
HasValue => 1,
ValueRegex => qr/^[0-1]{1}$/smx,
);
$Self->AddOption(
Name => 'verbose',
Description => 'If set, result includes complete config, otherwise only names and orders are given.',
Required => 0,
HasValue => 0,
);
$Self->AddOption(
Name => 'return-structure',
Description => 'Supported return structures are JSON and YAML, default is YAML.',
Required => 0,
HasValue => 1,
ValueRegex => qr/^(JSON)|(YAML)$/smx,
);
}
sub new { sub new {
my ( $Type, %Param ) = @_; my ( $Type, %Param ) = @_;