private void issueUpdated(final Label label, final Set<Label> oldLabels, final Issue originalIssue, final Long customFieldId, final ApplicationUser remoteUser, final boolean sendNotification) { issueUpdated(joinLabels(label, oldLabels), oldLabels, originalIssue, customFieldId, remoteUser, sendNotification); }
private Set<Label> setIfNotEqual(final Issue issue, final Set<String> labels, final Long customFieldId, final ApplicationUser remoteUser, final boolean sendNotification,final boolean causesChangeNotification) { Set<Label> oldLabels = labelStore.getLabels(issue.getId(), customFieldId); if (differentLabels(labels, oldLabels)) { final Set<Label> newLabels = labelStore.setLabels(issue.getId(), customFieldId, labels); // JRADEV-2126 Only create a History entry if you are updating labels after creating the issue // note that if causesChangeNotification is false then the labels manager does not fire any // update events at all, and the index is not reindexed if (causesChangeNotification) { issueUpdated(newLabels, oldLabels, issue, customFieldId, remoteUser, sendNotification); } return newLabels; } else { return oldLabels; } }
private Label addIfNotContains(final Issue issue, final String label, Long customFieldId, final ApplicationUser remoteUser, final boolean sendNotification) { Set<Label> oldLabels = labelStore.getLabels(issue.getId(), customFieldId); if (containsLabel(label, oldLabels)) { return getLabel(label, oldLabels); } else { final Label newLabel = labelStore.addLabel(issue.getId(), customFieldId, label); issueUpdated(newLabel, oldLabels, issue, customFieldId, remoteUser, sendNotification); return newLabel; } }