Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing a task while their parent task is open won't update the task contents to remove the subtask #544

Open
Neui opened this issue Jan 21, 2021 · 3 comments
Labels
bug patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. priority:medium reproducible-in-git Issues that affect the current dev version

Comments

@Neui
Copy link
Contributor

Neui commented Jan 21, 2021

  1. Have a parent task with a child task
  2. Open the parent task in the task editor
  3. Delete the child task (via right-click → Delete in the main browser window in my case)
  4. The child task is still listed in the parent task editor

Upon clicking it the following is spewed out:

2021-01-21 01:36:45,091 - ERROR - application:open_task:489 - Task 01448ecb-a9b8-4567-b1eb-e627d0035803 could not be found!
Traceback (most recent call last):
  File ".local_build/install/lib/python3.8/site-packages/GTG/gtk/editor/text_tags.py", line 132, in on_tag
    view.open_subtask_cb(self.tid)
  File ".local_build/install/lib/python3.8/site-packages/GTG/gtk/editor/editor.py", line 718, in open_subtask
    self.app.close_task(task.parents[0])
AttributeError: 'NoneType' object has no attribute 'parents'

Re-opening the task window removes the task, so it isn't too bad.
Using current master.

@diegogangl diegogangl added the bug label Jan 21, 2021
@nekohayo
Copy link
Member

If you want to fix that live updating bug that'd be technologically neat (in that case I'd say, duplicate of issue #416 ?), I had been kinda been "hiding the symptom" by having our tasks auto-close the task editor window when from a parent to a child and vice-versa, but you are correct that it is possible to still experience the issue by having a task open and using the task browser to influence it (or to open a child at the same time)...

@jon-dez
Copy link

jon-dez commented Jan 25, 2021

I started using GTG to manage and keep track of my school work, and so far it has been great. It provides a great central location to see what assignments I need to do next.
A downside to GTG is that I constantly encounter bugs when trying move tasks around. I think a good solution to this is to have some sort of TreeManager class. This TreeManager class will be responsible for managing nodes (deletion, creation, moving, etc.) and updating/syncing the tree view of the tasks through the use of some subject and observer pattern. Then, we can prohibit the Task class from directly interacting with other nodes and leave that responsibility for the TreeManager.

I'm open to contributing to this project whenever I have some spare time if that seems like a good idea.

@diegogangl
Copy link
Contributor

@jon-dez check out #553
This is the kind of thing that could be fixed by signals

@nekohayo nekohayo added patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. priority:medium reproducible-in-git Issues that affect the current dev version labels Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. priority:medium reproducible-in-git Issues that affect the current dev version
Projects
None yet
Development

No branches or pull requests

4 participants