Skip to content

Commit 0e54dbd

Browse files
committed
gitlab4j#1023 Add Field Iteration to Issue.
+ Iteration Class + Getter and Setter for Iteration field
1 parent 2d9a588 commit 0e54dbd

File tree

2 files changed

+126
-1
lines changed

2 files changed

+126
-1
lines changed

src/main/java/org/gitlab4j/api/models/AbstractIssue.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public String toString() {
7878
private Integer mergeRequestsCount;
7979
private Boolean hasTasks;
8080
private String taskStatus;
81+
private Iteration iteration;
8182
private TaskCompletionStatus taskCompletionStatus;
8283

8384
public Assignee getAssignee() {
@@ -325,7 +326,15 @@ public void setTaskStatus(String taskStatus) {
325326
this.taskStatus = taskStatus;
326327
}
327328

328-
public TaskCompletionStatus getTaskCompletionStatus() {
329+
public Iteration getIteration() {
330+
return iteration;
331+
}
332+
333+
public void setIteration(Iteration iteration) {
334+
this.iteration = iteration;
335+
}
336+
337+
public TaskCompletionStatus getTaskCompletionStatus() {
329338
return taskCompletionStatus;
330339
}
331340

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
package org.gitlab4j.api.models;
2+
3+
import java.util.Date;
4+
5+
import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
6+
7+
import com.fasterxml.jackson.annotation.JsonCreator;
8+
import com.fasterxml.jackson.annotation.JsonValue;
9+
10+
public class Iteration {
11+
public enum IterationState {
12+
Opened, Upcomming, Current, Closed;
13+
14+
private static JacksonJsonEnumHelper<IterationState> enumHelper = new JacksonJsonEnumHelper<>(IterationState.class, true, true);
15+
16+
@JsonCreator
17+
public static IterationState forValue(String value) {
18+
return enumHelper.forValue(value);
19+
}
20+
21+
@JsonValue
22+
public String toValue() {
23+
return (enumHelper.toString(this));
24+
}
25+
26+
@Override
27+
public String toString() {
28+
return (enumHelper.toString(this));
29+
}
30+
}
31+
32+
private Long id;
33+
private Long iid;
34+
private Long sequence;
35+
private Long groupId;
36+
private String title;
37+
private String descripion;
38+
private IterationState state;
39+
private Date createdAt;
40+
private Date updatedAt;
41+
private Date startDate;
42+
private Date dueDate;
43+
private String webUrl;
44+
public Long getId() {
45+
return id;
46+
}
47+
public void setId(Long id) {
48+
this.id = id;
49+
}
50+
public Long getIid() {
51+
return iid;
52+
}
53+
public void setIid(Long iid) {
54+
this.iid = iid;
55+
}
56+
public Long getSequence() {
57+
return sequence;
58+
}
59+
public void setSequence(Long sequence) {
60+
this.sequence = sequence;
61+
}
62+
public Long getGroupId() {
63+
return groupId;
64+
}
65+
public void setGroupId(Long groupId) {
66+
this.groupId = groupId;
67+
}
68+
public String getTitle() {
69+
return title;
70+
}
71+
public void setTitle(String title) {
72+
this.title = title;
73+
}
74+
public String getDescripion() {
75+
return descripion;
76+
}
77+
public void setDescripion(String descripion) {
78+
this.descripion = descripion;
79+
}
80+
public IterationState getState() {
81+
return state;
82+
}
83+
public void setState(IterationState state) {
84+
this.state = state;
85+
}
86+
public Date getCreatedAt() {
87+
return createdAt;
88+
}
89+
public void setCreatedAt(Date createdAt) {
90+
this.createdAt = createdAt;
91+
}
92+
public Date getUpdatedAt() {
93+
return updatedAt;
94+
}
95+
public void setUpdatedAt(Date updatedAt) {
96+
this.updatedAt = updatedAt;
97+
}
98+
public Date getStartDate() {
99+
return startDate;
100+
}
101+
public void setStartDate(Date startDate) {
102+
this.startDate = startDate;
103+
}
104+
public Date getDueDate() {
105+
return dueDate;
106+
}
107+
public void setDueDate(Date dueDate) {
108+
this.dueDate = dueDate;
109+
}
110+
public String getWebUrl() {
111+
return webUrl;
112+
}
113+
public void setWebUrl(String webUrl) {
114+
this.webUrl = webUrl;
115+
}
116+
}

0 commit comments

Comments
 (0)