UI: Fix inclusion condition for 'Other workflows' policy automation (#31358)

## #31333

- Include the "Other workflows" Policy automation option for all team
scenarios _except_ No team in regular (non-Primo) mode
- Manually confirmed this option is present in the intended situations
- Manually confirmed that Primo mode still does contain this option

![ezgif-3c63270745ec61](https://github.com/user-attachments/assets/3f2e8f6f-1b4a-4d88-9147-d013e7efcd7f)

- [x] QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:
- [x] Confirmed that the fix is not expected to adversely impact load
test results

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
jacobshandling 2025-07-28 13:54:16 -07:00 committed by GitHub
parent 77aa8da22b
commit ee5cadfe71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,6 +139,7 @@ const ManagePolicyPage = ({
currentTeamName,
currentTeamSummary,
isAllTeamsSelected,
isAnyTeamSelected,
isTeamAdmin,
isTeamMaintainer,
isRouteOk,
@ -1235,7 +1236,9 @@ const ManagePolicyPage = ({
placeholder="Manage automations"
options={
hasPoliciesToAutomate
? getAutomationsDropdownOptions(isAllTeamsSelected || isPrimoMode) // include "Other workflows" when all teams is selected and when in Primo mode
? getAutomationsDropdownOptions(
isAllTeamsSelected || isAnyTeamSelected || isPrimoMode
) // include "Other workflows" when all teams is selected, when a team other than No team is selected, and when in Primo mode (No team will be selected)
: []
}
variant="button"