Order epics in issue board swimlanes alphabetically by adding sort argument to board epics GraphQL resolver
What does this MR do and why?
This MR adds a sort argument to board.epics GraphQL resolver using the existing EpicSortEnum type, so the board.epics field can return epics in a specified order. This is the backend half of the change.
The frontend MR !228783 (merged) will follow to pass TITLE_ASC by default.
Why was this MR needed?
When using issue board swimlanes grouped by epic, epics appeared in reverse creation order (ID descending). This made it difficult for users to locate specific epics, especially in groups with many of them. The board.epics GraphQL field did not accept a sort argument, so there was no way to control the ordering. The EpicSortEnum and sort_by_attribute already existed in the codebase for other epic endpoints, so this change just wires them through the board epics resolver.
What are the relevant issue numbers?
Closes #497391 (closed)
How to set up and validate locally
- Run the resolver tests:
bundle exec rspec ee/spec/graphql/resolvers/board_groupings/epics_resolvers_spec.rb - All 13 tests should pass (11 existing + 2 new sort tests)
Does this MR meet the acceptance criteria?
- Tests added for new behavior (2 new sort tests in the resolver spec)
- All existing tests passing (13 backend)
- Follows project style guide
- No breaking changes introduced
- GraphQL docs and introspection schemas regenerated