Skip to content

Refactor case.application_form_id to be a generic starting_record_id #285

@lamroger-nava

Description

@lamroger-nava

Contact Details

No response

Is your feature request related to a problem? Please describe

No response

A clear and concise description of what you want to happen

The Strata::Case base class currently has an application_form_id, since when we designed the class we assumed at all cases started from a subclass of ApplicationForm. We now have a concrete exception to this. For example, in OSCER, a CertificationCase is started from a Certification, which isn't an ApplicationForm. Another potential category of exceptions could be business processes for verifying user accounts, such as verifying an employer account (although this is TBD, as one could conceivably view that as starting from an ApplicationForm).

This issue is to refactor Case#application_form_id to be more generic. For example, a Case can have:

Case#starting_record_id

Case#starting_record_type

Related idea: If possible it might be interesting to also add virtual getter/setters based on the type, for example if a case.starting_record_type == "application_form", then the case would have a getter/setter like:

def application_form_id
starting_record_id
end

def application_form_id=(value)
self.starting_record_id = (value)
end

This issue was inspired by @baonguyen's observation

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrubyPull requests that update Ruby code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions