Signature
Helper | attachmentHelper |
Signature |
mergeAttachments(IHubIssue issue, IHubIssue replica) |
Description | Add all the new attachments of the replica to the issue attachments.
Remove all the removed attachments of the replica from the issue attachments. |
Introduced in | 0.12 |
Example use
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
Comment
This helper method is equivalent to:
// add all new attachments as listed in the replica issue.attachments += replica.addedAttachments // remove all attachments from the issue which have been removed in the remote issue issue.attachments -= replica.removedAttachments
Be careful when specifying the following code, which deletes all local attachments which are not available on the replica.
issue.attachments = replica.attachments