Project

General

Profile

Bug #25878

New lines in text attributes break the hammer output

Added by Ondřej Pražák about 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Organizations and locations
Target version:
-
Team Backlog:
Hammer
Fixed in Releases:
Found in Releases:
In Kanboard:

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".

Associated revisions

Revision a4dcbe73 (diff)
Added by Oleh Fedorenko 4 months ago

Fixes #25878 - New lines in text attr dont break output (#300)

Revision c65b3ef0 (diff)
Added by Oleh Fedorenko 4 months ago

Refs #25878 - New lines in text attr dont break output (#415)

History

#1 Updated by Martin Bacovsky about 1 year ago

  • Triaged changed from No to Yes
  • Subject changed from New lines in text attributes break the hammer output to New lines in text attributes break the hammer output

#2 Updated by Oleh Fedorenko 10 months ago

  • Assignee set to Oleh Fedorenko
  • Status changed from New to Assigned

#3 Updated by The Foreman Bot 10 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/300 added

#4 Updated by The Foreman Bot 10 months ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/415 added

#5 Updated by Martin Bacovsky 5 months ago

  • Team Backlog Hammer added

#6 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases hammer-cli-0.19.0 added

#7 Updated by Oleh Fedorenko 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF