Project

General

Profile

Bug #15549

'reports:expire' rake task 'status' parameter documentation doesn't match behaviour

Added by Alex Fisher about 2 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
rake tasks
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

This is the documentation from https://github.com/theforeman/foreman/blob/1.11.3/lib/tasks/reports.rake

desc <<-END_DESC
Expire Reports automatically
Available conditions:
  * days        => number of days to keep reports (defaults to 7)
  * status      => status of the report (defaults to 0 --> "reports with no errors")
  * report_type => report type (defaults to config_report), accepts either underscore / class name styles
  Example:
    rake reports:expire days=7 RAILS_ENV="production" # expires all reports regardless of their status
    rake reports:expire days=1 status=0 RAILS_ENV="production" # expires all non interesting reports after one day
    rake reports:expire report_type=my_report days=3 # expires all reports of type MyReport (underscored style) from the last 3 days.
    rake reports:expire report_type=MyReport days=3 # expires all reports of type MyReport (class name style) from the last 3 days.
END_DESC

The documentation for `status` says it defaults to 0 (reports with no errors).
The first example contradicts this.

rake reports:expire days=7 RAILS_ENV="production" # expires all reports regardless of their status

The example correctly describes the current behaviour. There is no default for `status`
https://github.com/theforeman/foreman/blob/1.11.3/app/models/report.rb#L78

Should the documentation be changed to match the behaviour, or should the code be updated instead?

Associated revisions

Revision fd0f94de (diff)
Added by Lonneke Vuur 4 months ago

Fixes #15549 - Correct documentation for exports rake task

History

#1 Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5549 added

#2 Updated by Tomer Brisker 4 months ago

  • Legacy Backlogs Release (now unused) set to 353

#3 Updated by Anonymous 4 months ago

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

Also available in: Atom PDF