I am trying to pass a hyperlink to the JIRA description field as follows SharePoint Link using R, but eventually displaying this
<a href='somesite.com/sites/site/Documents/DocFolder/fileName.ext' target='_blank'>SharePoint Link</a>.
Any suggestion on how to fix this?
This is the code I'm using.
library(httr)
SPurl <- "somesite.com/sites/site/Documents/DocFolder/fileName.ext"
LinkToFileInSharePoint <- paste0("<a href='",SPurl,"' target='_blank'>",SharePoint Link,"</a>")
x <- list( fields = list(project = c(key = "TEST"),
summary = "New Ticket",
description = LinkToFileInSharePoint,
issuetype = c(name = "Task"),
assignee = c(name ="AssigneeUserName")
)
)
response <- POST("https://somesite.atlassian.net/rest/api/2/issue/",
body = RJSONIO::toJSON(x),
authenticate("username", "password", "basic"),
add_headers("Content-Type" = "application/json"),
verbose()
)
source
share