Creates a new IssueRelation, returns the created IssueRelation. Checks the authorization status, and checks that the chosen type is compatible with the template of the Issue.
Return
the saved created IssueRelation
Parameters
used to check for the required permission
defines the Issue, User and optional IssueRelationType of the IssueRelation
Creates a new IssueRelation from issue to relatedIssue at atTime as byUser and adds it to the timeline of issue. Also creates a RelatedByIssueEvent and adds it to the timeline of relatedIssue. Does not check the authorization status. If present, checks that the issueRelationType is compatible with the template of the issue. Does neither save the created IssueRelation nor the issue. It is necessary to save the issue or returned IssueRelation afterwards.
Parameters
the Issue from which the created IssueRelation starts
the Issue where the created IssueRelation ends
the optional type of the created IssueRelation, must be compatible with the template of issue
the point in time when the modification happened, updates Issue.lastUpdatedAt if necessary
the User who caused the update, updates Issue.participants if necessary
context used for the aggregation updater