CommentService.addReply() doesn't add a reply, doesn't throw exception

Issue #15315 resolved
Scott Furman
created an issue

I am debugging a plug-in which is being upgraded to use the 5.x comment API. The hook code calls CommentService.addReply(). This call appears to succeed in that it does not throw an exception and returns the created Comment object. However, no comment is visible in the PR web page (after reloading). I can use the REST API to retrieve the parent comment, but if I attempt to retrieve the newly-created child comment, the REST API reports "Comment XX does not exist".

The code in question looks something like this:

  String commentReply = "Reply";
  AddCommentReplyRequest request = new 
      AddCommentReplyRequest.Builder(parentCommentId, commentReply).build();
  Comment comment2 = commentService.addReply(request);

Comments (2)

  1. Log in to comment