This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
41
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Merge requests
!201
added functionality to remove badge
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
added functionality to remove badge
feature_remove_badge
into
development
Overview
0
Commits
1
Pipelines
0
Changes
8
Merged
Eduard Frankford
requested to merge
feature_remove_badge
into
development
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
8
Expand
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
8633583c
1 commit,
1 year ago
8 files
+
67
−
9
Expand all files
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
src/main/java/at/ac/uibk/gitsearch/service/ReviewService.java
+
25
−
8
Options
@@ -117,15 +117,14 @@ public class ReviewService {
}
Review
review
=
reviewO
.
get
();
review
.
getComments
()
.
stream
()
.
forEach
(
reviewRating
->
{
reviewRating
.
setStatus
(
status
);
addHistoryEntry
(
review
,
reviewRating
,
userService
.
getUserWithAuthorities
(),
status
,
""
);
List
<
ReviewRating
>
reviewRatings
=
review
.
getComments
().
stream
().
collect
(
Collectors
.
toList
());
reviewRatingRepository
.
save
(
reviewRating
);
});
for
(
ReviewRating
reviewRating
:
reviewRatings
)
{
reviewRating
.
setStatus
(
status
);
addHistoryEntry
(
review
,
reviewRating
,
userService
.
getUserWithAuthorities
(),
status
,
""
);
reviewRatingRepository
.
save
(
reviewRating
);
}
}
public
void
updateReview
(
ReviewDTO
review
)
{
@@ -413,6 +412,24 @@ public class ReviewService {
);
}
public
void
removeBadge
(
Long
id
)
{
Review
review
=
reviewRepository
.
findById
(
id
).
orElseThrow
();
updateStatus
(
review
.
getId
(),
ReviewStatus
.
REVIEW_IN_PROGRESS
);
statisticsService
.
removeBadgeForStatisticsByExerciseID
(
review
.
getResourceID
());
notifyReviewers
(
review
.
getId
(),
EMAIL_START
+
review
.
getResource
()
+
" has been removed from the badge list and is no longer displayed when people search for it."
);
notifyRequester
(
review
.
getId
(),
EMAIL_START
+
review
.
getResource
()
+
" has been removed from the badge list and is no longer displayed when people search for it."
);
}
public
boolean
requestReviewForExercise
(
ReviewRequest
request
)
{
String
id
=
request
.
getResource
();
if
(
reviewRepository
.
findOneByResource
(
id
).
isPresent
())
{