siphomateke / zra-helper

A browser extension that automates various aspects of the ZRA website.
Other
0 stars 1 forks source link

Viewing tasks in the task viewer interferes with tasks elsewhere #131

Open siphomateke opened 5 years ago

siphomateke commented 5 years ago

Version v1.8.0

Describe the bug Importing tasks into the task viewer messes up and replaces task elsewhere. This is happens when the imported tasks have the same ID as an existing one. The imported task replaces the existing one.

To Reproduce Steps to reproduce the behavior:

  1. Run action X
  2. Export the tasks as JSON
  3. Reload the extension
  4. Run action Y
  5. Import the previously exported tasks JSON into the task viewer
  6. Observe that the dashboard's tasks are those from action X instead of Y

Expected behavior Importing and viewing tasks in the task viewer should not interfere with any other tasks, be it in the Dashboard or single client Login.

Additional context This is a limitation of the current tasks system which has one master task dictionary with tasks stored by ID. Fixing it will rewriting all the Vuex getters to work with an arbitrary task dictionary. An alternative solution could be to generate new random unique IDs for the tasks imported using the task viewer.