Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Case Sensitivity Issue with "direction" Parameter in CLI #28143

Closed
bryanboza opened this issue Apr 3, 2024 · 3 comments · Fixed by #29052 or #29090
Closed

CLI: Case Sensitivity Issue with "direction" Parameter in CLI #28143

bryanboza opened this issue Apr 3, 2024 · 3 comments · Fixed by #29052 or #29090

Comments

@bryanboza
Copy link
Member

bryanboza commented Apr 3, 2024

Problem Statement

In the dotCMS Command Line Interface (CLI), there is an issue where the "direction" parameter is case sensitive. This inconsistency causes inconvenience for users, especially when specifying sorting direction, as they may unintentionally use incorrect capitalization and encounter unexpected behavior.
image

image

Steps to Reproduce

  • Access the dotCMS Command Line Interface (CLI) using appropriate credentials.
  • Execute a command that includes the "direction" parameter with different capitalization (e.g., "asc", "ASC", "desc", "DESC") to specify sorting direction.
  • Observe that the CLI does not recognize the parameter if the capitalization does not match the expected format.

Acceptance Criteria

  • Case Insensitivity: Enhance the dotCMS CLI to make the "direction" parameter case insensitive, allowing users to specify sorting direction regardless of capitalization (e.g., "asc", "ASC", "desc", "DESC").
  • Consistent Parameter Recognition: Ensure that the CLI accurately recognizes and interprets the "direction" parameter regardless of capitalization, maintaining consistent behavior across different commands.
  • Documentation Update: Update the CLI documentation to inform users about the case insensitivity of the "direction" parameter and how to use it effectively.

dotCMS Version

Tested on master // lastest CLI version

Proposed Objective

Quality Assurance

Proposed Priority

Priority 2 - Important

github-merge-queue bot pushed a commit that referenced this issue Jun 28, 2024
### Proposed Changes
* Transform the direction parameter to uppercase
* Add test cases
* Update CLI documentation to reflect this change

### Screenshots

![screenshot-case-insensitive-fix](https://github.com/dotCMS/core/assets/77643678/88bfad81-d990-46b4-a54b-b53433a14730)

This PR fixes: #28143
@rjvelazco
Copy link
Contributor

Passed Internal QA

  • Tested on @dotcms/dotcli@rc NPM package: [dotCLI 1.0.0-SNAPSHOT]

Video

issue-28143-cli-case-sensitivity-issue-with-direction-parameter.mov

@rjvelazco
Copy link
Contributor

rjvelazco commented Jul 1, 2024

Note to QA

The @dotcms/dotcli needs to be updated. We use the @dotcms/dotcli@rc for IQA testing.

P.S.: You can ask @dcolina to update the @dotcms/dotcli packaged

github-merge-queue bot pushed a commit that referenced this issue Jul 2, 2024
### Proposed Changes
* update adoc file to match @CommandLine.Option description
This PR fixes: #28143
@bryanboza
Copy link
Member Author

Fixed, tested on the last trunk and now this is working as expected

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment