Add support for link type between issues #964
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #847
In https://docs.gitlab.com/ee/api/issue_links.html#create-an-issue-link
Add
link_type
parameter in the request and attribute in the responseIn https://docs.gitlab.com/ee/api/issue_links.html#list-issue-relations
Add missing attributes to
Issue
:There was already
"issue_link_id"
This PR prepares an
AbstractIssue
class, this contains the common fields between:Object tree would be:
Issue
continues to extendAbstractIssue
subscribed
would stay on the concreteIssue
type.6.x.x
).LinkedIssue
would have (also for6.x.x
):issue_link_id
link_type
link_created_at
link_updated_at
EpicIssue
(see EpicApi.getEpicIssues() returns models.Epic not models.EpicIssue #729) would also extendsAbstractIssue
with following attributes:epic_issue_id
relative_position
On commit jmini@f63e2d9
I have tried a path where
LinkedIssue
would be a subtype ofIssue
to preserve backward compatibility.But you can still not change the return value of method method
getIssueLinks(..)
fromList<LinkedIssue>
toList<LinkedIssue>
.gitlab4j-api/src/main/java/org/gitlab4j/api/IssuesApi.java
Line 836 in 2d2fe24
But even if
LinkedIssue
is a subtype ofIssue
, this is a breaking change.So changing the return type
getIssueLinks(..)
toLinkedIssue
and refactoringIssue
is something that could be done in6.x
.