if (mapa1.containsKey(assigneeMail)) {
ArrayList<Payload1> payloads = mapa1.get(assigneeMail);
payloads.add(new Payload1(it.getSummary(), it.getKey(), it.getDescription(), it.getAssignee().getDisplayName()));
mapa1.replace(assigneeMail, payloads);
} else {
mapa1.put(assigneeMail, new ArrayList<>(List.of(new Payload1(it.getSummary(), it.getKey(), it.getDescription(), it.getAssignee().getDisplayName()))));
}
Map
появился метод merge
ещё. import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueFieldConstants
import com.atlassian.jira.issue.attachment.TemporaryWebAttachmentManager
import webwork.action.ActionContext
def temporaryAttachmentUtil = ComponentAccessor.getComponent(TemporaryWebAttachmentManager)
def formToken = ActionContext.getRequest()?.getParameter(IssueFieldConstants.FORM_TOKEN)
if (formToken) {
def tempWebAttachments = temporaryAttachmentUtil.getTemporaryWebAttachmentsByFormToken(formToken)
return tempWebAttachments.size() >= 1
} else {
return false
}