使用R将超链接传递到JIRA

使用R将超链接传递到JIRA

本文介绍了使用R将超链接传递到JIRA'描述'字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将超链接传递给JIRA描述字段,例如 SharePoint链接使用R,但最终显示此

I am trying to pass an hyperlink to JIRA description field like this SharePoint Link using R but ending up 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 am 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()
                 )

推荐答案

如果我没被误解,那么您正在寻找正确创建LinkToFileInSharePoint的方法,因此尝试一下

If I am not misunderstood then you are looking to create LinkToFileInSharePoint properly so let's try this

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


希望这会有所帮助!


Hope this helps!

这篇关于使用R将超链接传递到JIRA'描述'字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 20:41