Actions
Bug #17920
closedDefaults match on iternal option name, not on the flag name
Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Marek
Description
Some options in hammer use internally option name different from the flag that is presented to users. Eg. all expanded resource identifiers:
--organization -> option_organization_name --location -> option_location_name
Defaults match on the internal name instead of the flag, which is counter-intuitive. Steps to reproduce:
- Create Org1, Org2
- Create users jane in Org1 and john in Org2
- Save defaults for --organization:
hammer defaults add --param-name organization --param-value Org1
- List users:
hammer user list
Actual results:
Ignores saved defaults and prints all users regardless the organization.
Expected results:
Should print only users from Org1
Additional info:
Default value is ignored because it hammer tries to look for "organization_name" and the key in defaults is "organization". Everything works when you save "organization_name" but it's counter-intuitive:
hammer defaults add --param-name organization_name --param-value Org1
Updated by Tomáš Strachota almost 8 years ago
- Status changed from New to Assigned
- Assignee set to Tomáš Strachota
Updated by The Foreman Bot almost 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/233 added
Updated by Tomáš Strachota almost 8 years ago
- Translation missing: en.field_release set to 233
Updated by Anonymous almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 5bf50733c576963a316b6978954a1b775b810a1c.
Updated by Andrew Kofink almost 8 years ago
- Blocked by Bug #19079: Adapt hammer-cli-katello to use the new options changes in hammer-cli added
Actions