Fixes #38805 - Remove options related to filter overrides#645
Fixes #38805 - Remove options related to filter overrides#645ofedoren merged 1 commit intotheforeman:masterfrom
Conversation
ofedoren
left a comment
There was a problem hiding this comment.
Thanks, @adamruzicka, LGTM, just one inline comment:
|
|
||
| class InfoCommand < HammerCLIForeman::InfoCommand | ||
| output ListCommand.output_definition do | ||
| HammerCLIForeman::References.taxonomies(self) |
There was a problem hiding this comment.
This information is still "there". WDYT about including it, but since it's on a different level, we could do it in two ways:
- Show at the same level to be "compatible" with the changes:
from :role do
collection :locations, _("Locations"), numbered: false, hide_blank: true do
custom_field Fields::Reference, name_key: :title
end
collection :organizations, _("Organizations"), numbered: false, hide_blank: true do
custom_field Fields::Reference, name_key: :title
end
end- Include it at
rolelevel, but this would require some additional changes:
field :role, _("Role"), Fields::Reference, details: [
{ key: :locations, structured_label: _('Locations'), except: :serialized },
{ key: :organizations, structured_label: _('Organizations'), except: :serialized }
], display_field_key: :nameand then in lib/hammer_cli_foreman/output/formatters.rb:36:
# ...
# The second check is for `base` adapter, since it's quite limited and this is a quick workaround instead of adding a better handler for nested structures (which I'm not sure we want for `base` though)
next if (detail[:id] && !show_ids) || (required_features & Array(detail[:except])).any?
# ...There was a problem hiding this comment.
"same level" meaning showing it as if it was a attribute of the filter itself?
There was a problem hiding this comment.
Yeap. Maybe include in the label (inherited), but that wouldn't as "compatible" then :/
There was a problem hiding this comment.
Went with this
# hammer filter info --id 338
Id: 338
Resource type: Location
Search: none
Role: zGptuCUriW
Permissions: view_locations, assign_locations
Created at: 2025/10/10 09:52:59
Updated at: 2025/10/10 09:52:59
Locations (inherited):
DVAErp
Organizations (inherited):
GxRhDkKoNeDD
5f287af to
ca8536d
Compare
ofedoren
left a comment
There was a problem hiding this comment.
Thanks, @adamruzicka, I think this is ready.
|
The main PR is merged, thus merging, thanks, @adamruzicka ! |
Companion to theforeman/foreman#10370