Skip to content

spo field set options inconsistency #3403

@milanholemans

Description

@milanholemans

Wrong option name

I noticed that this is the only spo field ... command that uses --name instead of --fieldTitle. So I think it is better that we mark this option as deprecated and introduce a new option -t, --fieldTitle [fieldTitle].

What should be done:

  • Introduce new option -t, fieldTitle
  • Mark option --name as deprecated
    • Mark as depracated on documentation.
  • Create new issue to remove --name as option in CLI v6

Example how to mark option as deprecated

if (args.options.id) {
this.warn(logger, `Option 'id' is deprecated. Please use 'listId' instead.`);
}
if (args.options.title) {
this.warn(logger, `Option 'title' is deprecated. Please use 'listTitle' instead.`);
}

Wrong validation message

Noticed that the command spo field set has a wrong validation message:

if (args.options.id && args.options.name) {
return `Specify viewId or viewTitle but not both`;
}

Validation message should be: Specify id or fieldTitle but not both (because name will be replaced by fieldTitle).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions