Cocoa-Puffs commented on PR #6784:
URL: https://github.com/apache/fineract/pull/6784#issuecomment-6502623800

   Fixed as you suggested:
   
   - A second changeset in `0276` adds `submitted_ids_kept` (BOOLEAN NOT NULL, 
default false). Like the first changeset, it is metadata-only.
   - `CommandSource.fullEntryFrom` sets it to true. Every new row is created 
there, including `saveInitial` and `getInitialCommandSource` for batch 
requests, so new rows count as having their submitted values whatever status 
they end up in.
   - `AuditColumns.submitted()` and `addSubmittedCriteria` accept a row when 
`submitted_ids_kept` or `result_ids_written` is true, or its status is awaiting 
approval, rejected or under processing.
     - The status list is now only needed for rows inserted before the upgrade.
     - `result_ids_written` stays in the condition because a pending row 
inserted before the upgrade and approved afterwards still holds its submitted 
values.
     - The returned-value logic is unchanged.
   - The `submitted*` Swagger description now holds: the value is null only for 
commands that were processed, or failed, before submitted identifiers were kept.
   
   Tests:
   
   - `CommandSourceTest` checks that `fullEntryFrom` sets the flag.
   - The filter SQL test covers the new condition.
   - 
`LoanTransactionAdjustmentAuditTest.auditApiReportsSubmittedIdentifiersForFailedAdjustment`
 adjusts a repayment to a future date, which is rejected. It checks that 
`/audits?submittedResourceId=` finds the failed command with the right 
`submittedResourceId` and `submittedLoanId`. The stored row has status ERROR, 
`result_ids_written = false` and `submitted_ids_kept = true`.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to