@@ -220,16 +220,14 @@ private static void HandleAttachmentChange(JiraChangeItem item, List<RevisionAct
220220
221221 private static List < JiraRevision > BuildCommentRevisions ( JiraItem jiraItem , IJiraProvider jiraProvider )
222222 {
223- var renderedFields = jiraItem . RemoteIssue . SelectToken ( "$.renderedFields.comment.comments" ) ;
224223 var comments = jiraProvider . GetCommentsByItemKey ( jiraItem . Key ) ;
225224 return comments . Select ( ( c , i ) =>
226225 {
227- var rc = renderedFields . SelectToken ( $ "$.[{ i } ].body") ;
228- return BuildCommentRevision ( c , rc , jiraItem ) ;
226+ return BuildCommentRevision ( c , c . RenderedBody , jiraItem ) ;
229227 } ) . ToList ( ) ;
230228 }
231229
232- private static JiraRevision BuildCommentRevision ( Comment c , JToken rc , JiraItem jiraItem )
230+ private static JiraRevision BuildCommentRevision ( Comment c , string rc , JiraItem jiraItem )
233231 {
234232 var author = "NoAuthorDefined" ;
235233 if ( c . AuthorUser is null )
@@ -252,7 +250,7 @@ private static JiraRevision BuildCommentRevision(Comment c, JToken rc, JiraItem
252250 {
253251 Author = author ,
254252 Time = c . CreatedDate . Value ,
255- Fields = new Dictionary < string , object > ( ) { { "comment" , c . Body } , { "comment$Rendered" , rc . Value < string > ( ) } } ,
253+ Fields = new Dictionary < string , object > ( ) { { "comment" , c . Body } , { "comment$Rendered" , rc } } ,
256254 AttachmentActions = new List < RevisionAction < JiraAttachment > > ( ) ,
257255 LinkActions = new List < RevisionAction < JiraLink > > ( )
258256 } ;
0 commit comments