Actions
Bug #15549
closed'reports:expire' rake task 'status' parameter documentation doesn't match behaviour
Difficulty:
trivial
Triaged:
Pull request:
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?
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
Updated by Tomer Brisker almost 7 years ago
- Translation missing: en.field_release set to 353
Updated by Anonymous almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset fd0f94de45df49f170ce4a92e8550d4cb38ffdeb.
Actions