Bug 1723670

Summary: [RFE] print applied filter on task export
Product: Red Hat Satellite Reporter: Steffen Froemer <sfroemer>
Component: Tasks PluginAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: aruzicka, bkearney, inecas, pcreech
Target Milestone: 6.7.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:24:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steffen Froemer 2019-06-25 06:33:20 UTC
1. Proposed title of this feature request
[RFE] print applied filter on task export


3. What is the nature and description of the request?
There are different filters, some are default, some are configured using ENV variables when running task export. But it's not always clear, what type of filter is applied.

for example:
1) foreman-rake foreman_tasks:export_tasks TASK_SEARCH=all TASK_DAYS=3  -> 16 tasks
2) foreman-rake foreman_tasks:export_tasks TASK_SEARCH='' TASK_DAYS=3   -> 2822 tasks
3) foreman-rake foreman_tasks:export_tasks TASK_SEARCH=ALL TASK_DAYS=3  -> 16 tasks
4) foreman-rake foreman_tasks:export_tasks TASK_DAYS=3                  -> 2835 tasks
5) foreman-rake foreman_tasks:export_tasks                              -> 7396 tasks
6) foreman-rake foreman_tasks:export_tasks TASK_SEARCH=''               -> 32153 tasks



4. Why does the customer need this? (List the business requirements here)
To avoid confusion and mistakes

5. How would the customer like to achieve this? (List the functional requirements here)
Print the applied filter when running the command. Similar to cleanup-task 

     foreman-rake  foreman_tasks:cleanup NOOP=true VERBOSE=true AFTER=60d TASK_SEARCH=''
       ...
     [noop] deleting all tasks matching filter started_at < "2019-04-25 09:12:13" AND state = stopped


6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
When the command is executed, it should print the applied filter on stdout.


7. Is there already an existing RFE upstream or in Red Hat Bugzilla?
no


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
asap


9. Is the sales team involved in this request and do they have any additional input?
no


10. List any affected packages or components.
tfm-rubygem-foreman-tasks


11. Would the customer be able to assist in testing this functionality if implemented?
sure

Comment 4 Adam Ruzicka 2019-06-26 07:52:41 UTC
Created redmine issue http://projects.theforeman.org/issues/27161 from this bug

Comment 5 Bryan Kearney 2019-06-26 14:07:27 UTC
Upstream bug assigned to aruzicka

Comment 6 Bryan Kearney 2019-06-26 14:07:29 UTC
Upstream bug assigned to aruzicka

Comment 7 Bryan Kearney 2019-07-17 18:07:37 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27161 has been resolved.

Comment 8 Peter Ondrejka 2020-01-03 09:53:24 UTC
Verified on Sat 6.7 snap 7 using examples from the problem description

Comment 11 errata-xmlrpc 2020-04-14 13:24:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454