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

--sort-by and --sort-order flags not working with --include flag #2682

Open
dsmaugy opened this issue Sep 3, 2024 · 0 comments
Open

--sort-by and --sort-order flags not working with --include flag #2682

dsmaugy opened this issue Sep 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dsmaugy
Copy link

dsmaugy commented Sep 3, 2024

Describe the bug

There are a couple of issues at hand with the --sort-by, --include, and --sort-order flags when running jf rt search with --recursive=false and --include-dirs.

Specifying --sort-by removes the object props from the query response. Manually requesting properties via --include="props" does not respect sort order if --sort-order is also included.

This might be related to 649?

Current behavior

  1. Running jf rt search <path> --recursive=false --include-dirs returns the directories at the given path with any included properties as intended. However if --sort-by="created" is specified, the properties are removed from the query response.
  2. Running jf rt search <path> --recursive=false --include-dirs --include="path;type;created;property" --sort-by="created" ---sort-by=desc includes the properties in the response, but the order specified by --sort-order is not respected.

Reproduction steps

Run jf rt search <path> --recursive=false --include-dirs --include="path;type;created;property" --sort-by="created" ---sort-by=desc

The returned response is not sorted in descending order by creation date.

Expected behavior

I expected to see a JSON response object with a list of directories with their corresponding properties in sorted descending order.

JFrog CLI version

2.66.0

Operating system type and version

MacOS

JFrog Artifactory version

Jfrog Cloud

JFrog Xray version

No response

@dsmaugy dsmaugy added the bug Something isn't working label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant