fix: timesheet project lock timeout error#1627
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce Timesheet-save failures caused by DB lock contention (notably on Project) by avoiding automatic Project updates during Timesheet updates, and instead providing a manual Project costing refresh action in the UI.
Changes:
- Override Timesheet’s
update_task_and_project()to update Tasks but skip the Project update loop (reducing Project-table write contention during Timesheet saves). - Add a Refresh Costing custom button on the Project form that triggers a dedicated costing refresh call.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| next_pms/public/js/project.js | Adds a Project form button to manually refresh costing/billing fields. |
| next_pms/project_currency/overrides/timesheet.py | Overrides Timesheet’s task/project update flow to avoid Project updates during Timesheet saves. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@HarishChandran3304 could you confirm if the bug is still present? If so change the branch to |
@robinroy03 The issue isnt very reproducible, it was happening arbitrarily. We can wait a bit to see if anyone reports this else we can close it. |
Description
Relevant Technical Choices
Testing Instructions
Additional Information:
Screenshot/Screencast
Screen.Recording.2026-06-24.at.7.30.38.PM.mov
Checklist
Fixes #