简体   繁体   English

使用JIRA``获取更新的工作日志的ID''REST API时如何获取扩展属性?

[英]How do I get the expand properties when using JIRA ''Get IDs of updated worklogs'' REST api?

Using JIRA, I get a list of IDs for worklogs updated by using this api . 使用JIRA,我获得了使用此api更新的工作日志的ID列表。

/rest/api/2/worklog/updated

I can get the regular request to work, but there is a parameter called expand to display additional properties of the worklog and I can not get these properties to appear. 我可以得到正常的工作请求,但是有一个名为expand的参数来显示工作日志的其他属性,而我无法显示这些属性。

Things I have tried so far. 到目前为止我尝试过的事情。

/rest/api/2/worklog/updated?expand=spentTime

/rest/api/2/worklog/updated?expand=authorName,comment

The example response in JIRA document (link mentioned above) has a field called properties . JIRA文档(上面提到的链接)中的示例响应具有一个称为properties的字段。 It may be used to contain expand properties. 它可以用来包含扩展属性。

JIRA回应

But I don't know why my response doesn't have that field. 但是我不知道为什么我的回答没有这个领域。

我的回复

If what you're looking for is timeSpent , expanding properties is not the correct approach. 如果您要查找的是timeSpent ,则扩展properties不是正确的方法。 You're going to get the relevant workLogIds returned by Get IDs of updated worklogs , then make a second REST call to Get worklogs . 您将获得由获取更新的工作日志的ID返回的相关workLogIds ,然后对Get工作日志进行第二次REST调用。 This call will give you timeSpent , and updateAuthor among others. 该调用将为您提供timeSpentupdateAuthor等。 However, it will not give you comments; 但是,它不会给您评论。 you'll be needing a different call for that. 您将需要一个不同的电话。

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

相关问题 使用jira rest API从一段时间获取Jira工作日志 - Get Jira worklogs from a period of time using jira rest api 使用Jira Rest API-如何获得特定问题的描述? - Using jira rest api - how can I get description of a specific issue? 如何使用 JIRA REST API 获取项目中的所有冲刺 - How to get all sprints in project using JIRA REST API 如何使用 JIRA REST API 为用户获取“正在进行”的故事? - How to get stories that are "In Progress" for a user using JIRA REST API? 如何使用JIRA REST API为当前用户分配当前sprint的JIRA Agile问题? - How to get JIRA Agile issues assigned to the current sprint for the current user using the JIRA REST API? python-jira:如何在没有问题名称/密钥或用户的情况下获取工作日志列表? - python-jira : how to get worklogs list without neither an issue name/key nor an user? 如何使用JIRA REST API获取分配给当前用户的JIRA问题? - How to get JIRA issues assigned to the current user using the JIRA REST API? 如何使用 Rest API 或 jira-ruby gem 获取 jira 项目中的所有板 - How to get all boards in jira project using either Rest API or jira-ruby gem 使用JIRA rest api时,你能获得字段基名而不是翻译名吗? - Can you get the field base name instead of the translated name when using the JIRA rest api? 使用REST API获得有关JIRA板的有用信息 - Get useful information about a JIRA board using the REST API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM