Sat, 17 Oct 2020 15:21:56 +0200
fixes wrong method name for configureIssueEditor()
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
1 | package de.uapcore.lightpit.viewmodel; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
2 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
3 | import de.uapcore.lightpit.entities.*; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
4 | |
95
0552cc5755f3
fix: ... but ofc they should not appear more than once...
Mike Becker <universe@uap-core.de>
parents:
93
diff
changeset
|
5 | import java.util.*; |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
6 | |
99 | 7 | public class IssueEditView extends ProjectView { |
8 | private Issue issue; | |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
9 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
10 | private List<Project> projects = Collections.emptyList(); |
95
0552cc5755f3
fix: ... but ofc they should not appear more than once...
Mike Becker <universe@uap-core.de>
parents:
93
diff
changeset
|
11 | private Set<Version> versionsUpcoming = new HashSet<>(); |
0552cc5755f3
fix: ... but ofc they should not appear more than once...
Mike Becker <universe@uap-core.de>
parents:
93
diff
changeset
|
12 | private Set<Version> versionsRecent = new HashSet<>(); |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
13 | private List<User> users; |
124 | 14 | private List<IssueComment> comments; |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
15 | |
99 | 16 | public void setIssue(Issue issue) { |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
17 | this.issue = issue; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
18 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
19 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
20 | public Issue getIssue() { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
21 | return issue; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
22 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
23 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
24 | public List<Project> getProjects() { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
25 | return projects; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
26 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
27 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
28 | public void setProjects(List<Project> projects) { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
29 | this.projects = projects; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
30 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
31 | |
95
0552cc5755f3
fix: ... but ofc they should not appear more than once...
Mike Becker <universe@uap-core.de>
parents:
93
diff
changeset
|
32 | public Collection<Version> getVersionsUpcoming() { |
90
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
33 | return versionsUpcoming; |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
34 | } |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
35 | |
95
0552cc5755f3
fix: ... but ofc they should not appear more than once...
Mike Becker <universe@uap-core.de>
parents:
93
diff
changeset
|
36 | public Collection<Version> getVersionsRecent() { |
90
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
37 | return versionsRecent; |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
38 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
39 | |
99 | 40 | public void configureVersionSelectors(List<Version> versions) { |
90
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
41 | versionsRecent.clear(); |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
42 | versionsUpcoming.clear(); |
93
a44d59bbf447
adds graphical visualization for issue type and status
Mike Becker <universe@uap-core.de>
parents:
90
diff
changeset
|
43 | // keep the current selection, if any |
a44d59bbf447
adds graphical visualization for issue type and status
Mike Becker <universe@uap-core.de>
parents:
90
diff
changeset
|
44 | versionsRecent.addAll(issue.getAffectedVersions()); |
a44d59bbf447
adds graphical visualization for issue type and status
Mike Becker <universe@uap-core.de>
parents:
90
diff
changeset
|
45 | versionsUpcoming.addAll(issue.getResolvedVersions()); |
90
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
46 | for (var v : versions) { |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
47 | if (v.getStatus().isReleased()) { |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
48 | versionsRecent.add(v); |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
49 | } else { |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
50 | versionsUpcoming.add(v); |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
51 | } |
2c74e36752f9
only show relevant versions in issue editor
Mike Becker <universe@uap-core.de>
parents:
86
diff
changeset
|
52 | } |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
53 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
54 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
55 | public List<User> getUsers() { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
56 | return users; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
57 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
58 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
59 | public void setUsers(List<User> users) { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
60 | this.users = users; |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
61 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
62 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
63 | public IssueStatus[] getIssueStatus() { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
64 | return IssueStatus.values(); |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
65 | } |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
66 | |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
67 | public IssueCategory[] getIssueCategory() { |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
68 | return IssueCategory.values(); |
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
69 | } |
124 | 70 | |
71 | public List<IssueComment> getComments() { | |
72 | return comments; | |
73 | } | |
74 | ||
75 | public void setComments(List<IssueComment> comments) { | |
76 | this.comments = comments; | |
77 | } | |
86
0a658e53177c
improves issue overview and adds progress information
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
78 | } |