描述问题
想要利用JIRA的REST API, 把JIRA的某些功能集成到一个PHP-Web项目中去
在测试「创建一个需求」接口时,老是拋错 ( POST /rest/api/2/issue)
目前根据已知的搜索结果, 大概是JIRA服务端权限的问题
不知道有过来人做过JIRA-REST-API这一部分? 有些什么坑吗?
上下文环境
JIRA REST API文档-关于create issue: https://docs.atlassian.com/jira/REST/5.1.3/#id121479
JIRA5
未使用官方提供的java-rest-client
(目的是使用PHP通过其REST API集成到PHP项目中去)
重现
根据官网的接口,POST相关参数
便可得到错误信息(最好有一个REST Client工具)
相关代码
报错信息
POST之后返回的JSON
{
"errorMessages":
[
],
"errors":
{
"reporter": "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown.",
"timetracking": "Field 'timetracking' cannot be set. It is not on the appropriate screen, or unknown.",
"priority": "Field 'priority' cannot be set. It is not on the appropriate screen, or unknown.",
"labels": "Field 'labels' cannot be set. It is not on the appropriate screen, or unknown.",
"duedate": "Field 'duedate' cannot be set. It is not on the appropriate screen, or unknown.",
"security": "Field 'security' cannot be set. It is not on the appropriate screen, or unknown.",
"worklog": "Field 'worklog' cannot be set. It is not on the appropriate screen, or unknown."
}
}
相关截图
已经尝试哪些方法仍然没有解决(附上相关链接)
直接根据报错信息Google
猜测是权限问题
问题简化
相关链接
根据报错信息搜索到的解决方案: https://answers.atlassian.com...
官网关于scrren Permission的说明: https://confluence.atlassian....
官网的REST API文档: https://docs.atlassian.com/ji...
这个问题后来解决了吗