Jenkins:脚本不允许使用方法 org.thoughtslive.jenkins.plugins.jira.api.ResponseData getData

Jenkins: Scripts not permitted to use method org.thoughtslive.jenkins.plugins.jira.api.ResponseData getData

我有一个管道(groovy 文件不是声明性的)。管道从使用 jira-steps-pulgin 的共享库中调用一个函数,如下所示:

withEnv(["JIRA_SITE=${jiraSite}"]) {
     testissue = [fields: [ project: [key: 'ISSUE'],
         summary: "Subject",
         description: "Test Test",
         issuetype: [name: 'Task']]]
     def response = jiraNewIssue issue: testissue
     currentIssueKey = response.data.key
     echo response.data.toString()
     ...

当管道运行时,会产生一个问题。但我也尝试将问题分配给用户,因此函数按如下方式获取问题键

currentIssueKey = response.data.key

不幸的是,此错误失败了

Scripts not permitted to use method org.thoughtslive.jenkins.plugins.jira.api.ResponseData getData

我本希望在脚本批准下批准此签名,但没有。我怎样才能使这项工作?

各自的方法可以直接添加到scriptApproval.xml中,如下

<string>method org.thoughtslive.jenkins.plugins.jira.api.ResponseData getData</string>

我不得不重新启动 Jenkins,因为 "Reload Configuration from Disk" 还不够