-
Notifications
You must be signed in to change notification settings - Fork 464
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
timestat back and forth is weird #114
Comments
@sductor |
@sductor |
Yep it is what I got on |
@sductor |
I don't think it is possible and would be surprised if it was… |
@sductor I have made the fix and have released version 4.7.8. |
I want to reopen the issue, since it seems to have other problems. Whenever I read the issue from gitlab the time is accurate. |
You have discovered an actual bug with GitLab, not this library. When I make time_estimate calls it looks like the set time estimate endpoint considers "1 month" = "30 days". I have validated this by calling the GitLab API directly using Postman. As you have discovered, if the "mo" (month) duration is used when setting the time_estimate, GitLab will set the time_estimate to "1mo 2w" for every "1mo", so you get the following results:
If I do not use the "mo" duration, everything is fine:
The bug with GitLab is that when setting duration, "1mo" = "30d", but when fetching duration "1mo" = "4w" (20 days). What is interesting, is they do not even reference the "mo" duration in the docs at: myserver/help/workflow/time_tracking.md |
I think I have understand the problem. |
For the record, it seems that you lost the "day" precision. As far as I tested, everything seems fine |
In case you are interested, here is an unofficial imperative adaptation of the «laws» defined by haskell to ensure the validity of the implementation of a «getter/setter» object (lens)
The idea is to implement this three rules and a generator of time examples and to check for each time example generated if the rules are verified. |
@sductor I'll have to look into your suggestion, but in a sense have caught it with the round trip tests. |
my "suggestion" was more a genuine share of knowledge than anything else. Thanks for the work |
@sductor I still need to submit a bug with GitLab to let them know that they have an issue with time_estimate using 30 days per month, and everywhere else it is 20 days per month. |
As far as I observed, everything seems good. The ultimate step of my project was to add a duration for a starting date to obtain the ending date.
Regards |
Hi,
First thank you for the work.
My issue is that I find the behavior of a certain function weird.
But maybe this is not a problem with the code but I didn't unerstand how I am supposed to use it.
Here the faulty code:
At this point an issue is created but it displays an estimated time of 5 months!
Then
display 1mo3d8h
Thus I finnd the utilisation really not intuitive
It appears to me that the problem come from the fact that you are using real time value whereas gitlab use a day = 8h etc. But as this is an api for gitlab, I found a pity that you does not use the same standard as gitlab. I imagine that I would have to do a adapter that would go back and forth between your standard and the one of gitlab. But I think this is also a pity since you already ave those variables
as the two first lines of DurationUtils but that are private.
I feel that the project would benefit to:
The text was updated successfully, but these errors were encountered: