Ralph Hopman created FINERACT-2490:
--------------------------------------

             Summary: Add status field to StandingInstructionData serialization
                 Key: FINERACT-2490
                 URL: https://issues.apache.org/jira/browse/FINERACT-2490
             Project: Apache Fineract
          Issue Type: Improvement
            Reporter: Ralph Hopman


The {{status}} field in {{StandingInstructionData.java}} is missing the 
{{@Getter}} annotation, causing it to be excluded from JSON serialization even 
though it's properly selected from the database and populated by the 
{{{}StandingInstructionMapper{}}}.

This causes API responses from {{GET /standinginstructions}} to omit the status 
field, making it impossible for frontend applications to:
 * Filter out deleted standing instructions (status=3)
 * Distinguish between ACTIVE (1), DISABLED (2), and DELETED (3) states
 * Provide proper UI feedback about standing instruction states

h2. Root Cause

The backend soft-delete implementation marks instructions as deleted 
({{{}status=3{}}}) and the database query correctly selects the status field. 
However, without the Lombok {{@Getter}} annotation, Jackson cannot serialize 
the private field to JSON during API responses.
h2. Solution

Add the {{@Getter}} annotation to the {{status}} field at line 66 in 
{{{}StandingInstructionData.java{}}}.

The field should be consistent with other {{EnumOptionData}} fields in the 
class (like {{{}amount{}}}, which already has {{{}@Getter{}}}).
{code:java}
@Getter
private final EnumOptionData status;
{code}
h2. Testing

Add unit tests in {{StandingInstructionDataSerializationTest.java}} to verify:
 * The status field is properly serialized to JSON
 * All status states (ACTIVE, DISABLED, DELETED) are correctly represented
 * The {{EnumOptionData}} structure contains all expected fields



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to