Hi,
I have a scriptrunner set up which listens to the issue update events, reads the event comment and updates the comment to a pre-decided format. I want to change the update author of the comment while updating the comment, but I am unable to do so. Even if I use the method eventComment.setUpdateAuthor(superEpicCommenter) - I am unable to change it (it gets updated in the database but not on the UI. I also tried re-indexing the issue after the update but it failed too).
I also tried logging in as a different user and update the comment - this failed too. Can someone please suggest how can I update the author ?
formattedComment += "\n[Comment : " + eventComment.getBody() + "]"
ApplicationUser superEpicCommenter = ComponentAccessor.getUserManager().getUserByName("abc");
ComponentAccessor.getJiraAuthenticationContext().setLoggedInUser(superEpicCommenter)
eventComment.setBody(formattedComment);
//eventComment.setUpdateAuthor(superEpicCommenter);
ComponentAccessor.getCommentManager().update(eventComment, false);
Thanks in advance,
Neha
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.