Skip to content

Fix Task Form Bugs - #10358

Open
ohhAndy wants to merge 1 commit into
ManageIQ:masterfrom
ohhAndy:fix-task-form-bugs
Open

ohhAndy wants to merge 1 commit into
ManageIQ:masterfrom
ohhAndy:fix-task-form-bugs

Conversation

@ohhAndy

@ohhAndy ohhAndy commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Fixes #9471

Depends on: ManageIQ/manageiq#24004

Fixes several bugs in the Tasks UI that have been present since the named scope filter path was introduced in #2585 . Filters for zone, user, status, and My Tasks were either silently ignored or producing incorrect results.

My Tasks (Should only show user's tasks) (60 vs 15 tasks)

Before:

image

After:

image

All Tasks (Zone Filter) (490 vs 20)

Before:

image

After:

image

All Tasks (User Filter) (490 vs 15)

Before:

image

After:

image

All Tasks (Time Period Filter) (490 vs 60)

Before:

image

After:

image

All Tasks (Checkboxes) (Only Ok unchecked) (376 vs 48)

Before:

image

After:

image

@miq-bot assign @GilbertCherrie
@miq-bot add-label bug
@miq-bot add-reviewer @GilbertCherrie

@ohhAndy
ohhAndy requested a review from a team as a code owner October 8, 2026 16:55
@miq-bot miq-bot added the bug label Oct 8, 2026
@miq-bot
miq-bot requested a review from GilbertCherrie October 8, 2026 16:56

# Add status scope
status = (opts.compact.symbolize_keys.keys & %i[ok queued error warn running])
status = %i[ok queued error warn running].select { |s| opts[s] }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.compact only removes nil, but opts stores the checkbox as a boolean, so false entries dont get removed.

...taskStatus,
],
);
if (Array.isArray(taskStatus) && taskStatus.length > 0) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty array could pass the check, so this is just an extra guardrail

when "tasks_1" then @layout = "my_tasks"
when "tasks_2", "alltasks_2" then @layout = "all_tasks"
end
tasks_set_default_options

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_jobs_tab already calls this, so this could reset/override presets and is redundant

@miq-bot

miq-bot commented Oct 9, 2026

Copy link
Copy Markdown
Member

Checked commit ohhAndy@5a612f8 with ruby 3.3.12, rubocop 1.91.0, haml-lint 0.78.0, and yamllint 1.37.1
1 file checked, 0 offenses detected
Everything looks fine. 🍰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings/Tasks filtering by "24 hour time period" doesn't filter by updated/started/queued timestamps (also zone and user don't filter)

3 participants