Skip to content

Feat/170/get all sprints#178

Merged
Kimoo193 merged 4 commits into
mainfrom
feat/170/get-all-sprints
Apr 18, 2025
Merged

Feat/170/get all sprints#178
Kimoo193 merged 4 commits into
mainfrom
feat/170/get-all-sprints

Conversation

@Kimoo193
Copy link
Copy Markdown
Contributor

PR Checklist (required)

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:

Related Issue

Closes #170

@Kimoo193 Kimoo193 added the feature For new feature label Apr 18, 2025
@Kimoo193 Kimoo193 requested a review from Copilot April 18, 2025 21:19
@Kimoo193 Kimoo193 self-assigned this Apr 18, 2025
@Kimoo193 Kimoo193 linked an issue Apr 18, 2025 that may be closed by this pull request
@Kimoo193
Copy link
Copy Markdown
Contributor Author

This pull request introduces a new feature to retrieve all sprints for a specific project, including the necessary backend implementation and route configuration. The changes ensure proper validation, pagination, and access control.

New Feature: Retrieve All Sprints for a Project

  • Controller Implementation: Added a new getAllSprints function in src/controllers/sprint.controller.js to handle fetching sprints for a project. This includes:

    • Parameter validation for organization, team, and project IDs.
    • Pagination and sorting by start date (newest first).
    • Access control to ensure only authorized users can view sprints.
    • Formatting the response with sprint details and pagination metadata.
  • Route Configuration: Added a new route in src/routes/sprint.routes.js to expose the GET /api/organization/:organizationId/team/:teamId/project/:projectId/sprints endpoint. This route is protected by the verifyAccessToken middleware. [1] [2]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new endpoint to retrieve all sprints for a given project while addressing an existing bug and adding new functionality for sprint pagination and filtering.

  • Added a new GET route in sprint.routes.js for fetching sprints.
  • Implemented the getAllSprints controller with parameter validation, pagination, and access checks.

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

File Description
src/routes/sprint.routes.js Added new GET route to fetch all sprints with access token check.
src/controllers/sprint.controller.js Implemented getAllSprints with parameter validation, pagination, and error handling.

Comment thread src/controllers/sprint.controller.js Outdated
Comment thread src/controllers/sprint.controller.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Kimoo193 Kimoo193 merged commit beac02a into main Apr 18, 2025
5 checks passed
@Kimoo193 Kimoo193 deleted the feat/170/get-all-sprints branch April 18, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature For new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get all sprints

2 participants