Chore subtasks

Changed

Context

While cleaning the shower, I noticed there are several indications of it's state of cleanliness.

  1. Are the glass windows clean?
  2. Is there grime on the walls?
  3. Is there soap scum in the shelves?
  4. Is the floor clean?

Cleaning the shower is a subtask of cleaning the bathroom.

A scoring of the shower's state could be derived from these sub parts.

Questions

How can I create a checklist interface with subtasks?
Could use reference widget and customize items available. But I want it on the front end.

Ideas

May need to build an HTMX component.

Done

Added as a bulleted list for now: https://inventory.mantra.network/chores/clean-shower

I used the View Entity Reference Hierarchy on Drupal.orgEntity Reference HierarchyCovered by the Drupal security advisory policy (2,133 installs) module, adding a Parent chore reference field on the Chore storage type.

Then created an entity reference view display, using the "chore" url query parameter as the contextual filter for parent chore. That query parameter was added to the View Views Add Button on Drupal.orgViews Add ButtonCovered by the Drupal security advisory policy (1,693 installs) for View Entity Prepopopulate on Drupal.orgEntity PrepopopulateCovered by the Drupal security advisory policy (1,388 installs) to fill in the Chore reference field.

Here's the end result:

Great! The two chores with Vacuum floor set as the parent appear here.

Display of chore w/ sub chores: