Adds an AffectedByIssue to an Issue, returns the created AddedAffectedEntityEvent, or null if the AffectedByIssue was already on the Issue. Checks the authorization status.
Return
the saved created AddedAffectedEntityEvent or null if no event was created
Parameters
used to check for the required permission
defines which AffectedByIssue to add to which Issue
Adds an affectedEntity to an issue at atTime as byUser and adds a AddedAffectedEntityEvent to the timeline. Creates the event even if the affectedEntity was already affected by the issue. Only adds the affectedEntity to the affects on the issue if no newer timeline item exists which removes it again. Does not check the authorization status. Does neither save the created AddedToPinnedIssuesEvent nor the issue. It is necessary to save the issue or returned AddedAffectedEntityEvent afterwards.
Parameters
the Issue which should affect affectedEntity
the AffectedByIssue which should be affected by the 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
Throws
if issue cannot affect the affectedEntity