Hello,
I have a problem with create and insert a pdf via a listner. If an user uploads a pdf one of my scripts is started to copy the pdf and inserting an annotation and safe it as well in the same issue. That works good, but I have no idea how to update my issue. I found examples for costume fields like this:
issueInputParameters.addCustomFieldValue(projectPage.getIdAsLong(), pageUris["mainPageUri"])
def loggedInUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def validationResult = issueService.validateUpdate(loggedInUser, issue.getId(), issueInputParameters)
But I don't know how to update the attachment field.