Passing a hyperlink to a JIRA description field using R

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()
                 )
0
source share
1 answer

If I understood you correctly, you want to create LinkToFileInSharePointthe right, so try this

LinkToFileInSharePoint <- paste0("<a href='",SPurl,"' target='_blank'>","SharePoint Link</a>")


Hope this helps!

+1
source

Source: https://habr.com/ru/post/1668839/


All Articles