Azurekuz / RPG-Task-Manager

A COMP345 Agile project dedicated towards creating a gamified RPG task manager.
MIT License
4 stars 1 forks source link

ID system enhancement #112

Closed E-3P0 closed 4 years ago

E-3P0 commented 4 years ago

The ID system as-is is prone to bugs. It was originally thought of as a solution to duplicate titles, and each task would have a unique id, but the way it is implemented now different tasks across different tasklists can have the same id value, and many functions attempted to use it as an index which tended to break things.

This enhancement should include: Global Task counter (part of TaskManager) that is incremented and passed in to TaskList when a new task is created. Perhaps calculate in load function as sum of the size of all tasklists + 1 if a main task is selected. Some other notes: -If a current task is completed or failed, it should be moved to the respective task list without changing the id, since moving the task does not change the global task count. -When a task is selected (added to current or set as main task) it should get a new id and increment the global count since the selected task is not removed from the default/custom task list.

After this is done we can clean up some extra operations and functions that bypassed the buggy id system.

Azurekuz commented 4 years ago

Time Taken (so far): 1.75 hours

Azurekuz commented 4 years ago

+1.5 hours Fixing some bugs, making tests pass, and resolving a merge conflict.

Time Taken: 3.25 Hours