fix(users): Online Users 'All time' filter returns empty (#28145) [1.13]#28210
Conversation
…28145) The /v1/users/online endpoint computed `now - timeWindow*60*1000` for the SQL threshold. When the UI sent `timeWindow=0` for the "All time" option, the threshold collapsed to `now`, producing `lastActivityTime > now` — which matched zero rows. Skip the time predicate entirely when `timeWindow <= 0` so the filter falls through to "all non-bot users". Reported via #27993.
Code Review ✅ ApprovedCherry-pick of the fix for the 'All time' online users filter, which now skips the time predicate when the window is zero to correctly return all non-bot users. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
🔴 Playwright Results — 13 failure(s), 16 flaky✅ 3756 passed · ❌ 13 failed · 🟡 16 flaky · ⏭️ 90 skipped
Genuine Failures (failed on all attempts)❌
|



Cherry-pick of #28145 to 1.13.
Summary
Closes #27993 on the 1.13 release branch.
The
/v1/users/onlineendpoint computed the SQL threshold asnow - timeWindow*60*1000. When the UI senttimeWindow=0for the All time dropdown option, the threshold collapsed tonow, producinglastActivityTime > now— which matches zero rows. The page therefore rendered empty whenever a user selected All.The fix skips the time predicate entirely when
timeWindow <= 0, so the filter falls through to "all non-bot users".Conflict resolution
UserResourceIT.javaimport block — kept both the existingSubjectCache/SubjectContextimports (already on 1.13) and the newHttpMethod/RequestOptionsimports the new test needs.Test plan
mvn -pl openmetadata-service,openmetadata-integration-tests -am test-compilepasses locally