Actions
Refactor #20607
closedAllow hiding fields which are missing from api output
Difficulty:
Triaged:
No
Pull request:
Team Backlog:
Description
Currently fields in hammer have :hide_blank option, that enables hiding fields from output when their source is nil (in case of the basic field) or empty (in case of container fields):
field :description, _("Description"), Fields::LongText, :hide_blank => true
This clears the difference between the situation when api returns empty array or hash (eg. locations enabled but no location is assigned)
{ organization_ids: [], location_ids: [] }
and when it doesn't return it at all (vs. locations disabled)
{ organization_ids: [] }
Hammer should provide also :hide_missing to hide fields that are missing from the api responses. This option is also important for hiding fields that are available only in newer versions in Foreman to keep backwards compatibility. Therefore it should probably default to true and fields that are missing in the api response should normally be hidden.
Updated by Tomáš Strachota over 7 years ago
- Related to Tracker #20605: Backward compatibility support added
Updated by Tomáš Strachota over 7 years ago
- Related to Tracker #14914: Tracker for output related issues added
Updated by The Foreman Bot about 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/256 added
Updated by The Foreman Bot almost 7 years ago
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/345 added
Updated by Oleh Fedorenko over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset f97d198198b413bf036056fcfe9a0127042414e6.
Updated by Tomer Brisker about 6 years ago
- Fixed in Releases hammer-cli 0.14.0 added
Actions