Note

We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again

The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagegroovy
titleADO Outgoing Sync
linenumberstrue
collapsetrue
def allComments = workItem.comments.collect {
    comment ->
def comment1=comment.body
def matcher  = comment1 =~ /(?<=data-vss-mention="version:2.0,).*?(?=\")/
matcher.each {
 x->

def userId=nodeHelper.getUser(x,"DemoProject_Exalatekey")?.email
 if (userId)
{
def matcher1 = comment1 =~ /<a[^>]*?data-vss-mention="version:2.0,${x}[^"]*?"[^>]*?>.*?<\/a>/

matcher1.each{
    y->
    comment1=comment1.replaceAll(y,"[~accountid:"+userId+"]")
  }

}
          
}

    comment.body=comment1
    comment
}
replica.comments       = nodeHelper.stripHtmlFromComments(allComments)

...