Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly displayed Timesheet page information (submitted via a gazu script) #1686

Open
PeteDraper opened this issue Feb 3, 2025 · 6 comments
Assignees
Labels

Comments

@PeteDraper
Copy link

Kitsu version: 0.20.25
Production type: all

We have a script which allows for backdating timesheet information.

While the information in the task is looking correct, the numbers in the timesheet page is wrong, and equates to several decimal places.

10 minutes for a task added on an 8 hour day. Task logs as 0.02 days which is correct, timesheet logs as 0.16666' which is wrong. Summed time for the day is also incorrect.

We also need the ability to showcase the number of hours in the timesheet page / across the platform instead of a decimal value of a day which is confusing.

The gazu manual also mentions that the time should be added in seconds for the user - it's actually supposed to be in minutes.

Please see the screenshots:

Image Image
@NicoPennec
Copy link
Member

What Gazu method do you use to define the spent time?

@PeteDraper
Copy link
Author

gazu.task.add_time_spent

according to the docs it requires the time in seconds, but when we tried this, it produced too high values. It is actually appended in minutes.

@NicoPennec
Copy link
Member

On the top of your "Timesheets" page, the "Unit" selector is set to "day" or "hour"?
I see that this setting affects only the main timesheets, but not the time detail on the right side...

To recap, for an 8 hour day, 10 minutes = 0.1666 hour = 0.02 day

@PeteDraper
Copy link
Author

ah I think that's the issue - its not corresponding. I think an extra option in minutes should be introduced which will display actuals. This should also be applied across the platform as there's 3 different ways to display time and it's getting confusing - the time is displayed in decimal hours on the right, whereas it can be displayed as % of a day (from 0-1), but if you pull the information from the api it gives you the number of minutes.

I can rescind the bug, but I still think that there needs to be a limit on the number of decimal places visible if we're sticking with this way.

NicoPennec added a commit to NicoPennec/kitsu that referenced this issue Feb 10, 2025
NicoPennec added a commit to NicoPennec/kitsu that referenced this issue Feb 10, 2025
NicoPennec added a commit to NicoPennec/kitsu that referenced this issue Feb 10, 2025
@NicoPennec
Copy link
Member

I just fixed the unit change (hour/day) in the right panel in Kitsu 0.20.30.

@NicoPennec
Copy link
Member

@EvanBldy will check the Gazu documentation about the set_time_spent method. Thanks for the report @PeteDraper.

The gazu manual also mentions that the time should be added in seconds for the user - it's actually supposed to be in minutes.

NicoPennec added a commit to NicoPennec/kitsu that referenced this issue Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants