fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Manage automations link on Policies only shows up when a policy which can be automated is in list view

Open allenhouchins opened this issue 1 year ago • 1 comments

Fleet version: 4.58.0 Web browser and operating system: Any


💥  Actual behavior

The Manage automations link is only visible if there is a policy in view that can run automations.

🧑‍💻  Steps to reproduce

  1. Create more than 20 Policies and assign them to All Teams so these policies show up as Inherited and can't run a policy automation (ex: upload the CIS benchmarks to All Teams)
  2. Create a policy with a name that puts it at the end of the list and assign it to a test team so it can be assigned an automation
  3. Observe the Manage automations link only shows up once you click Next (or filter the policy) so it is rendered in view

🕯️ More info (optional)

Because I uploaded all the CIS benchmarks, I had to scroll through pages of Policies in order to find an edit a policy that had a script automation attached to it.

Screenshot 2024-10-21 at 9 39 19 AM Screenshot 2024-10-21 at 9 47 25 AM

allenhouchins avatar Oct 21 '24 14:10 allenhouchins

related https://github.com/fleetdm/fleet/issues/23051

PezHub avatar Oct 21 '24 16:10 PezHub

I was able to reproduce.

Frontend should render the Manage automations link if the team policy count is > 0 (GET /api/latest/fleet/team/{team_id}/policies/count without setting merge_inherited).

Also there's the following related bug that if you have:

  • Create team policy called Aaaaa
  • 100 CIS policies in All teams (global policies). You can do fleetctl apply -f ./ee/cis/macos-14/cis-policy-queries.yml
  • Create team policy called Zzzzz

Then on the first page if you click on Manage automations, Zzzzz is not displayed. On the last page if you click on Manage automations, Aaaaa is not displayed.

lucasmrod avatar Oct 22 '24 16:10 lucasmrod

Duplicate with #23243. Closing

sharon-fdm avatar Oct 28 '24 17:10 sharon-fdm

Manage link hidden, Policies, like clouds aloft. Ease now in each view.

fleet-release avatar Oct 28 '24 17:10 fleet-release