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

[BUG] Task duplication when changing collections #1392

Closed
johannesmono opened this issue May 5, 2024 · 6 comments · Fixed by #1429
Closed

[BUG] Task duplication when changing collections #1392

johannesmono opened this issue May 5, 2024 · 6 comments · Fixed by #1429
Assignees
Labels
bug Something isn't working
Milestone

Comments

@johannesmono
Copy link

Describe the bug
When adding a task and changing the collection, the current state of the tasks get saved to the previously selected collection. This also happens with an empty task.

To Reproduce

  1. Click the add task button and, optionally, fill out some data;
  2. change the collection, optionally finish data entry;
  3. save the task; and
  4. the created task appears as expected. Additionally a task, either empty or with "some data", appears in the previously selected collection.

Expected behavior
No additional task is created.

Device and version

  • Android version: 13
  • jtx Board version: 2.07.06.gplay
@johannesmono johannesmono added the bug Something isn't working label May 5, 2024
@lore-emu
Copy link

lore-emu commented May 7, 2024

Having the same issue. This only seems to happen when switching from a remote collection to any other collection (local or remote).

@patrickunterwegs
Copy link
Member

Thanks @johannesmono & @lore-emu , I have reproduced the issue and reviewed the code but it is not yet obvious, I need to continue debugging the issue. I'm just super busy those days, so please be patient.

@patrickunterwegs
Copy link
Member

Sorry that it took a bit, I found the issue, it's really strange that this suddenly appeared as the part of the code didn't change. Still a small change was needed to make it work properly again, so probably it was a change in a library that caused it... I'll add the fix in the current beta which will be released soon.

@patrickunterwegs patrickunterwegs added this to the 2.7.7 milestone May 15, 2024
@lore-emu
Copy link

The bug seems to still be happening on the version that was just released (both on 2.7.7.ose and on 2.7.7.gplay). Is that expected?

@patrickunterwegs
Copy link
Member

Hi, sorry, I checked it and it was solved for me, I will reopen this ticket and check again.

@patrickunterwegs
Copy link
Member

Hi @johannesmono , sorry that this took I while, it was really a tough one.
The problem was that the current entry was saved and moved in different coroutines. If the saving was completed after the moving, then the saving overwrote the logical deletion... But as those coroutines have their own priorities, it was pretty random which one was done first. That's why it was so hard to reproduce it.

However, I hope with the change it's fixed for good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants