Skip to content

Add a button to Time Entry admin to synchronise ProCAT#649

Open
dalonsoa wants to merge 3 commits into
mainfrom
630_sync_clockify_button
Open

Add a button to Time Entry admin to synchronise ProCAT#649
dalonsoa wants to merge 3 commits into
mainfrom
630_sync_clockify_button

Conversation

@dalonsoa
Copy link
Copy Markdown
Collaborator

@dalonsoa dalonsoa commented Jun 2, 2026

Description

It helps when I want to manually ensure that ProCAT and Clockify are in sync, also serving for diagnosis and debugging. As it is now, I need to get into the server and manually add the tasks. This PR also illustrates how to add functionality to the Django Admin in an easy way, when we do not want to create dedicated public facing views.

Fixes #630

How to test

  • Launch the app with docker compose up
  • Go to the Admin -> Time Entries and check there is a bottom at the top to Synchronise with Clockify
  • Make sure there is a user with a valid email (eg. your own)
  • Add a project with all the bits and pieces required for it to be Active
  • Add it the Clockify ID of an existing project you have worked on recently, just for testing purposes
  • Clicking the new button in the Admin should bring whatever entries you have log in Clockify for this project ID within the last 30 days
  • If it does not work, there should be a message indicating so and the logs should show the problem

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.28%. Comparing base (f87990a) to head (55a100e).

Files with missing lines Patch % Lines
main/admin.py 64.28% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #649      +/-   ##
==========================================
- Coverage   92.53%   92.28%   -0.26%     
==========================================
  Files          50       50              
  Lines        1473     1490      +17     
  Branches      112      113       +1     
==========================================
+ Hits         1363     1375      +12     
- Misses         92       97       +5     
  Partials       18       18              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dalonsoa dalonsoa requested a review from SaranjeetKaur June 2, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add button for manually pulling data from Clockify

2 participants