Files
chore/.github/specs/archive/bug-both-system-and-user-items-shown.md
2026-02-01 23:39:55 -05:00

1.5 KiB

Bug: When a user task or reward exists with the same name as a system user or task, both are shown in the assign list.

The Problem

  • Actual: When the user creates a task/reward from a system task/reward (copy on edit), and then goes to assign the task/reward, both the system and user task/reward are shown and can be assigned.
  • Expected: When a user task/reward is created from a system (or even if it has the same name) - show the user item instead in the assign views.

Investigation Notes

  • When a copy on edit happens of a 'good' task and it is changed to 'bad', I can see the 'good' task when assigning tasks and the 'bad' penalty when assigning the penalty
  • The backend will have to change to probably check if the names are the same on tasks/rewards and if so, choose to return the user items instead.
  • In the case of two items having the same name AND having different user_ids that are not null, then we should show both items.
  • The task view and reward view correctly hides the system item. However, the Task Assign View and RewardAssignView are still showing both items.

The "Red" Tests

  • Create a test that performs a copy on edit and then makes sure only that item shows instead of the system item
  • Create a test that performs has 2 user items with the same name as a system item. Verify that the user items are shown, but not the system item.
  • Create a test where if a system and identically named user task exist that the user tasks is the only one shown in the task assign view and reward assign view.