Bug #25878
closedNew lines in text attributes break the hammer output
Description
When there are new lines in the text attributes, it affect how hammer displays individual rows. As a result, the following commands cannot be used to retrieve ids.
hammer organization list | grep vE '\-|ID' | awk '{ print $1 }'
hammer --csv organization list | grep -vi '^id' | awk -F, '{ print $1 }'
Because there is a newline character in the "Description" field on the "Edit <Organization Name>" page available at Administer > Organizations > Primary, the text on the new line will show up in the "ID" field of the commands above.
Reproducible: Always
Steps to Reproduce:
1. Create an Organization with additional information on a new line in the Description field.
2. Login to the CLI of the Foreman server as an admin user.
3. Run the commands included in this bug report.
Additionally, there are two "Description" fields in the output of "hammer organization list".
Updated by Martin Bacovsky almost 6 years ago
- Subject changed from New lines in text attributes break the hammer output to New lines in text attributes break the hammer output
- Triaged changed from No to Yes
Updated by Oleh Fedorenko over 5 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
Updated by The Foreman Bot over 5 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/300 added
Updated by The Foreman Bot over 5 years ago
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/415 added
Updated by The Foreman Bot about 5 years ago
- Fixed in Releases hammer-cli-0.19.0 added
Updated by Oleh Fedorenko about 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset a4dcbe7389efbcfdc9de7cbaecb91178eaa3e3ec.