Hi All
As Jira standard mail handler can't create comments without attachments I want to use groovy scirpt for mentioned purpose (script runner). In Script Runner documentation I didn't find script which can cover my needs.
Please help to modify existing scripts mentioned in documentation to create only comments in existing issues using issue key (if possible multiple issue keys) in title and declining all types of attachments.
https://scriptrunner.adaptavist.com/5.6.13/jira/mail-handler.html
Thanks in advance
Regards,
Alik
I think that will be something like this but I am not sure
import com.atlassian.jira.issue.comments.CommentManager
def subject = message.getSubject() as String
def issue = ServiceUtils.findIssueObjectInString(subject)
def body = MailUtils.getBody(message)
ApplicationUser reporter = messageUserProcessor.getAuthorFromSender(message) ?: user
if (issue) {
def comment = subject + " - " + body
commentManager.create(issue, reporter, comment, false)
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.