Skip to content

feat: add search,project and approval status filters to get_timesheet…#899

Open
wreckage0907 wants to merge 3 commits intoversion-16-hotfixfrom
feat/timesheet-filter
Open

feat: add search,project and approval status filters to get_timesheet…#899
wreckage0907 wants to merge 3 commits intoversion-16-hotfixfrom
feat/timesheet-filter

Conversation

@wreckage0907
Copy link
Contributor

@wreckage0907 wreckage0907 commented Mar 17, 2026

Description

This pull request adds enhanced filtering capabilities to the timesheet API, allowing users to filter timesheet data based on search terms, project(s), and approval status. The changes improve both the API interface and the internal data retrieval logic to support these new filters.

Relevant Technical Choices

  • The get_timesheet_data function now accepts search, project, and approval_status parameters, parsing them as JSON lists when needed and building a unified filters dictionary.
  • Approval status filtering is implemented in the week data generation, so only weeks matching the specified status are included.
  • The get_timesheet function now accepts a filters argument and applies project filtering at both the parent timesheet and detail levels.
  • Search filtering is applied to task details, and timesheet logs are filtered to include only entries for matching tasks.
  • Filters are passed through to data generation and retrieval functions, and caching is disabled when filters are used to ensure correct results

Testing Instructions

Additional Information:

Screenshot/Screencast

image

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)

closes #904

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the get_timesheet_data timesheet API to support additional filtering (search term, project(s), and approval status), and adjusts internal retrieval logic to apply these filters while avoiding cached results when filters are active.

Changes:

  • Added search, project, and approval_status parameters to get_timesheet_data, including JSON parsing for list-like inputs.
  • Added approval-status filtering at the week aggregation layer and passed filter state into week generation.
  • Extended get_timesheet to accept a filters argument and apply project/search filtering to returned task/log data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wreckage0907 wreckage0907 marked this pull request as ready for review March 17, 2026 16:45
@wreckage0907 wreckage0907 requested a review from niraj2477 March 17, 2026 17:54
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