Skip to content

Commit

Permalink
Add properties in Issue Model Class #1145 (#1177)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Jeremie Bresson <[email protected]>
  • Loading branch information
LeJeanbono and jmini authored Oct 13, 2024
1 parent fb23e25 commit 06f78e1
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 6 deletions.
64 changes: 59 additions & 5 deletions src/main/java/org/gitlab4j/api/models/AbstractIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,20 @@ public String toString() {
private Integer weight;
private Boolean discussionLocked;
private TimeStats timeStats;
private String severity;
private String issueType;
private IssueEpic epic;

private Integer upvotes;
private Integer downvotes;
private Integer mergeRequestsCount;
private Boolean hasTasks;
private String taskStatus;
private Boolean imported;
private String importedFrom;
private Iteration iteration;
private TaskCompletionStatus taskCompletionStatus;
private String healthStatus;

public Assignee getAssignee() {
return assignee;
Expand Down Expand Up @@ -328,13 +334,29 @@ public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}

public Boolean getImported() {
return imported;
}

public void setImported(Boolean imported) {
this.imported = imported;
}

public String getImportedFrom() {
return importedFrom;
}

public void setImportedFrom(String importedFrom) {
this.importedFrom = importedFrom;
}

public Iteration getIteration() {
return iteration;
}
return iteration;
}

public void setIteration(Iteration iteration) {
this.iteration = iteration;
}
public void setIteration(Iteration iteration) {
this.iteration = iteration;
}

public TaskCompletionStatus getTaskCompletionStatus() {
return taskCompletionStatus;
Expand All @@ -344,6 +366,38 @@ public void setTaskCompletionStatus(TaskCompletionStatus taskCompletionStatus) {
this.taskCompletionStatus = taskCompletionStatus;
}

public String getIssueType() {
return issueType;
}

public void setIssueType(String issueType) {
this.issueType = issueType;
}

public String getSeverity() {
return severity;
}

public void setSeverity(String severity) {
this.severity = severity;
}

public IssueEpic getEpic() {
return epic;
}

public void setEpic(IssueEpic epic) {
this.epic = epic;
}

public String getHealthStatus() {
return healthStatus;
}

public void setHealthStatus(String healthStatus) {
this.healthStatus = healthStatus;
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class AbstractMinimalEpic<E extends AbstractMinimalEpic<E>> implements Se
private Long parentId;
private String title;
private String reference;
private String url;

public Long getId() {
return id;
Expand Down Expand Up @@ -68,6 +69,14 @@ public void setReference(String reference) {
this.reference = reference;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}

public String toString() {
return (JacksonJson.toJsonString(this));
}
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/gitlab4j/api/models/IssueEpic.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.gitlab4j.api.models;

import org.gitlab4j.api.utils.JacksonJson;

public class IssueEpic extends AbstractMinimalEpic<IssueEpic> {
private static final long serialVersionUID = 1L;

public String toString() {
return (JacksonJson.toJsonString(this));
}
}
13 changes: 12 additions & 1 deletion src/test/resources/org/gitlab4j/api/issue.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"id" : 1,
"name" : "Administrator"
},
"severity": "UNKNOWN",
"subscribed": false,
"user_notes_count": 1,
"web_url": "http://example.com/example/example/issues/1",
Expand All @@ -59,6 +60,15 @@
"count": 0,
"completed_count": 0
},
"imported": false,
"imported_from": "none",
"epic": {
"id": 1347,
"iid": 5,
"title": "Test Epic",
"url": "/groups/example/-/epics/5",
"group_id": 1651
},
"iteration": {
"id": 158,
"iid": 34,
Expand All @@ -72,5 +82,6 @@
"start_date": "2023-09-04T00:00:00Z",
"due_date": "2023-09-10T00:00:00Z",
"web_url": "http://example.com/example/-/iterations/158"
}
},
"health_status": "needs_attention"
}

0 comments on commit 06f78e1

Please sign in to comment.