简体   繁体   English

来自 ActiveCollab API 的时间记录值不正确

[英]Incorrect time records value from the ActiveCollab API

I have a issue with the the output of the API.我对 API 的 output 有疑问。

I'm trying to build a system where I've integrated ActiveCollab and trying to fetch tasks and tasks related time records.我正在尝试构建一个集成了 ActiveCollab 的系统,并尝试获取任务和与任务相关的时间记录。 All works fine but there is inconsistency in the time record values.一切正常,但时间记录值不一致。

Please see the screenshot below:请看下面的截图:

https://prnt.sc/wfr5ak https://prnt.sc/wfr5ak

In the above screenshot the time tracked values are 0.10 and 0.26 respectively.在上面的屏幕截图中,时间跟踪值分别为0.100.26

Upon fetching the time records via the API with endpoint /projects/1/tasks/1/time-records , the values are different.通过带有端点/projects/1/tasks/1/time-records的 API 获取时间记录时,值不同。 The screenshot for the response array is attached below:响应数组的屏幕截图附在下面:

https://prnt.sc/wfuo14 https://prnt.sc/wfuo14

The above screenshot have values 0.17 and 0.46 respectively which is completely wrong!上面的截图分别有0.170.46的值,这是完全错误的!

I'm not sure why that is happening?我不确定为什么会这样? Can you guys let me know if I'm doing anything wrong there?如果我在那里做错了什么,你们能告诉我吗?

ActiveCollab interface shows data in HH:MM format. ActiveCollab 界面以 HH:MM 格式显示数据。 API returns values in decimal format, as number of hours. API 以小时数返回十进制格式的值。 For example, 1.5 in API is 1:30 in interface.例如,API 中的1.5是接口中的1:30 Both values mean the same thing - one and a half hour.这两个值的含义相同——一个半小时。

Decimal format is returned because it allows easier calculation.返回十进制格式,因为它允许更轻松的计算。 It's also the format in which ActiveCollab stores tracked time values.这也是 ActiveCollab 存储跟踪时间值的格式。

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

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