Project

General

Profile

Actions

Refactor #20607

closed

Allow hiding fields which are missing from api output

Added by Tomáš Strachota over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Fixed in Releases:
Found in Releases:
In Kanboard:

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.


Related issues 2 (0 open2 closed)

Related to Hammer CLI - Tracker #20605: Backward compatibility supportClosed

Actions
Related to Hammer CLI - Tracker #14914: Tracker for output related issuesClosed

Actions
Actions #1

Updated by Tomáš Strachota over 7 years ago

Actions #2

Updated by Tomáš Strachota over 7 years ago

Actions #3

Updated by Oleh Fedorenko about 7 years ago

  • Assignee set to Oleh Fedorenko
Actions #4

Updated by Oleh Fedorenko about 7 years ago

  • Status changed from New to Assigned
Actions #5

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
Actions #6

Updated by The Foreman Bot almost 7 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/345 added
Actions #7

Updated by Oleh Fedorenko over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #8

Updated by Tomer Brisker over 6 years ago

  • Fixed in Releases hammer-cli 0.14.0 added
Actions

Also available in: Atom PDF