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

Improve time tracking overview #7733

Merged
merged 39 commits into from
May 6, 2024
Merged

Improve time tracking overview #7733

merged 39 commits into from
May 6, 2024

Conversation

dieknolle3333
Copy link
Contributor

@dieknolle3333 dieknolle3333 commented Apr 3, 2024

URL of deployed dev instance (used for testing):

Steps to test:

  • Make sure to have some tracked times in explorative annotations and tasks
  • log in as admin-user and go to "Time tracking overview" through navbar
  • query time tracking entries
  • expand details for users
  • test download buttons
  • test as non-priviledged user (should only see yourself)
  • test without login (view shouldn't be accessible)

TODOs:

  • see issue
  • think about csv export structure
  • fix types
  • adjust tests to new param: getTimeTrackingForUserSpans, getTimeTrackingForUser
  • fix that non-admin user cannot see themselves because "page doesnt exist"
  • fix that expendable button is in wrong position after adjusting filters
  • make sure new project line looks good with segmentation stats

Issues:


(Please delete unneeded items, merge only when none are left open)

@dieknolle3333 dieknolle3333 marked this pull request as ready for review April 16, 2024 18:08
@fm3 fm3 requested a review from normanrz April 16, 2024 18:17
Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend code looks good 👍

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice stuff 👍

during testing I noticed that the user-specific CSV contains timestamps, such as "Fri, 19 Apr 2024 15:42:55 GMT". wouldn't unix timestamps make more sense as they are easier to parse? not sure whether they are coming from back-end or front-end...

frontend/stylesheets/main.less Outdated Show resolved Hide resolved
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
frontend/javascripts/admin/admin_rest_api.ts Show resolved Hide resolved
frontend/javascripts/types/api_flow_types.ts Outdated Show resolved Hide resolved
@dieknolle3333
Copy link
Contributor Author

wouldn't unix timestamps make more sense as they are easier to parse? not sure whether they are coming from back-end or front-end...

I had added them in the frontend in the first place, but changed them to unix timestamp now :)

@@ -193,7 +193,6 @@
"react-dom": "^16.9.0",
"react-dropzone": "^11.3.1",
"react-flow-renderer": "^10.3.16",
"react-google-charts": "^2.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i simply ran yarn remove react-google-charts, I hope its good the way it is now :)

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great :) Let's ship it. I fiddled with two small things out of curiosity (and then simply committed them, because this was the easiest). Sorry for intruding!

@dieknolle3333
Copy link
Contributor Author

no worries, thanks for looking into it! I will merge it on monday then :)

@hotzenklotz hotzenklotz mentioned this pull request Apr 26, 2024
11 tasks
@fm3 fm3 merged commit cb580b6 into master May 6, 2024
2 checks passed
@fm3 fm3 deleted the time-tracking-expand-table branch May 6, 2024 12:28
dieknolle3333 added a commit that referenced this pull request May 8, 2024
* [WIP] [ci skip] add expandable rows to see time tracking details

* prepare api for expanded table

* unwrap list of annotations with times

* add annotationCount to time tracking overview

* add projectName to summedByAnnotation response

* WIP [ci skip] render expandable table with tasks and annotations

* style expandable table

* add no. tasks and more stats to overview

* WIP [ci skip] add annotation stats

* style table

* add button to download timespans

* adjust api types to new responses, omit detail view and include annotation link in list

* remove code duplication

* fix sorting in table

* add additional fields to timespans

* adapt frontend api client to new timespans route

* snapshots

* add download for user time spans

* extract csv helper and put task fields into timetracking csv export

* try to fix type in test

* enable overview for non-privileged users

* fix-frontend

* adjust router.tsx to new view, fix fixedExpandableTable and disable teams field for non-admins

* lint

* improve condition and add changelog

* address review

* WIP: improve styling of table including annotation stats

* remove react-google-charts dependency

* change name of navbar menu entry

* remove unnecessary casts

* avoid margin bottom in annotation table

---------

Co-authored-by: Florian M <florian@scm.io>
Co-authored-by: Philipp Otto <philipp.4096@gmail.com>
Co-authored-by: Florian M <fm3@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Time Tracking Overview
4 participants