Skip to content

Feat/159/update a sprint#160

Merged
Kimoo193 merged 3 commits into
mainfrom
feat/159/update-a-sprint
Apr 17, 2025
Merged

Feat/159/update a sprint#160
Kimoo193 merged 3 commits into
mainfrom
feat/159/update-a-sprint

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 #159

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

This pull request introduces functionality to update a sprint in the project management system. It includes the addition of a new controller method, input validation, and route handling for the update operation.

New Feature: Update Sprint

  • Controller Method: Added the updateSprint method in src/controllers/sprint.controller.js to handle sprint updates. This method includes:

    • Validation of required parameters and input data.
    • Permission checks for user access to the specified project.
    • Ensuring the sprint exists and checking for name uniqueness.
    • Handling updates to sprint attributes like name, description, goal, status, order, and date fields (startDate, endDate).
    • Validation to prevent overlapping sprint dates and recalculation of sprint status if necessary.
  • Validation Import: Updated the import statement in src/controllers/sprint.controller.js to include updateSprintValidation for validating update requests.

Routing

  • New Route: Added a PUT route in src/routes/sprint.routes.js to map the endpoint /api/organization/:organizationId/team/:teamId/project/:projectId/sprint/:sprintId to the updateSprint controller method.

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 feature to update an existing sprint by providing a new PUT endpoint and an associated controller to handle sprint updates. Key changes include:

  • Adding a PUT route for sprint updates in the routes file.
  • Introducing an updateSprint controller function in the sprint controller.
  • Importing and utilizing new updateSprintValidation in the controller.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/routes/sprint.routes.js Added a PUT route for updating a sprint, though it currently uses the createSprint handler.
src/controllers/sprint.controller.js Added a new updateSprint controller with validations and update logic.

Comment thread src/routes/sprint.routes.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Kimoo193 Kimoo193 merged commit f8f01d3 into main Apr 17, 2025
3 checks passed
@Kimoo193 Kimoo193 deleted the feat/159/update-a-sprint branch April 17, 2025 19:02
Kimoo193 added a commit that referenced this pull request Apr 17, 2025
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.

Update a sprint

2 participants