fix: sort schedules by name in list query#4125
Merged
Siumauricio merged 2 commits intoDokploy:canaryfrom Apr 3, 2026
Merged
Conversation
Schedules were returned in arbitrary order from the database. Add orderBy clause to sort them alphabetically by name.
Updated the orderBy clause in the schedules query to sort by the createdAt field instead of the name, ensuring schedules are returned in the order they were created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
orderBy: [asc(schedules.name)]to theschedule.listquery so they are returned sorted alphabetically by nameGreptile Summary
This PR fixes the arbitrary ordering of scheduled tasks in the UI by adding
orderBy: [asc(schedules.name)]to theschedule.listquery, ensuring results are returned sorted alphabetically by name.ascis properly imported fromdrizzle-ormand applied to theschedules.namecolumn, which is already in use throughout the router.orderByarray syntax is the right approach for Drizzle ORM'sfindMany.Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix: sort schedules by name in list quer..." | Re-trigger Greptile
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!