Skip to content

fix: timesheet daily rejection reason propagated to new (day, project) timesheet pair - #2016

Draft
robinroy03 wants to merge 1 commit into
version-16-hotfixfrom
fix/timesheet-propagation
Draft

fix: timesheet daily rejection reason propagated to new (day, project) timesheet pair#2016
robinroy03 wants to merge 1 commit into
version-16-hotfixfrom
fix/timesheet-propagation

Conversation

@robinroy03

Copy link
Copy Markdown
Member

Description

timesheet daily rejection reason propagated to new (day, project) timesheet pair

Relevant Technical Choices

  1. added a check for it every time a timesheet is submitted

Testing Instructions

#1741 (comment)

Checklist

  • I have carefully reviewed the code before submitting it for review.
  • This code is adequately covered by unit tests to validate its functionality.
  • I have conducted thorough testing to ensure it functions as intended.
  • A member of the QA team has reviewed and tested this PR (To be checked by QA or code reviewer)

Fixes ##1741 (comment)

@robinroy03
robinroy03 requested review from wreckage0907 and a balanced review from Copilot August 11, 2026 12:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Propagates a rejected day’s rejection reason to newly created timesheets on the same day (e.g., a new project entry created after the day was already rejected).

Changes:

  • Add per-day rejection aggregation and a propagation map during weekly status updates.
  • Apply propagated day-level rejection status/reason when updating each timesheet.
  • Add a unit test covering creation of a new same-day/project timesheet after rejection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
next_pms/timesheet/api/utils.py Computes and applies day-level rejection propagation during weekly status updates
next_pms/tests/timesheet/api/test_timesheet_rejection_reason.py Adds fixture data + a test ensuring same-day new timesheet inherits rejection

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +195 to +196
if ts.get("custom_approval_status") not in (None, "Not Submitted"):
continue
@robinroy03
robinroy03 marked this pull request as draft August 11, 2026 12:50
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.

2 participants