-
Bug
-
Resolution: Unresolved
-
Medium (View bug fix roadmap)
-
None
-
6.3, 7.0.0
-
6.03
-
2
-
Severity 2 - Major
-
3
-
There is RemoteIssueLinkCreateEvent, but it doesn't have any information from which one can detect the issue for which the link was created. Specifically, there's RemoteIssueLinkCreateEvent.getRemoteIssueLinkId() which should return ID of the remote link that has been created. However, this method always returns null.
Looking at the code, it's not surprising (DefaultRemoteIssueLinkManager.createRemoteIssueLink():
RemoteIssueLink created = remoteIssueLinkStore.createRemoteIssueLink(remoteIssueLink);
...
eventPublisher.publish(new RemoteIssueLinkCreateEvent(remoteIssueLink))
The bug is in the second line: it's the original RemoteIssueLink object without ID that is passed to the event constructor (remoteIssueLink), not the one that was created and has the ID (created).
Another story for RemoteIssueLinkDeletedEvent. Here, the getRemoteIssueLinkId() returns non-null ID of the deleted link. However, one cannot detect the issue from which the link was removed, because the link object no longer exists at this point!
I'd suggest AbstractRemoteIssueLinkEvent objects to carry the whole RemoteIssueLink on board, or at least the issue ID. That would eliminate the described problems.
- mentioned in
-
Page Failed to load