Skip to content

Commit 06f78e1

Browse files
LeJeanbonojmini
andauthored
Add properties in Issue Model Class #1145 (#1177)
--------- Co-authored-by: Jeremie Bresson <[email protected]>
1 parent fb23e25 commit 06f78e1

File tree

4 files changed

+91
-6
lines changed

4 files changed

+91
-6
lines changed

Diff for: src/main/java/org/gitlab4j/api/models/AbstractIssue.java

+59-5
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,20 @@ public String toString() {
7474
private Integer weight;
7575
private Boolean discussionLocked;
7676
private TimeStats timeStats;
77+
private String severity;
78+
private String issueType;
79+
private IssueEpic epic;
7780

7881
private Integer upvotes;
7982
private Integer downvotes;
8083
private Integer mergeRequestsCount;
8184
private Boolean hasTasks;
8285
private String taskStatus;
86+
private Boolean imported;
87+
private String importedFrom;
8388
private Iteration iteration;
8489
private TaskCompletionStatus taskCompletionStatus;
90+
private String healthStatus;
8591

8692
public Assignee getAssignee() {
8793
return assignee;
@@ -328,13 +334,29 @@ public void setTaskStatus(String taskStatus) {
328334
this.taskStatus = taskStatus;
329335
}
330336

337+
public Boolean getImported() {
338+
return imported;
339+
}
340+
341+
public void setImported(Boolean imported) {
342+
this.imported = imported;
343+
}
344+
345+
public String getImportedFrom() {
346+
return importedFrom;
347+
}
348+
349+
public void setImportedFrom(String importedFrom) {
350+
this.importedFrom = importedFrom;
351+
}
352+
331353
public Iteration getIteration() {
332-
return iteration;
333-
}
354+
return iteration;
355+
}
334356

335-
public void setIteration(Iteration iteration) {
336-
this.iteration = iteration;
337-
}
357+
public void setIteration(Iteration iteration) {
358+
this.iteration = iteration;
359+
}
338360

339361
public TaskCompletionStatus getTaskCompletionStatus() {
340362
return taskCompletionStatus;
@@ -344,6 +366,38 @@ public void setTaskCompletionStatus(TaskCompletionStatus taskCompletionStatus) {
344366
this.taskCompletionStatus = taskCompletionStatus;
345367
}
346368

369+
public String getIssueType() {
370+
return issueType;
371+
}
372+
373+
public void setIssueType(String issueType) {
374+
this.issueType = issueType;
375+
}
376+
377+
public String getSeverity() {
378+
return severity;
379+
}
380+
381+
public void setSeverity(String severity) {
382+
this.severity = severity;
383+
}
384+
385+
public IssueEpic getEpic() {
386+
return epic;
387+
}
388+
389+
public void setEpic(IssueEpic epic) {
390+
this.epic = epic;
391+
}
392+
393+
public String getHealthStatus() {
394+
return healthStatus;
395+
}
396+
397+
public void setHealthStatus(String healthStatus) {
398+
this.healthStatus = healthStatus;
399+
}
400+
347401
@Override
348402
public String toString() {
349403
return (JacksonJson.toJsonString(this));

Diff for: src/main/java/org/gitlab4j/api/models/AbstractMinimalEpic.java

+9
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class AbstractMinimalEpic<E extends AbstractMinimalEpic<E>> implements Se
1313
private Long parentId;
1414
private String title;
1515
private String reference;
16+
private String url;
1617

1718
public Long getId() {
1819
return id;
@@ -68,6 +69,14 @@ public void setReference(String reference) {
6869
this.reference = reference;
6970
}
7071

72+
public String getUrl() {
73+
return url;
74+
}
75+
76+
public void setUrl(String url) {
77+
this.url = url;
78+
}
79+
7180
public String toString() {
7281
return (JacksonJson.toJsonString(this));
7382
}

Diff for: src/main/java/org/gitlab4j/api/models/IssueEpic.java

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.gitlab4j.api.models;
2+
3+
import org.gitlab4j.api.utils.JacksonJson;
4+
5+
public class IssueEpic extends AbstractMinimalEpic<IssueEpic> {
6+
private static final long serialVersionUID = 1L;
7+
8+
public String toString() {
9+
return (JacksonJson.toJsonString(this));
10+
}
11+
}

Diff for: src/test/resources/org/gitlab4j/api/issue.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"id" : 1,
4141
"name" : "Administrator"
4242
},
43+
"severity": "UNKNOWN",
4344
"subscribed": false,
4445
"user_notes_count": 1,
4546
"web_url": "http://example.com/example/example/issues/1",
@@ -59,6 +60,15 @@
5960
"count": 0,
6061
"completed_count": 0
6162
},
63+
"imported": false,
64+
"imported_from": "none",
65+
"epic": {
66+
"id": 1347,
67+
"iid": 5,
68+
"title": "Test Epic",
69+
"url": "/groups/example/-/epics/5",
70+
"group_id": 1651
71+
},
6272
"iteration": {
6373
"id": 158,
6474
"iid": 34,
@@ -72,5 +82,6 @@
7282
"start_date": "2023-09-04T00:00:00Z",
7383
"due_date": "2023-09-10T00:00:00Z",
7484
"web_url": "http://example.com/example/-/iterations/158"
75-
}
85+
},
86+
"health_status": "needs_attention"
7687
}

0 commit comments

Comments
 (0)