diff --git a/view/src/main/java/se/su/dsv/scipro/group/EditGroupPanel.java b/view/src/main/java/se/su/dsv/scipro/group/EditGroupPanel.java index f5e00ef0e6..6aa52c90d2 100644 --- a/view/src/main/java/se/su/dsv/scipro/group/EditGroupPanel.java +++ b/view/src/main/java/se/su/dsv/scipro/group/EditGroupPanel.java @@ -49,7 +49,10 @@ public class EditGroupPanel extends Panel { // since they may not be included in the relevant projects if they're inactive or completed. // To allow them to be removed from the group, it will not be possible to add them again. projects.addAll(model.getObject().getProjects()); - return projects.stream().toList(); + return projects + .stream() + .sorted(Comparator.comparing(Project::getStartDate).reversed().thenComparing(Project::getTitle)) + .toList(); }); add( new ListView<>("available_projects", availableProjects) {