Skip to content

Override default scope for Workshop#2515

Open
jonodrew wants to merge 1 commit intomasterfrom
fix-events-not-showing
Open

Override default scope for Workshop#2515
jonodrew wants to merge 1 commit intomasterfrom
fix-events-not-showing

Conversation

@jonodrew
Copy link
Contributor

@jonodrew jonodrew commented Mar 9, 2026

The default_scope for Workshop sorts events in descending order. For future events, we want them sorted in ascending order (ie soonest first). Because I don't know why this scope was added, and where else it's used, I'm not going to change it. Instead, I've updated the two 'upcoming' scopes to override the default ordering.

I tested this by generating 15 Workshops for various times over the next two weeks. Without this fix, the workshops were the 5 furthest from this point in time. With this fix, they were the 5 soonest.

The default_scope for Workshop sorts events in descending order. For future events, we want them sorted in ascending order (ie soonest first). Because I don't know why this scope was added, and where else it's used, I'm not going to change it. Instead, I've updated the two 'upcoming' scopes to override the default ordering.

I tested this by generating 15 Workshops for various times over the next two weeks. Without this fix, the workshops were the 5 furthest from this point in time. With this fix, they were the 5 soonest.

Signed-off-by: jonathan.kerr <3410350+jonodrew@users.noreply.github.com>
@jonodrew jonodrew requested a review from KimberleyCook March 9, 2026 16:10
@jonodrew jonodrew marked this pull request as draft March 9, 2026 16:30
@jonodrew
Copy link
Contributor Author

jonodrew commented Mar 9, 2026

Tests are all passing locally for me, so will rerun the failing set

@jonodrew jonodrew marked this pull request as ready for review March 9, 2026 16:51
Copy link

@octoberclub octoberclub left a comment

Choose a reason for hiding this comment

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

Default scopes can trip you up! Seems like a simple fix so approved it.

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