Inline comment on both V.1 and V.2 doesn't provide enough data to recreate the inline comment using POST

It seems like V.2 has the same problem as V.1:- missing out on certain important fields when you make a GET inline comment call.

To recreate/restore an inline comment, Atlassian requires API users to pass the following data which is not provided and is deduced by making guesswork.

{
  "inlineCommentProperties": { 
                                "textSelection": "<string>",
                                "textSelectionMatchCount": 113,
                                "textSelectionMatchIndex": 238
                              }
}

Hi Parth!

The difference between data in the GET and POST for inline comments is intentional. Those 3 fields you specified are used to find the text to highlight on the current version of the page. The POST will create a tag using those fields with a marker-ref and put it around the highlighted text in the page’s body. The marker-ref is supposed to be the source of truth for what text is highlighted on the page. Data about the text matches/index is not persisted as the page’s body may be changed, which would change these values.

In the context of recreating/restoring a comment, can you elaborate a bit further on your use case? If you’re intending to highlight the same text as before (assuming it’s still there on the page), you’ll need to rerun your pattern matching that gave you those parameters when the comment was first created.