feat(course): implement PATCH support for partial course updates and improve issue templates - #79
Merged
GravityDarkLab merged 4 commits intoJul 19, 2025
Conversation
…glish and German for improved issue tracking.
…nd implement CourseUpdateRequest DTO for flexible course modifications
7 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements PATCH support for partial course updates, improves GitHub issue templates, and aligns client-server HTTP methods. The main focus is adding backend functionality for updating specific course fields without requiring all mandatory data, along with comprehensive testing and updated issue templates in both English and German.
- Backend PATCH endpoint implementation with new
CourseUpdateRequestDTO for partial updates - Client-side HTTP method alignment from PUT to PATCH for lesson and course completion
- Replacement of basic bug report template with structured bilingual issue templates
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| CourseController.java | Adds new PATCH endpoint for partial course updates |
| CourseUpdateRequest.java | New DTO supporting optional fields for partial updates |
| CourseService.java & CourseServiceImpl.java | Implements partial update logic with field merging |
| CourseControllerTest.java & CourseServiceImplTest.java | Comprehensive test coverage for new partial update functionality |
| course.service.ts | Updates HTTP methods from PUT to PATCH for consistency |
| issue_en.md & issue_de.md | New structured issue templates in English and German |
| bug_report.md | Removes old basic bug report template |
GravityDarkLab
deleted the
78-bug-server-error-when-marking-lesson-as-complete
branch
July 20, 2025 02:48
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.
🔧 Overview
This pull request introduces multiple enhancements, including:
PATCH🗂️ Changes Breakdown
📄 Issue Templates
Removed the old bug report template:
🗑️ .github/ISSUE_TEMPLATE/bug_report.mdAdded two new structured templates:
.github/ISSUE_TEMPLATE/issue_en.md.github/ISSUE_TEMPLATE/issue_de.mdEach includes standard sections for:
🛠️ Backend: Partial Course Updates
Controller
PATCH /courses/{id}endpoint inCourseController→
updateCoursePartial(...)methodDTO
CourseUpdateRequestto support flexible, field-specific updatesService Layer
Extended
CourseServiceandCourseServiceImplwithupdateCoursePartial(...)Ensures safe merging of fields like:
Avoids overwriting unchanged fields
📄 Affected Files:
CourseController.javaCourseUpdateRequest.javaCourseService.javaCourseServiceImpl.java🧪 Backend: Unit Tests
Added dedicated tests for the new partial update logic in:
CourseControllerTest.javaCovers:
🌐 Client-Side: HTTP Method Update
Updated HTTP methods from
PUTtoPATCHfor:completeLesson(...)completeCourse(...)📄 File:
client/src/services/course.service.tsAligns client behavior with new backend support for partial updates
📌 Summary
This PR brings the course update functionality in line with REST best practices by introducing
PATCHsupport, improves flexibility with a clean DTO pattern, strengthens test coverage, and unifies backend/frontend behavior. It also introduces better structured, multilingual issue templates to streamline collaboration.