Skip to content

Event Ordering Issue fix - #746

Open
Akhill2020 wants to merge 1 commit into
mainfrom
issue-event-ordering-issue
Open

Event Ordering Issue fix#746
Akhill2020 wants to merge 1 commit into
mainfrom
issue-event-ordering-issue

Conversation

@Akhill2020

@Akhill2020 Akhill2020 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description: Fixed. List view was rendering events in the wrong order when “Expand Multi-day Events” was set to “No”.

Cause: Calendar::set_events() sorts event buckets by end time (for navigation bounds). With expand off, that order is left alone. List view then walked those buckets as-is and only sorted within each start-time group—so Late Lunch (ends 3pm) appeared before Event Party (ends 6pm), even though Party starts earlier.

Clickup: https://app.clickup.com/t/1867958/86d32p6gc
After: https://drive.google.com/file/d/1F_1dgIUK48gblZ_dPdD06GOukxPWa3a7/view?usp=drivesdk

Summary by CodeRabbit

  • Bug Fixes
    • Calendar event lists now display events in chronological order across all event groups for each day.
    • Existing filtering, styling, visibility limits, and day-state behavior remain unchanged.

@Akhill2020
Akhill2020 requested a review from rosinghal August 5, 2026 11:37
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a6a801d-3c48-4fef-a55f-d59901427dc9

📥 Commits

Reviewing files that changed from the base of the PR and between f9d1789 and 5d64137.

📒 Files selected for processing (1)
  • includes/calendars/views/default-calendar-list.php

📝 Walkthrough

Walkthrough

draw_list() now flattens each day’s event groups and sorts all events by start time before rendering. Existing filtering, styling, visibility limits, markup, and day-state updates remain unchanged.

Changes

Calendar event ordering

Layer / File(s) Summary
Flatten and sort daily events
includes/calendars/views/default-calendar-list.php
Daily event groups are combined and sorted by cmp() before rendering. Existing rendering and day-state logic remains in place.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: rosinghal

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing event ordering in the calendar list view.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-event-ordering-issue

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 PHPStan (2.2.7)

PHP Warning: require(/vendor/composer/../guzzlehttp/promises/src/functions_include.php): Failed to open stream: No such file or directory in /vendor/composer/autoload_real.php on line 39
Warning: require(/vendor/composer/../guzzlehttp/promises/src/functions_include.php): Failed to open stream: No such file or directory in /vendor/composer/autoload_real.php on line 39
PHP Fatal error: Uncaught Error: Failed opening required '/vendor/composer/../guzzlehttp/promises/src/functions_include.php' (include_path='.:/usr/share/pear:/usr/share/php') in /vendor/composer/autoload_real.php:39
Stack trace:
#0 /vendor/composer/autoload_real.php(43): {closure}()
#1 /vendor/autoload.php(22): ComposerAutoloaderInit0248fdf029b8abd0ce3787652580d175::getLoader()
#2 phar:///usr/bin/phpstan/bin/phpstan(49): require_once('...')
#3 phar:///usr/bin/phpstan/bin/phpstan(110): _PHPStan_88a9c7bcc{closure}()
#4 /usr/bin/phpstan(7): require('...')
#5 {main}
thrown in /vendor/composer/autoload_real.php on line 39
Fatal error: Uncaught Error: Failed opening required '/vendor/composer/../guzzlehttp/promises/src/functions_include.php' (include_path='.:/usr/share/pear:/usr/share/php') in /vendor/composer/autoload_real.php:39
Stack trace:
#0 /vendor/composer/autoload_real.php(43): {closure}()
#1 /vendor/autoload.php(22): ComposerAutoloaderInit0248fdf029b8abd0ce3787652580d175::getLoader()
#2 phar:///usr/bin/phpstan/bin/phpstan(49): require_once('...')
#3 phar:///usr/bin/phpstan/bin/phpstan(110): _PHPStan_88a9c7bcc{closure}()
#4 /usr/bin/phpstan(7): require('...')
#5 {main}
thrown in /vendor/composer/autoload_real.php on line 39


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants