Skip to content

[STAR-2883] feat: Basic tagging support.

Fox Piacenti requested to merge fox/tagging-backend into master

This MR adds the ability to tag users and checklist task definitions. This allows checklists to be tailored to the individual team member's responsibilities and also to filter responses by team member when building reports.

This MR also massively improves test run speed. On my machine, a first run has gone from 6 minutes and 34 seconds to 70 seconds. The gains will be more modest for lower powered machines, but are likely to be significant nonetheless-- they're the difference between parallelizing the tests and not parallelizing them.

Re-running the tests is even faster with --reuse-db, as the DB is now preserved by default. It drops from 70 seconds to 51. So, in the best case on my machine, we see a 773% speed improvement! 😄 I was going to make that the default but it's a little bit unreliable.

Supporting information

Discussions

#75 (closed)

Visual changes

  • To be added

Testing instructions

Step by step procedure

  1. Check out this branch and run migrations
  2. Enter the admin and check the team page.
  3. You should see members added in-line. Modify the tags on these members, add members, and delete them.
  4. Add some deliberate test tags for filtering in the next steps (read ahead!)
  5. Go to the task definitions and verify you can tag them.
  6. Use the recurrences to create a run and verify that:
    1. A task with no tags is always assigned.
    2. A task with specific tags is not assigned to a user that does not have at least one of those tags.
    3. A task with specific tags is assigned to a user that has at least one of those tags.
    4. A checklist is not created for a user who does not match any tags on a checklist full of tagged definitions.

Author notes and concerns

This MR does not implement the report filtering yet-- turns out that will be a much bigger task than expected, since it's not technically necessary to meet our shortest-run goal of migrating over from Monday, I think it's best to make it a follow-up task for someone from Bebop rather than me.

Edited by Fox Piacenti

Merge request reports