Bug 1907992 - Subsequent click of Tasks search button do not search again
Summary: Subsequent click of Tasks search button do not search again
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.7.0
Hardware: All
OS: All
unspecified
low
Target Milestone: 6.9.0
Assignee: Maria
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-15 16:06 UTC by Dylan Gross
Modified: 2021-04-21 13:24 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-foreman-tasks-3.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:24:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5650651 0 None None None 2020-12-15 16:28:44 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:24:45 UTC

Description Dylan Gross 2020-12-15 16:06:35 UTC
Description of problem:

  On the "Monitor" -> "Tasks" page, if the user searches for a word, and then clicks the "search" button a second time to update the results, it does nothing.

Version-Release number of selected component (if applicable):

   Red Hat Satellite 6.7.4

How reproducible:
Steps to Reproduce:
1.  Produce an action that generates a task. (I ran a remote job against a host "myhostname"

2.  Type "myhostname" in the search field and click the search button

3.  Observe resulting task being found.

4.  Without navigating away from that Tasks page, perform an action that will generate another task that should show for that search.  (Example:  In another browser window or via hammer, schedule another remote job against that same host).

5.  Back in the Tasks window, without changing the search field, click the "Search" button again.

Actual results:

   - The search results are not updated.
   - Clicking the search button does NOT result in another GET in the /var/log/foreman/production.log log.

Expected results:

   When clicking search with a valid search term, regardless of prior actions, it should search and display relevant results.

Additional info:

 The following is observed during the first search in /var/log/foreman/production.log.

2020-12-15T14:49:13 [I|app|114ac7e1] Started GET "/foreman_tasks/api/tasks?search=myhostname&page=1&include_permissions=true" for 192.168.x.x at 2020-12-15 14:49:13 +0000
2020-12-15T14:49:13 [I|app|114ac7e1] Processing by ForemanTasks::Api::TasksController#index as JSON
2020-12-15T14:49:13 [I|app|114ac7e1]   Parameters: {"search"=>"myhostname", "page"=>"1", "include_permissions"=>"true"}

  However, there is no resulting log entry from a subsequent click of the search button, unless the search field is modified (add whitespace).   The second task (from reproduction step 4) will also not show up in the results unless the search field is modified (not just clicked on), or the tasks page is entirely reloaded.

Comment 1 Adam Ruzicka 2020-12-17 09:52:51 UTC
There should be a dedicated "Refresh data" button on the page. Does that one work as a workaround until this gets fixed?

Comment 2 Dylan Gross 2020-12-21 20:03:32 UTC
I'm not seeing any dedicated "Refresh data" button on the page (in 6.7.z), but I do see it in the v6.8 UI.  I suspect it was added in the most recent version with the other task page changes.

However, Refreshing the page itself (via a browser page reload) is an acceptable workaround, as is modifying the search to add whitespace.

(The behaviour of not searching on the second click of the search button remains the same between versions though)

Comment 3 Adam Ruzicka 2021-02-19 16:16:05 UTC
Fix is merged in upstream and released in foreman-tasks-3.0.4.

Comment 4 Peter Ondrejka 2021-03-02 08:17:45 UTC
Verified on Satellite 6.9 snap 15, the subsequent search request refreshes the data as expected

Comment 7 errata-xmlrpc 2021-04-21 13:24:23 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 (Moderate: Satellite 6.9 Release), 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-2021:1313


Note You need to log in before you can comment on or make changes to this bug.