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

"sf package version create list -c 0" does not filter results #2668

Closed
chris-duncan-adaptiva opened this issue Jan 26, 2024 · 2 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@chris-duncan-adaptiva
Copy link

chris-duncan-adaptiva commented Jan 26, 2024

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.

Yes

  • You've searched both open and closed issues for related posts.

Yes

  • You've used the doctor command to diagnose common issues.

Yes

  • You understand that GitHub Issues don't adhere to any agreement or SLA.

Yes

  • If you require immediate assistance, use official channels such as Salesforce Customer Support.

N/A

Summary

The documentation for sf package version create list describes the following flag:

-c, --created-last-days=<value>  Number of days since the request was created, starting at 00:00:00 of first day to now. Use 0 for today.

However, passing "0" to this flag does not filter the results as described. In fact, it returns all results.

Steps To Reproduce

IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Repo provided, but issue is independent of code.
https://github.com/chris-duncan-adaptiva/dreamhouse-2668

  1. Clone repo and cd into folder.
  2. Authorize a Dev Hub and set it as default.
  3. Create a package.
  4. Create a package version.
  5. Wait one or more days.
  6. Create another package version.
  7. That same day, run sf package version create list -c 0

Expected result

Returns table which only includes second package version create request since it was created today.

Actual result

Returns table which includes both package version create requests.

System Information

Which shell or terminal are you using?

bash, pwsh

sf version --verbose --json

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.25.7",
  "nodeVersion": "node-v20.10.0",
  "osVersion": "Windows_NT 10.0.22621",
  "rootPath": "C:\\Users\\ChrisDuncan\\AppData\\Roaming\\nvm\\v20.10.0\\node_modules\\@salesforce\\cli",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.5 (core)",
    "@oclif/plugin-commands 3.1.1 (core)",
    "@oclif/plugin-help 6.0.12 (core)",
    "@oclif/plugin-not-found 3.0.9 (core)",
    "@oclif/plugin-plugins 4.1.17 (core)",
    "@oclif/plugin-search 1.0.12 (core)",
    "@oclif/plugin-update 4.1.8 (core)",
    "@oclif/plugin-version 2.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.9 (core)",
    "@oclif/plugin-which 3.0.15 (core)",
    "@salesforce/cli 2.25.7 (core)",
    "apex 3.0.18 (core)",
    "auth 3.3.2 (core)",
    "custom-metadata 3.0.7 (user)",
    "data 3.0.16 (core)",
    "deploy-retrieve 3.2.0 (core)",
    "info 3.0.17 (core)",
    "limits 3.1.4 (core)",
    "marketplace 1.0.16 (core)",
    "org 3.3.5 (core)",
    "packaging 2.1.3 (user)",
    "schema 3.1.0 (core)",
    "settings 2.0.17 (core)",
    "sobject 1.1.2 (core)",
    "source 3.1.5 (core)",
    "telemetry 3.1.10 (core)",
    "templates 56.0.10 (core)",
    "trust 3.3.2 (core)",
    "user 3.2.3 (core)"
  ]
}

Additional information

  • Issue is present with both --created-last-days flag and -c shorthand flag.
  • Issue is present whether value "0" is quoted or unquoted.
  • Issue is present with both the current sf plugin version 2.1.1 and latest version on npm 2.1.3
  • Executing query manually works as expected:
    • sf data query -t -o <DevHubAlias> --query 'SELECT Id FROM Package2VersionCreateRequest WHERE CreatedDate = LAST_N_DAYS:0'
  • Executing query with any other number works as expected:
    • sf package version create list -c 1 = results from yesterday and today
    • sf package version create list -c -1 = "Error (1): Provide a valid positive number for createdlastdays."
@chris-duncan-adaptiva chris-duncan-adaptiva added the investigating We're actively investigating this issue label Jan 26, 2024
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 26, 2024
@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Jan 26, 2024
Copy link

git2gus bot commented Jan 26, 2024

This issue has been linked to a new work item: W-14898097

@mshanemc mshanemc closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants