Bug #15549
'reports:expire' rake task 'status' parameter documentation doesn't match behaviour
Pull request:
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
History
#1
Updated by The Foreman Bot about 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5549 added
#2
Updated by Tomer Brisker about 4 years ago
- Legacy Backlogs Release (now unused) set to 353
#3
Updated by Anonymous about 4 years ago
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Applied in changeset fd0f94de45df49f170ce4a92e8550d4cb38ffdeb.
Fixes #15549 - Correct documentation for exports rake task