File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
java/de/unistuttgart/iste/meitrex/scrumgame
persistence/entity/project
resources/graphql/service Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ public class ProjectEntity implements IWithId<UUID> {
4343 @ Setter
4444 private Integer currentSprintNumber ;
4545
46+ // filter issue by a fixed label
47+ @ Column
48+ private String fixedLabelFilter ;
49+
4650 @ OneToMany (fetch = FetchType .LAZY , cascade = CascadeType .ALL , orphanRemoval = true )
4751 @ Builder .Default
4852 private List <UserInProjectEntity > users = new ArrayList <>();
Original file line number Diff line number Diff line change @@ -27,7 +27,13 @@ public class ImsService {
2727
2828 @ Cacheable (value = "issues" , key = "#project.id" , sync = true )
2929 public synchronized List <Issue > getIssues (Project project ) {
30- return imsAdapterFactory .getImsAdapterForProject (project ).getIssues (project .getId ());
30+ var result = imsAdapterFactory .getImsAdapterForProject (project ).getIssues (project .getId ());
31+ if (project .getFixedLabelFilter () != null ) {
32+ return result .stream ()
33+ .filter (issue -> issue .getLabels ().contains (project .getFixedLabelFilter ()))
34+ .toList ();
35+ }
36+ return result ;
3137 }
3238
3339 @ Cacheable (value = "issue" , key = "#project.id + #id" , sync = true )
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ type Project {
2424 The number of the current sprint. Returns null if no sprint is active.
2525 """
2626 currentSprintNumber : Int
27+
28+ """
29+ Only issues with this label will be considered by DinoDev.
30+ """
31+ fixedLabelFilter : String
32+
2733 """
2834 The current sprint of the project. Returns null if no sprint is active.
2935 """
You can’t perform that action at this time.
0 commit comments