Hi everyone
I trying to get comment id on EventType.ISSUE_COMMENT_DELETED_ID but i got null. Does it exist another way to get id?
Thanks
I found an answer here. That answer is particular to ScriptRunner, so I'm converting to regular Java for plugins in my answer here.
@EventListener
public void handleCommentDeleted(IssueEvent event) {
if (!EventType.ISSUE_COMMENT_DELETED_ID.equals(event.getEventTypeId())) {
return;
}
Comment comment = (Comment) event.getParams().get("originalcomment");
log.info("Comment: {}", comment);
}
I must say, it is an almost inexplicable design choice to have `issueEvent.getComment()` return null and requiring this parameter casting business instead.
I don't. However, why are you trying to get it? when the comment is deleted it is gone. Are you trying to copy it somewhere?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes i have copy in active objects.
I develop plugin for synchronization jira and third-party service by api. I have jira_comment_id - my_service_comment_id link. I can make api request on that service and process them but it will be too long.
I'm trying to find another solution using atlassian sdk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't use listener, but I'd verify that event actually happens in the listener documentation for the level of JIRA you're on. I could be that the comment is being deleted while the listener is firing and the ID is now set to null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, i think the same. But mb you know how it's possible to get comment id?
Mb it is possible to obtain actions log?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JIRA erases everything from a deleted issue. I suspect it does the same thing for comments. where did you get the location from?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.