Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
267665b9
Commit
267665b9
authored
Dec 09, 2019
by
Greg Messner
Browse files
Added missing fields to Issue class (#483)
parent
99f47292
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/Issue.java
View file @
267665b9
...
@@ -9,6 +9,33 @@ import org.gitlab4j.api.utils.JacksonJson;
...
@@ -9,6 +9,33 @@ import org.gitlab4j.api.utils.JacksonJson;
public
class
Issue
{
public
class
Issue
{
public
static
class
TaskCompletionStatus
{
private
Integer
count
;
private
Integer
completedCount
;
public
Integer
getCount
()
{
return
count
;
}
public
void
setCount
(
Integer
count
)
{
this
.
count
=
count
;
}
public
Integer
getCompletedCount
()
{
return
completedCount
;
}
public
void
setCompletedCount
(
Integer
completedCount
)
{
this
.
completedCount
=
completedCount
;
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
}
}
private
Assignee
assignee
;
private
Assignee
assignee
;
private
List
<
Assignee
>
assignees
;
private
List
<
Assignee
>
assignees
;
private
Author
author
;
private
Author
author
;
...
@@ -34,6 +61,13 @@ public class Issue {
...
@@ -34,6 +61,13 @@ public class Issue {
private
Boolean
discussionLocked
;
private
Boolean
discussionLocked
;
private
TimeStats
timeStats
;
private
TimeStats
timeStats
;
private
Integer
upvotes
;
private
Integer
downvotes
;
private
Integer
mergeRequestsCount
;
private
Boolean
hasTasks
;
private
String
taskStatus
;
private
TaskCompletionStatus
taskCompletionStatus
;
public
Assignee
getAssignee
()
{
public
Assignee
getAssignee
()
{
return
assignee
;
return
assignee
;
}
}
...
@@ -226,6 +260,54 @@ public class Issue {
...
@@ -226,6 +260,54 @@ public class Issue {
this
.
timeStats
=
timeStats
;
this
.
timeStats
=
timeStats
;
}
}
public
Integer
getUpvotes
()
{
return
upvotes
;
}
public
void
setUpvotes
(
Integer
upvotes
)
{
this
.
upvotes
=
upvotes
;
}
public
Integer
getDownvotes
()
{
return
downvotes
;
}
public
void
setDownvotes
(
Integer
downvotes
)
{
this
.
downvotes
=
downvotes
;
}
public
Integer
getMergeRequestsCount
()
{
return
mergeRequestsCount
;
}
public
void
setMergeRequestsCount
(
Integer
mergeRequestsCount
)
{
this
.
mergeRequestsCount
=
mergeRequestsCount
;
}
public
Boolean
getHasTasks
()
{
return
hasTasks
;
}
public
void
setHasTasks
(
Boolean
hasTasks
)
{
this
.
hasTasks
=
hasTasks
;
}
public
String
getTaskStatus
()
{
return
taskStatus
;
}
public
void
setTaskStatus
(
String
taskStatus
)
{
this
.
taskStatus
=
taskStatus
;
}
public
TaskCompletionStatus
getTaskCompletionStatus
()
{
return
taskCompletionStatus
;
}
public
void
setTaskCompletionStatus
(
TaskCompletionStatus
taskCompletionStatus
)
{
this
.
taskCompletionStatus
=
taskCompletionStatus
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
return
(
JacksonJson
.
toJsonString
(
this
));
...
...
src/test/resources/org/gitlab4j/api/issue.json
View file @
267665b9
...
@@ -49,5 +49,14 @@
...
@@ -49,5 +49,14 @@
"total_time_spent"
:
0
,
"total_time_spent"
:
0
,
"human_time_estimate"
:
"3h30m"
,
"human_time_estimate"
:
"3h30m"
,
"human_total_time_spent"
:
"0m"
"human_total_time_spent"
:
"0m"
},
"upvotes"
:
4
,
"downvotes"
:
2
,
"merge_requests_count"
:
0
,
"has_tasks"
:
true
,
"task_status"
:
"10 of 15 tasks completed"
,
"task_completion_status"
:{
"count"
:
0
,
"completed_count"
:
0
}
}
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment