raft-tech / TANF-app

Repo for development of a new TANF Data Reporting System
Other
16 stars 3 forks source link

Eliminate Duplicate Errors for Transform Field Validation #2934

Open elipe17 opened 2 months ago

elipe17 commented 2 months ago

Description: TDP represents field values in a data file in two ways: a Field or a TransformField. A TransformField is considered a child of the Field class because it represents an in-place transformation to a field or a transformation on a field to create a new field. The situation of a new field being created presents an issue. If the field in which the transform field is derived off of has errors/is malformed, the transform field will still happily apply it's transformation and create the new field because it lacks information about it's parent field. We would like to update the TransformField class to have knowledge of it's parent field's state. This way we aren't performing transformations, validation, and creation on invalid data. This presents another situation. If the TransformField's data is not generated or is converted to a None, the required validation check will throw an error because all TransformFields are required. We can ease this is by setting required=False and trust that the TransformFields newly acquired state info about it's parent will bridge the gap.

Acceptance Criteria: Create a list of functional outcomes that must be achieved to complete this issue

Tasks: Create a list of granular, specific work items that must be completed to deliver the desired outcomes of this issue

Notes: Add additional useful information, such as related issues and functionality that isn't covered by this specific issue, and other considerations that will be helpful for anyone reading this

Supporting Documentation: Please include any relevant log snippets/files/screen shots

Open Questions: Please include any questions or decisions that must be made before beginning work or to confidently call this issue complete

elipe17 commented 1 month ago

@ADPennington would you mind taking a look at this and verify if I captured everything we want to occur with respect to field transforms?