Saechaoc opened a new pull request, #4868:
URL: https://github.com/apache/fineract/pull/4868

   ## ๐Ÿš€ Feature: Add Birthday Filter to Savings Accounts Endpoint
   
   **JIRA Ticket**: WEALTHFRONT-1234  
   **Summary**:  
   This PR introduces support for filtering savings accounts by client 
birthdays using `month` and `day` query parameters on the `GET 
/savingsaccounts` endpoint. This feature lays the groundwork for future 
automation efforts like birthday email campaigns.
   
   ---
   
   ### โœจ Changes Overview
   
   #### ๐Ÿ”ง API Enhancements
   - Extended `GET /savingsaccounts` to accept optional `month` and `day` query 
parameters.
   - Introduced a new `retrieveAllByBirthday` method in 
`SavingsAccountReadPlatformService`.
   
   #### ๐Ÿ“ฆ Core
   - Enhanced `SearchParameters`:
     - Added `birthMonth` and `birthDay` fields.
     - Included overloads and helper methods for backward compatibility.
   
   #### ๐Ÿ“Š Service Implementation
   - In `SavingsAccountReadPlatformServiceImpl`, added logic to:
     - Append `MONTH(c.date_of_birth)` and `DAY(c.date_of_birth)` to SQL 
queries conditionally.
     - Maintain existing filtering behavior while optionally scoping results to 
birthday filters.
   
   #### โœ… Tests
   - Added integration test: `retrieveSavingsAccountsByBirthday_Success`
     - Validates correct results for existing birthday records.
   - Added negative test: `retrieveSavingsAccountsByBirthday_EmptySet`
     - Ensures no accounts are returned when no clients match the given 
birthday.
   
   #### ๐Ÿงน Misc
   - Updated `build.gradle` with dependency resolution override for 
`okhttp-digest`.
   ---
   
   ### ๐Ÿ” Validation
   - โœ… Manual test with test data containing birthdays returned expected 
accounts.
   - โœ… Verified results were correctly filtered at the SQL level.
   - โœ… Regression tested `/savingsaccounts` without birthday filters for 
compatibility.
   ---
   
   ### ๐Ÿ“Œ Notes
   - This implementation supports **partial** birthday filtering โ€” month-only 
or day-only queries are also valid.
   - Next steps may include exposing this data on the UI dashboard and setting 
up background email notifications.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to