SuffolkLITLab / docassemble-AssemblyLine

Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
MIT License
41 stars 5 forks source link

Make it possible to disambiguate 'familiar' names #861

Closed nonprofittechy closed 3 months ago

nonprofittechy commented 3 months ago

Fix #857

Returns the individual's name in the most familiar form possible.

The purpose is to allow using a short version of the individual's name in an unambiguous way in the interview. For example: referring to the child in a guardianship petition by first name instead of "the minor". But there may be a problem if context doesn't make it clear if you are talking about the child or their parent when they share a name.

In order, it will try to use:

Example usage:

Who do you want to take care of ${ children.familiar(unique_names=parents + petitioners, default="the minor") }?
ekressmiller commented 3 months ago

This seems like a good idea. I hadn't thought of that pitfall of using just the first name but in retrospect it's so clear!