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_typeparameter 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
AbstractIssueclass, this contains the common fields between:Object tree would be:
Issuecontinues to extendAbstractIssuesubscribedwould stay on the concreteIssuetype.6.x.x).LinkedIssuewould have (also for6.x.x):issue_link_idlink_typelink_created_atlink_updated_atEpicIssue(see EpicApi.getEpicIssues() returns models.Epic not models.EpicIssue #729) would also extendsAbstractIssuewith following attributes:epic_issue_idrelative_positionOn commit jmini@f63e2d9
I have tried a path where
LinkedIssuewould be a subtype ofIssueto 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
LinkedIssueis a subtype ofIssue, this is a breaking change.So changing the return type
getIssueLinks(..)toLinkedIssueand refactoringIssueis something that could be done in6.x.