Project

General

Profile

Bug #28815

Custom reports have file extension ".text"

Added by Marek Hulán 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Reporting
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1792267

Description of problem:
Reports that don't use report_render macro have a plaintext format by default when generated. The downloaded file has the extenstion of ".text" which is unusual for text files.

Version-Release number of selected component (if applicable):
Sat 6.7; technically a regression because the extension was .txt in 6.6 but it's not specified what extension the text file should have

How reproducible:
Deterministic

Steps to Reproduce:
1. Create a custom report that doesn't have string 'report_render' in template
2. Generate it

Actual results:
A <report>.text file is downloaded

Expected results:
A <report>.txt file is downloaded

Associated revisions

Revision 032648cc (diff)
Added by Marek Hulán 7 months ago

Fixes #28815 - keep .txt extension for text reports

If a report template does not use report_render macro, the output format
selection is disabled and it's considered a plain text. Mimetype symbol
in this case is text and we use it for suggested file extension. However
for plain text file, it's expected to be .txt. Therefore we need an
exception in the symbol to extension conversion for this case. Other
supported types work fine and we can rely on Mimetype symbols.

History

#1 Updated by The Foreman Bot 7 months ago

  • Assignee set to Marek Hulán
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7372 added

#2 Updated by The Foreman Bot 7 months ago

  • Fixed in Releases 2.0.0 added

#3 Updated by Marek Hulán 7 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Tomer Brisker 5 months ago

  • Category changed from Statistics to Reporting

Also available in: Atom PDF