Project

General

Profile

Actions

Bug #15549

closed

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

Added by Alex Fisher over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Rake tasks
Target version:
Difficulty:
trivial
Triaged:
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?

Actions #1

Updated by The Foreman Bot almost 7 years ago

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

Updated by Tomer Brisker almost 7 years ago

  • Translation missing: en.field_release set to 353
Actions #3

Updated by Anonymous almost 7 years ago

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

Also available in: Atom PDF