简体   繁体   English

如何在JIRA中获取自定义字段的所有值?

[英]How to get all values for a customfield in JIRA?

I've been basically working with this documentation to built my desired URI's in order to extract the information from a project, that I need: JIRA REST API Reference 我基本上一直在使用此文档来构建所需的URI,以便从项目中提取所需的信息: JIRA REST API参考

However, now I have a customfield with the id cf1 (example) and want to get a list (JSON response) of all the values that cf1 might have. 但是,现在我有一个id为cf1的自定义字段 (示例),并且想要获取cf1可能具有的所有值的列表(JSON响应)。

For instance, with 例如,

https://domain.com/jira/rest/agile/1.0/board/ {boardID}/sprint https://domain.com/jira/rest/agile/1.0/board/ {boardID} / sprint

I can get all the sprints associated with the board. 我可以获得与董事会相关的所有sprint。 Can I do the same for a customfield? 我可以对自定义字段执行相同操作吗?

Use the createmeta call: 使用createmeta调用:

https://<your-jira-server>/rest/api/latest/issue/createmeta?projectKeys=<your-project-key>&issuetypeName=<your-issue-type-name>&expand=projects.issuetypes.fields

In the huge JSON thats returned, search for your custom field and read the allowedValues. 在返回的庞大JSON中,搜索您的自定义字段并读取allowedValues。 Enjoy :) 请享用 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM