Skip to content

FINERACT-2683: Fix date filters and add username filter on Maker-Checker inbox endpoin#6120

Open
aya-abdallah-FOO wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-507-makercheckers-date-and-username-filters
Open

FINERACT-2683: Fix date filters and add username filter on Maker-Checker inbox endpoin#6120
aya-abdallah-FOO wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-507-makercheckers-date-and-username-filters

Conversation

@aya-abdallah-FOO

Copy link
Copy Markdown

Description

Fixes two issues with the GET /v1/makercheckers endpoint:

1. Date filters non-functional

The makerDateTimeFrom / makerDateTimeTo filters compared against made_on_date, but records created after the UTC-offset migration are stored in made_on_date_utc. This
made date-range filtering silently return no results for those records.

Fix applies the same OR-pattern already used by AuditsApiResource: check both made_on_date and made_on_date_utc so filtering works correctly regardless of which column a
record uses.

Also adds a fallback date parser in MakerCheckerRequest for the "dd MMMM yyyy" format (e.g. 02 June 2026), which the existing
DateUtils.convertDateTimeStringToOffsetDateTime does not support when dateFormat/locale params are absent, causing a 500.

2. Username filter missing

The mk (appuser) table is already joined in the underlying query. This adds a ?username= query parameter that filters entries by the maker's username via a LIKE prefix
match against mk.username.

Changes

  • MakercheckersApiResource.java — date filter uses OR-pattern on both columns; username LIKE filter added
  • MakerCheckerRequest.javausername query param added; getMakerDateTimeFrom/To() gains dd MMMM yyyy fallback parsing

Testing

  • Compiled clean against develop with JDK 21
  • All 20 unit tests in org.apache.fineract.commands.* pass

Related

…ker inbox endpoint

The GET /v1/makercheckers date-range filters had two issues:

1. The filters compared against made_on_date but records created since
   the UTC migration are stored in made_on_date_utc. Fix applies the
   same OR-pattern already used by AuditsApiResource (check both
   columns) so filtering works regardless of which column a given
   record uses.

2. The date getter in MakerCheckerRequest delegated entirely to
   DateUtils.convertDateTimeStringToOffsetDateTime, which requires the
   caller to pass dateFormat and locale query params. Clients that send
   dates in "dd MMMM yyyy" format without those params got a 500.
   Fix adds a tryParseDayMonthYear fallback that handles this format
   before delegating to DateUtils for ISO and other formats.

Also adds a username query parameter to filter entries by the maker's
username via a LIKE match against mk.username, which is already joined
in the underlying query.
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.

1 participant