-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programming exercises
: Fix missing branch configuration
#7189
Conversation
src/main/java/de/tum/in/www1/artemis/web/rest/ProgrammingExerciseResource.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM 👍🏻
Seems that the change is not yet working. Probably some JsonIgnore prevents this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally, sets branch as expected.
@@ -266,6 +266,9 @@ public ResponseEntity<ProgrammingExercise> updateProgrammingExercise(@RequestBod | |||
// Forbid conversion between normal course exercise and exam exercise | |||
exerciseService.checkForConversionBetweenExamAndCourseExercise(updatedProgrammingExercise, programmingExerciseBeforeUpdate, ENTITY_NAME); | |||
|
|||
// Ignore changes to the default branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a temporal solution or will is stay here for good?
Checklist
General
Motivation and Context
The branch attribute was missing in the client. Therefore, whenever an instructor edits a programming exercise, the branch was set to null in the database which is problematic, because the branch information might be needed in follow-up operations.
Description
Since the user should not even be able to change the branch name after creation, we override it in the update endpoint before saving the entity.
Steps for Testing
Prerequisites:
Review Progress
Code Review
Manual Tests