phip1611 / gitlab-timelogs

CLI utility to support you with your time logs in GitLab.
MIT License
10 stars 3 forks source link

get time tracking from team #18

Open tvogtintotesource opened 1 month ago

tvogtintotesource commented 1 month ago

If I use my personal token Ic an get my own hours.

gitlab-timelogs --host gitlab.com --username tvogt1 --token xxxxxxxxx - --after 2024-10-01 --before 2024-10-08 01:10:22 Host : gitlab.com Username : tvogt1 Time Span: 2024-10-01 - 2024-10-08 ====================== WEEK 2024-W40 ====================== Total time: 4h 00m

2024-10-04, Fri ( 4h 00m) 4h 00m create Pxxx for Dxxx https://gitlab.com/xxxxx/vxxx/-/issues/19 [Epic: Put xxx in Pulumi, Group: Vadain]

If I select an team user with the personal or gitlab token I get an error

Host : gitlab.com Username : pxxx (different team user) Time Span: 2023-01-01 - 2024-10-09 thread 'main' panicked at src/fetch.rs:95:10: called Result::unwrap() on an Err value: reqwest::Error { kind: Decode, source: Error("invalid type: null, expected struct ResponseTimelogs", line: 1, column: 178) } note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

phip1611 commented 1 month ago

Hi and thanks for the interest in this project!

team user

To be honest, I didn't thought or even know about team users.

The error is most likely that gitlab returns something that can't be serialized. I'm happy to further assist you in debugging and eventually fixing this (if it is not too big to explode the whole project). By using https://gitlab.host/-/graphql-explorer you can experiment what is returned in this case by GitLab. From the source code, you can get the necessary graphql request.

PS: Could you elaborate why teamusers should have time-tracking? I never thought about that. What's the idea, what's the use case?

tvogtintotesource commented 1 month ago

I am teamlead an work with estimate hours and need to wait for devs to provide me with the hours ( which they don’t). If it would be possible to check spend hours in cli for other devs than my self. So I can get track of spend vs estimated hours.

Met vriendelijke groet,

Tim Vogt Lead Developer @.***

[image001.png]

Ceintuurbaan 14B 8024 AA Zwolle T. 085 902 0480

www.intothesource.com

DISCLAIMER: Dit e-mailbericht is uitsluitend bestemd voor de geadresseerde. Als dit bericht niet voor u bestemd is, wordt u vriendelijk verzocht dit aan de afzender te melden. Into The Source staat door de elektronische verzending van dit bericht niet in voor de juiste en volledige overbrenging van de inhoud, noch voor tijdige ontvangst daarvan. Voor informatie over Into The Source raadpleegt u www.intothesource.com.

This e-mail is intended for the addressee’s eyes only. If you are not the intended recipient, you are hereby kindly requested to inform the sender of this. In view of the electronic nature of this communication, Into The Source is neither liable for the proper and complete transmission of the information contained therein nor for any delay in its receipt. For information about Into The Source, direct your browser to www.intothesource.com

Op 21 okt 2024, om 16:23 heeft Philipp Schuster @.***> het volgende geschreven:

Hi and thanks for the interest in this project!

team user

To be honest, I didn't thought or even know about team users. By using https://gitlab.host/-/graphql-explorer you can experiment what is returned in this case.

The error is most likely that gitlab returns something that can't be serialized. I'm happy to further assist you in debugging and eventually fixing this (if it is not too big to explode the whole project).

PS: Could you elaborate why teamusers should have time-tracking? I never thought about that

— Reply to this email directly, view it on GitHubhttps://github.com/phip1611/gitlab-timelogs/issues/18#issuecomment-2426836227, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APBLODZQWPTSXDZU3RTG6ULZ4UE6ZAVCNFSM6AAAAABPT3LVDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRWHAZTMMRSG4. You are receiving this because you authored the thread.Message ID: @.***>

phip1611 commented 1 month ago

I am teamlead an work with estimate hours and need to wait for devs to provide me with the hours ( which they don’t).

Currently, my team led uses a custom python script to get the accumulated reports from the GraphQL API, while this tool was made for the developer itself (only view their own time track data). Although we have the idea to get rid of the python script and make this tool more mature, we didn't invest the time yet.